3 LATEX_FILES =$(call src-wildcard,*.latex)
6 EXTRA_DIST_FILES= $(LATEX_FILES) $(IMAGES) README.txt $(EPS_ILLUSTRATIONS)
8 IMAGES=$(call src-wildcard,*.png)
9 EPS_ILLUSTRATIONS=context-example.eps
10 PDF_ILLUSTRATIONS=context-example.pdf
12 OUT_PDF_IMAGES=$(IMAGES:%.png=$(outdir)/%.pdf) $(addprefix $(outdir)/,$(PDF_ILLUSTRATIONS))
13 OUT_PNG_IMAGES=$(OUT_EPS_IMAGES:%.eps=%.png)
15 OUT_TEXI_FILES=$(ITEXI_FILES:%.itexi=$(outdir)/%.texi)\
16 $(ITELY_FILES:%.itely=$(outdir)/%.texi)
17 HTML_FILES = $(TELY_FILES:%.tely=$(outdir)/%.html)\
18 $(outdir)/lilypond-internals.html
21 PDF_FILES = $(TELY_FILES:%.tely=$(outdir)/%.pdf)
23 INFO_DOCS = lilypond lilypond-internals music-glossary
24 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
26 STEPMAKE_TEMPLATES=tex texinfo omf documentation
28 OMF_FILES += $(outdir)/lilypond-internals.html.omf
30 LOCALSTEPMAKE_TEMPLATES=lilypond ly
33 TEXINPUTS=$(top-src-dir)/tex::
36 include $(depth)/make/stepmake.make
41 @echo export PATH=$(PATH)
42 @echo export LILYPONDPREFIX=$(LILYPONDPREFIX)
43 @echo export PYTHONPATH=$(PYTHONPATH)
45 xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
47 # There are two modes for info: with and without images.
50 # This builds all .info targets with images, in out-www.
51 # Viewawble with a recent Emacs, doing: M-x info out-www/lilypond.info
53 # Cancel the special, non-image info generation rule that skips images:
54 $(outdir)/%.info: $(outdir)/%.nexi
56 local-install-info: info
57 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
58 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
59 ## Can not have absolute symlinks because some binary packages build schemes
60 ## install files in nonstandard root. Best we can do is to notify the
61 ## builder or packager.
63 @echo "***************************************************************"
64 @echo "Please add or update the LilyPond direntries, do"
66 @echo " install-info --info-dir=$(infodir) $(outdir)/lilypond.info"
68 @echo "For images in the INFO docs to work, do: "
70 @echo " (cd $(package_infodir) && ln -sf ../../doc/lilypond/Documentation/user/*png .)"
71 @echo "or add something like that to the postinstall script."
74 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
75 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
76 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
77 (cd $(package_infodir) && ln -sf $(webdir)/Documentation/user/*png .)
81 rm -f $(package_infodir)/*.png
85 # Cancel the default info generation rule that generates images:
86 $(outdir)/%.info: # $(outdir)/%.texi
88 local-install-info: info
89 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
90 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
91 ## Can not have absolute symlinks because some binary packages build schemes
92 ## install files in nonstandard root. Best we can do is to notify the
93 ## builder or packager.
95 @echo "***************************************************************"
96 @echo "Please add or update the LilyPond direntries, do"
98 @echo " install-info --info-dir=$(infodir) out/lilypond.info"
100 @echo "For images in the INFO docs to work, do"
102 @echo " make out=www install-info "
104 @echo "and read the extra instructions."
107 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
108 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
109 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
111 @echo "***************************************************************"
112 @echo "For images in the INFO docs to work, do"
114 @echo " make out=www install-info "
121 # All web targets, except info image symlinks and info docs are
122 # installed in non-recursing target from TOP-SRC-DIR
123 local-install-WWW: local-install-info
124 local-uninstall-WWW: local-uninstall-info
129 local-help: extra-local-help
133 dvi update dvi documents\n\
134 info update info pages\n\
135 ps update PostScript documents\n\
136 xml update Docbook xml documentation\n\
139 # Generic rule using % twice not possible?
140 # $(outdir)/%/%.html: $(outdir)/%.texi
141 $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi
142 $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
145 # The split user manual
147 $(outdir)/lilypond/index.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
149 $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
150 find $(outdir)/lilypond/ -name '*'.png -o -name '*'.ly | xargs rm -f
151 # symbolic links to save space
152 (cd $(outdir)/lilypond/ ; ln -sf ../*.png ../*.ly . )
155 # One big page manual
157 $(outdir)/lilypond.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
158 $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
161 # The split internals reference
163 $(outdir)/lilypond-internals/index.html: $(outdir)/lilypond-internals.texi
165 $(MAKEINFO) --output=$(outdir)/lilypond-internals --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
168 # One big page internals reference
170 $(outdir)/lilypond-internals.html: $(outdir)/lilypond-internals.texi
171 $(MAKEINFO) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
176 $(outdir)/music-glossary/index.html: $(outdir)/music-glossary.texi
178 $(MAKEINFO) --output=$(outdir)/music-glossary --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
179 find $(outdir)/music-glossary/ -name '*'.png -o -name '*'.ly | xargs rm -f
180 # symbolic links to save space
181 (cd $(outdir)/music-glossary/ ; ln -sf ../*.png ../*.ly . )
183 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
185 $(MAKEINFO) -I$(outdir) --output=$@ --docbook $<
187 $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
189 $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
191 $(outdir)/lilypond.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
193 $(outdir)/%.png: %.png
194 convert -geometry 50x50% $< $@
196 $(outdir)/%.png: %.eps
199 $(outdir)/%.eps: %.png
202 $(outdir)/%.eps: %.eps
205 $(outdir)/%.pdf: %.png
208 $(outdir)/%.pdf: %.eps
213 $(outdir)/lilypond/index.html\
214 $(outdir)/lilypond-internals/index.html\
215 $(outdir)/music-glossary/index.html
217 # Symlinks to refer to external source documents from split and non-split HTML
218 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source
224 $(outdir)/lilypond/source:
226 ln -sf ../../../ $(@)
228 $(outdir)/music-glossary/source:
230 ln -sf ../../../ $(@)
232 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
233 $(datafiles) $(PDF_FILES) $(source-links) info info-dir
235 local-WWW-clean: deep-WWW-clean
238 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
241 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals music-glossary
244 $(outdir)/%.bib: %.bib
248 rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
249 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals $(outdir)/music-glossary
252 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
253 $(MAKE) -C $(top-src-dir)/mf
255 $(outdir)/lilypond.texi: $(ITELY_FILES) $(ITEXI_FILES)
256 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
258 # Prevent building music-glossary.texi from default target
259 $(outdir)/music-glossary.nexi:
261 # Rules for the automatically generated documentation
263 # There used to be a dependency on a dummy target, to force a rebuild
264 # of lilypond-internals every time. however, this triggers
265 # compilation during install, which is a bad thing (tm).
267 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY)
268 cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
269 rm -f $(outdir)/lilypond-internals.nexi
270 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
274 $(outdir)/interfaces.itexi: dummy
275 cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc
278 local-clean: local-delete
281 find $(outdir)/ -name 'lily-[0-9]*' | xargs rm -f