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))
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 lilypond-learning
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
41 @echo export LILYPOND_DATADIR=$(LILYPOND_DATADIR)
42 @echo export PYTHONPATH=$(PYTHONPATH)
44 xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
46 # There are two modes for info: with and without images.
49 # This builds all .info targets with images, in out-www.
50 # Viewawble with a recent Emacs, doing: M-x info out-www/lilypond.info
52 # Cancel the special, non-image info generation rule that skips images:
53 $(outdir)/%.info: $(outdir)/%.nexi
55 local-install-info: info
56 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
57 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
58 ## Can not have absolute symlinks because some binary packages build schemes
59 ## install files in nonstandard root. Best we can do is to notify the
60 ## builder or packager.
62 @echo "***************************************************************"
63 @echo "Please add or update the LilyPond direntries, do"
65 @echo " install-info --info-dir=$(infodir) $(outdir)/lilypond.info"
67 @echo "For images in the INFO docs to work, do: "
69 @echo " (cd $(package_infodir) && ln -sf ../../doc/lilypond/Documentation/user/*png .)"
70 @echo "or add something like that to the postinstall script."
72 else # installing directly into standard /usr/...
73 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
74 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
75 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
76 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
77 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
78 (cd $(package_infodir) && ln -sf $(webdir)/Documentation/user/*png .)
79 endif # installing directly into standard /usr/...
82 rm -f $(package_infodir)/*.png
86 # Cancel the default info generation rule that generates images:
87 $(outdir)/%.info: # $(outdir)/%.texi
89 local-install-info: info
90 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
91 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
92 ## Can not have absolute symlinks because some binary packages build schemes
93 ## install files in nonstandard root. Best we can do is to notify the
94 ## builder or packager.
96 @echo "***************************************************************"
97 @echo "Please add or update the LilyPond direntries, do"
99 @echo " install-info --info-dir=$(infodir) out/lilypond.info"
101 @echo "For images in the INFO docs to work, do"
103 @echo " make out=www install-info "
105 @echo "and read the extra instructions."
107 else # installing directly into standard /usr/...
108 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
109 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
110 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
111 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
112 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
114 @echo "***************************************************************"
115 @echo "For images in the INFO docs to work, do"
117 @echo " make out=www install-info "
119 endif # installing into standard /usr/* root# installing into /usr/...
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 # we /might/ switch to texi2html if it can be fixed:
153 # echo "*************************************"
156 # texi2html --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css $<
157 find $(outdir)/lilypond/ -name '*'.png -o -name '*'.ly | xargs rm -f
158 # symbolic links to save space
159 (cd $(outdir)/lilypond/ ; ln -sf ../*.png ../*.ly . )
162 # One big page user manual
164 $(outdir)/lilypond-big-page.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
165 $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
168 # The split program usage
170 $(outdir)/lilypond-program/index.html: $(outdir)/lilypond-program.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
172 $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond-program --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
173 find $(outdir)/lilypond-program/ -name '*'.png -o -name '*'.ly | xargs rm -f
174 # symbolic links to save space
175 (cd $(outdir)/lilypond-program/ ; ln -sf ../*.png ../*.ly . )
178 # The Learning Manual
180 $(outdir)/lilypond-learning/index.html: $(outdir)/lilypond-learning.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
182 $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond-learning --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
183 find $(outdir)/lilypond-learning/ -name '*'.png -o -name '*'.ly | xargs rm -f
184 # symbolic links to save space
185 (cd $(outdir)/lilypond-learning/ ; ln -sf ../*.png ../*.ly . )
189 # One big page program usage
191 $(outdir)/lilypond-program-big-page.html: $(outdir)/lilypond-program.texi $(OUT_PNG_IMAGES)
192 $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
195 # One big page learning manual
197 $(outdir)/lilypond-learning-big-page.html: $(outdir)/lilypond-learning.texi $(OUT_PNG_IMAGES)
198 $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
202 # The split internals reference
204 $(outdir)/lilypond-internals/index.html: $(outdir)/lilypond-internals.texi
206 $(MAKEINFO) --output=$(outdir)/lilypond-internals --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
209 # One big page internals reference
211 $(outdir)/lilypond-internals-big-page.html: $(outdir)/lilypond-internals.texi
212 $(MAKEINFO) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
217 $(outdir)/music-glossary/index.html: $(outdir)/music-glossary.texi
219 $(MAKEINFO) --output=$(outdir)/music-glossary --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
220 find $(outdir)/music-glossary/ -name '*'.png -o -name '*'.ly | xargs rm -f
221 # symbolic links to save space
222 (cd $(outdir)/music-glossary/ ; ln -sf ../*.png ../*.ly . )
224 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
226 $(MAKEINFO) -I$(outdir) --output=$@ --docbook $<
228 $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
230 $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
232 $(outdir)/lilypond.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
234 $(outdir)/lilypond-program.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
236 $(outdir)/lilypond-learning.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
238 $(outdir)/%.png: %.png
239 convert -depth 8 -geometry 50x50% $< $@
241 $(outdir)/%.png: %.eps
242 gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
244 $(outdir)/%.pdf: %.png
245 convert -depth 8 $< $@
247 $(outdir)/%.pdf: %.eps
248 gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
252 $(outdir)/lilypond/index.html\
253 $(outdir)/lilypond-internals/index.html\
254 $(outdir)/music-glossary/index.html\
255 $(outdir)/lilypond-program/index.html\
256 $(outdir)/lilypond-learning/index.html
258 # Symlinks to refer to external source documents from split and non-split HTML
259 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source $(outdir)/lilypond-program/source $(outdir)/lilypond-learning/source
265 $(outdir)/lilypond/source:
267 mkdir -p $(outdir)/lilypond
268 ln -sf ../../../ $(@)
270 $(outdir)/music-glossary/source:
272 mkdir -p $(outdir)/music-glossary
273 ln -sf ../../../ $(@)
275 $(outdir)/lilypond-program/source:
277 mkdir -p $(outdir)/lilypond-program
278 ln -sf ../../../ $(@)
280 $(outdir)/lilypond-learning/source:
282 mkdir -p $(outdir)/lilypond-learning
283 ln -sf ../../../ $(@)
285 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
286 $(datafiles) $(PDF_FILES) $(source-links) info info-dir
289 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals music-glossary lilypond-program lilypond-learning
292 $(outdir)/%.bib: %.bib
297 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
298 $(MAKE) -C $(top-src-dir)/mf
300 $(outdir)/lilypond.texi: $(ITELY_FILES) $(ITEXI_FILES)
301 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
303 # Prevent building music-glossary.texi from default target
304 $(outdir)/music-glossary.nexi:
306 # Rules for the automatically generated documentation
308 # There used to be a dependency on a dummy target, to force a rebuild
309 # of lilypond-internals every time. however, this triggers
310 # compilation during install, which is a bad thing (tm).
312 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY)
313 cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
314 rm -f $(outdir)/lilypond-internals.nexi
315 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
319 $(outdir)/interfaces.itexi: dummy
320 cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc