3 LATEX_FILES =$(call src-wildcard,*.latex)
6 EXTRA_DIST_FILES = $(LATEX_FILES) $(IMAGES) $(EPS_ILLUSTRATIONS)
7 EXTRA_DIST_FILES += README.txt writing-texinfo.txt policy.txt
9 IMAGES=$(call src-wildcard,*.png)
10 EPS_ILLUSTRATIONS=context-example.eps
11 PDF_ILLUSTRATIONS=context-example.pdf
13 OUT_PDF_IMAGES=$(IMAGES:%.png=$(outdir)/%.pdf) $(addprefix $(outdir)/,$(PDF_ILLUSTRATIONS))
15 OUT_PNG_IMAGES=$(OUT_PDF_IMAGES:%.pdf=%.png)
17 OUT_TEXI_FILES=$(ITEXI_FILES:%.itexi=$(outdir)/%.texi)\
18 $(ITELY_FILES:%.itely=$(outdir)/%.texi)
19 HTML_FILES = $(TELY_FILES:%.tely=$(outdir)/%-big-page.html)\
20 $(outdir)/lilypond-internals-big-page.html
23 PDF_FILES = $(TELY_FILES:%.tely=$(outdir)/%.pdf)
25 INFO_DOCS = lilypond lilypond-internals music-glossary lilypond-program lilypond-learning
26 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
28 STEPMAKE_TEMPLATES=tex texinfo omf documentation
30 OMF_FILES += $(outdir)/lilypond-internals.html.omf
32 LOCALSTEPMAKE_TEMPLATES=lilypond ly
35 TEXINPUTS=$(top-src-dir)/tex::
38 include $(depth)/make/stepmake.make
42 @echo export LILYPOND_DATADIR=$(LILYPOND_DATADIR)
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."
73 else # installing directly into standard /usr/...
74 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
75 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
76 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
77 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
78 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
79 (cd $(package_infodir) && ln -sf $(webdir)/Documentation/user/*png .)
80 endif # installing directly into standard /usr/...
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."
108 else # installing directly into standard /usr/...
109 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
110 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
111 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
112 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
113 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
115 @echo "***************************************************************"
116 @echo "For images in the INFO docs to work, do"
118 @echo " make out=www install-info "
120 endif # installing into standard /usr/* root# installing into /usr/...
124 # All web targets, except info image symlinks and info docs are
125 # installed in non-recursing target from TOP-SRC-DIR
126 local-install-WWW: local-install-info
127 local-uninstall-WWW: local-uninstall-info
132 local-help: extra-local-help
136 dvi update dvi documents\n\
137 info update info pages\n\
138 ps update PostScript documents\n\
139 xml update Docbook xml documentation\n\
142 # Generic rule using % twice not possible?
143 # $(outdir)/%/%.html: $(outdir)/%.texi
144 $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi
145 $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
148 # The split user manual
150 $(outdir)/lilypond/index.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
152 $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
153 # we /might/ switch to texi2html if it can be fixed:
154 # echo "*************************************"
157 # texi2html --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css $<
158 find $(outdir)/lilypond/ -name '*'.png -o -name '*'.ly | xargs rm -f
159 # symbolic links to save space
160 (cd $(outdir)/lilypond/ ; ln -sf ../*.png ../*.ly . )
163 # One big page user manual
165 $(outdir)/lilypond-big-page.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
166 $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
169 # The split program usage
171 $(outdir)/lilypond-program/index.html: $(outdir)/lilypond-program.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
173 $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond-program --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
174 find $(outdir)/lilypond-program/ -name '*'.png -o -name '*'.ly | xargs rm -f
175 # symbolic links to save space
176 (cd $(outdir)/lilypond-program/ ; ln -sf ../*.png ../*.ly . )
179 # The Learning Manual
181 $(outdir)/lilypond-learning/index.html: $(outdir)/lilypond-learning.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
183 $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond-learning --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
184 find $(outdir)/lilypond-learning/ -name '*'.png -o -name '*'.ly | xargs rm -f
185 # symbolic links to save space
186 (cd $(outdir)/lilypond-learning/ ; ln -sf ../*.png ../*.ly . )
190 # One big page program usage
192 $(outdir)/lilypond-program-big-page.html: $(outdir)/lilypond-program.texi $(OUT_PNG_IMAGES)
193 $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
196 # One big page learning manual
198 $(outdir)/lilypond-learning-big-page.html: $(outdir)/lilypond-learning.texi $(OUT_PNG_IMAGES)
199 $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
203 # The split internals reference
205 $(outdir)/lilypond-internals/index.html: $(outdir)/lilypond-internals.texi
207 $(MAKEINFO) --output=$(outdir)/lilypond-internals --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
210 # One big page internals reference
212 $(outdir)/lilypond-internals-big-page.html: $(outdir)/lilypond-internals.texi
213 $(MAKEINFO) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
218 $(outdir)/music-glossary/index.html: $(outdir)/music-glossary.texi
220 $(MAKEINFO) --output=$(outdir)/music-glossary --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
221 find $(outdir)/music-glossary/ -name '*'.png -o -name '*'.ly | xargs rm -f
222 # symbolic links to save space
223 (cd $(outdir)/music-glossary/ ; ln -sf ../*.png ../*.ly . )
225 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
227 $(MAKEINFO) -I$(outdir) --output=$@ --docbook $<
229 $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
231 $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
233 $(outdir)/lilypond.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
235 $(outdir)/lilypond-program.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
237 $(outdir)/lilypond-learning.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
239 $(outdir)/%.png: %.png
240 convert -depth 8 -geometry 50x50% $< $@
242 $(outdir)/%.png: %.eps
243 gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
245 $(outdir)/%.pdf: %.png
246 convert -depth 8 $< $@
248 $(outdir)/%.pdf: %.eps
249 gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
253 $(outdir)/lilypond/index.html\
254 $(outdir)/lilypond-internals/index.html\
255 $(outdir)/music-glossary/index.html\
256 $(outdir)/lilypond-program/index.html\
257 $(outdir)/lilypond-learning/index.html
259 # Symlinks to refer to external source documents from split and non-split HTML
260 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source $(outdir)/lilypond-program/source $(outdir)/lilypond-learning/source
266 $(outdir)/lilypond/source:
268 mkdir -p $(outdir)/lilypond
269 ln -sf ../../../ $(@)
271 $(outdir)/music-glossary/source:
273 mkdir -p $(outdir)/music-glossary
274 ln -sf ../../../ $(@)
276 $(outdir)/lilypond-program/source:
278 mkdir -p $(outdir)/lilypond-program
279 ln -sf ../../../ $(@)
281 $(outdir)/lilypond-learning/source:
283 mkdir -p $(outdir)/lilypond-learning
284 ln -sf ../../../ $(@)
286 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
287 $(datafiles) $(PDF_FILES) $(source-links) info info-dir
290 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals music-glossary lilypond-program lilypond-learning
293 $(outdir)/%.bib: %.bib
298 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
299 $(MAKE) -C $(top-src-dir)/mf
301 $(outdir)/lilypond.texi: $(ITELY_FILES) $(ITEXI_FILES)
302 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
304 # Prevent building music-glossary.texi from default target
305 $(outdir)/music-glossary.nexi:
307 # Rules for the automatically generated documentation
309 # There used to be a dependency on a dummy target, to force a rebuild
310 # of lilypond-internals every time. however, this triggers
311 # compilation during install, which is a bad thing (tm).
313 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY)
314 cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
315 rm -f $(outdir)/lilypond-internals.nexi
316 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
320 $(outdir)/interfaces.itexi: dummy
321 cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc