3 LATEX_FILES =$(call src-wildcard,*.latex)
6 EXTRA_DIST_FILES= $(LATEX_FILES) $(IMAGES) README.txt convert-ly.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))
14 OUT_PNG_IMAGES=$(OUT_PDF_IMAGES:%.pdf=%.png)
16 OUT_TEXI_FILES=$(ITEXI_FILES:%.itexi=$(outdir)/%.texi)\
17 $(ITELY_FILES:%.itely=$(outdir)/%.texi)
18 HTML_FILES = $(TELY_FILES:%.tely=$(outdir)/%-big-page.html)\
19 $(outdir)/lilypond-internals-big-page.html
22 PDF_FILES = $(TELY_FILES:%.tely=$(outdir)/%.pdf)
24 INFO_DOCS = lilypond lilypond-internals music-glossary lilypond-program
25 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
27 STEPMAKE_TEMPLATES=tex texinfo omf documentation
29 OMF_FILES += $(outdir)/lilypond-internals.html.omf
31 LOCALSTEPMAKE_TEMPLATES=lilypond ly
34 TEXINPUTS=$(top-src-dir)/tex::
37 include $(depth)/make/stepmake.make
42 @echo export PATH=$(PATH)
43 @echo export LILYPOND_DATADIR=$(LILYPOND_DATADIR)
44 @echo export PYTHONPATH=$(PYTHONPATH)
46 xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
48 # There are two modes for info: with and without images.
51 # This builds all .info targets with images, in out-www.
52 # Viewawble with a recent Emacs, doing: M-x info out-www/lilypond.info
54 # Cancel the special, non-image info generation rule that skips images:
55 $(outdir)/%.info: $(outdir)/%.nexi
57 local-install-info: info
58 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
59 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
60 ## Can not have absolute symlinks because some binary packages build schemes
61 ## install files in nonstandard root. Best we can do is to notify the
62 ## builder or packager.
64 @echo "***************************************************************"
65 @echo "Please add or update the LilyPond direntries, do"
67 @echo " install-info --info-dir=$(infodir) $(outdir)/lilypond.info"
69 @echo "For images in the INFO docs to work, do: "
71 @echo " (cd $(package_infodir) && ln -sf ../../doc/lilypond/Documentation/user/*png .)"
72 @echo "or add something like that to the postinstall script."
75 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
76 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
77 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
78 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
79 (cd $(package_infodir) && ln -sf $(webdir)/Documentation/user/*png .)
83 rm -f $(package_infodir)/*.png
87 # Cancel the default info generation rule that generates images:
88 $(outdir)/%.info: # $(outdir)/%.texi
90 local-install-info: info
91 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
92 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
93 ## Can not have absolute symlinks because some binary packages build schemes
94 ## install files in nonstandard root. Best we can do is to notify the
95 ## builder or packager.
97 @echo "***************************************************************"
98 @echo "Please add or update the LilyPond direntries, do"
100 @echo " install-info --info-dir=$(infodir) out/lilypond.info"
102 @echo "For images in the INFO docs to work, do"
104 @echo " make out=www install-info "
106 @echo "and read the extra instructions."
109 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
110 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
111 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
113 @echo "***************************************************************"
114 @echo "For images in the INFO docs to work, do"
116 @echo " make out=www install-info "
123 # All web targets, except info image symlinks and info docs are
124 # installed in non-recursing target from TOP-SRC-DIR
125 local-install-WWW: local-install-info
126 local-uninstall-WWW: local-uninstall-info
131 local-help: extra-local-help
135 dvi update dvi documents\n\
136 info update info pages\n\
137 ps update PostScript documents\n\
138 xml update Docbook xml documentation\n\
141 # Generic rule using % twice not possible?
142 # $(outdir)/%/%.html: $(outdir)/%.texi
143 $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi
144 $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
147 # The split user manual
149 $(outdir)/lilypond/index.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
151 $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
152 find $(outdir)/lilypond/ -name '*'.png -o -name '*'.ly | xargs rm -f
153 # symbolic links to save space
154 (cd $(outdir)/lilypond/ ; ln -sf ../*.png ../*.ly . )
157 # One big page user manual
159 $(outdir)/lilypond-big-page.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
160 $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
163 # The split program usage
165 $(outdir)/lilypond-program/index.html: $(outdir)/lilypond-program.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
167 $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond-program --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
168 find $(outdir)/lilypond-program/ -name '*'.png -o -name '*'.ly | xargs rm -f
169 # symbolic links to save space
170 (cd $(outdir)/lilypond-program/ ; ln -sf ../*.png ../*.ly . )
173 # One big page program usage
175 $(outdir)/lilypond-program-big-page.html: $(outdir)/lilypond-program.texi $(OUT_PNG_IMAGES)
176 $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
180 # The split internals reference
182 $(outdir)/lilypond-internals/index.html: $(outdir)/lilypond-internals.texi
184 $(MAKEINFO) --output=$(outdir)/lilypond-internals --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
187 # One big page internals reference
189 $(outdir)/lilypond-internals-big-page.html: $(outdir)/lilypond-internals.texi
190 $(MAKEINFO) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
195 $(outdir)/music-glossary/index.html: $(outdir)/music-glossary.texi
197 $(MAKEINFO) --output=$(outdir)/music-glossary --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
198 find $(outdir)/music-glossary/ -name '*'.png -o -name '*'.ly | xargs rm -f
199 # symbolic links to save space
200 (cd $(outdir)/music-glossary/ ; ln -sf ../*.png ../*.ly . )
202 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
204 $(MAKEINFO) -I$(outdir) --output=$@ --docbook $<
206 $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
208 $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
210 $(outdir)/lilypond.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
212 $(outdir)/lilypond-program.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
214 $(outdir)/%.png: %.png
215 convert -depth 8 -geometry 50x50% $< $@
217 $(outdir)/%.png: %.eps
218 gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
220 $(outdir)/%.pdf: %.png
221 convert -depth 8 $< $@
223 $(outdir)/%.pdf: %.eps
224 gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
228 $(outdir)/lilypond/index.html\
229 $(outdir)/lilypond-internals/index.html\
230 $(outdir)/music-glossary/index.html\
231 $(outdir)/lilypond-program/index.html
233 # Symlinks to refer to external source documents from split and non-split HTML
234 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source $(outdir)/lilypond-program/source
240 $(outdir)/lilypond/source:
242 mkdir -p $(outdir)/lilypond
243 ln -sf ../../../ $(@)
245 $(outdir)/music-glossary/source:
247 mkdir -p $(outdir)/music-glossary
248 ln -sf ../../../ $(@)
250 $(outdir)/lilypond-program/source:
252 mkdir -p $(outdir)/lilypond-program
253 ln -sf ../../../ $(@)
256 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
257 $(datafiles) $(PDF_FILES) $(source-links) info info-dir
260 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals music-glossary lilypond-program
263 $(outdir)/%.bib: %.bib
268 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
269 $(MAKE) -C $(top-src-dir)/mf
271 $(outdir)/lilypond.texi: $(ITELY_FILES) $(ITEXI_FILES)
272 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
274 # Prevent building music-glossary.texi from default target
275 $(outdir)/music-glossary.nexi:
277 # Rules for the automatically generated documentation
279 # There used to be a dependency on a dummy target, to force a rebuild
280 # of lilypond-internals every time. however, this triggers
281 # compilation during install, which is a bad thing (tm).
283 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY)
284 cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
285 rm -f $(outdir)/lilypond-internals.nexi
286 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
290 $(outdir)/interfaces.itexi: dummy
291 cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc