3 LATEX_FILES =$(call src-wildcard,*.latex)
6 DVI_FILES = $(TELY_FILES:%.tely=$(outdir)/%.dvi)
8 EXTRA_DIST_FILES= $(LATEX_FILES) $(IMAGES) README.txt $(ILLUSTRATIONS)
10 IMAGES=$(call src-wildcard,*.png)
11 ILLUSTRATIONS=context-example.eps
13 OUT_EPS_IMAGES=$(IMAGES:%.png=$(outdir)/%.eps)
14 OUT_PNG_IMAGES=$(IMAGES:%=$(outdir)/%)
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
20 PS_FILES = $(DVI_FILES:.dvi=.ps)
21 PDF_FILES = $(DVI_FILES:.dvi=.pdf)
23 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
25 INFO_DOCS = lilypond lilypond-internals music-glossary
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
47 @echo export PATH=$(PATH)
48 @echo export LILYPONDPREFIX=$(LILYPONDPREFIX)
49 @echo export PYTHONPATH=$(PYTHONPATH)
51 xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
53 # There are two modes for info: with and without images.
56 # This builds all .info targets with images, in out-www.
57 # Viewawble with a recent Emacs, doing: M-x info out-www/lilypond.info
59 # Cancel the special, non-image info generation rule that skips images:
60 $(outdir)/%.info: $(outdir)/%.nexi
62 local-install-info: info
63 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
64 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
65 ## Can not have absolute symlinks because some binary packages build schemes
66 ## install files in nonstandard root. Best we can do is to notify the
67 ## builder or packager.
69 @echo "***************************************************************"
70 @echo "Please add or update the LilyPond direntries, do"
72 @echo " install-info --info-dir=$(infodir) $(outdir)/lilypond.info"
74 @echo "For images in the INFO docs to work, do: "
76 @echo " (cd $(package_infodir) && ln -sf ../../doc/lilypond/Documentation/user/*png .)"
77 @echo "or add something like that to the postinstall script."
80 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
81 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
82 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
83 (cd $(package_infodir) && ln -sf $(webdir)/Documentation/user/*png .)
87 rm -f $(package_infodir)/*.png
91 # Cancel the default info generation rule that generates images:
92 $(outdir)/%.info: # $(outdir)/%.texi
94 local-install-info: info
95 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
96 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
97 ## Can not have absolute symlinks because some binary packages build schemes
98 ## install files in nonstandard root. Best we can do is to notify the
99 ## builder or packager.
101 @echo "***************************************************************"
102 @echo "Please add or update the LilyPond direntries, do"
104 @echo " install-info --info-dir=$(infodir) out/lilypond.info"
106 @echo "For images in the INFO docs to work, do"
108 @echo " make out=www install-info "
110 @echo "and read the extra instructions."
113 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
114 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
115 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
117 @echo "***************************************************************"
118 @echo "For images in the INFO docs to work, do"
120 @echo " make out=www install-info "
127 # All web targets, except info image symlinks and info docs are
128 # installed in non-recursing target from TOP-SRC-DIR
129 local-install-WWW: local-install-info
130 local-uninstall-WWW: local-uninstall-info
135 local-help: extra-local-help
139 dvi update dvi documents\n\
140 info update info pages\n\
141 ps update PostScript documents\n\
142 xml update Docbook xml documentation\n\
145 # Generic rule using % twice not possible?
146 # $(outdir)/%/%.html: $(outdir)/%.texi
147 $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi
148 $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
151 # The split user manual
153 $(outdir)/lilypond/index.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
155 $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
156 find $(outdir)/lilypond/ -name '*'.png -o -name '*'.ly | xargs rm -f
157 # symbolic links to save space
158 (cd $(outdir)/lilypond/ ; ln -sf ../*.png ../*.ly . )
161 # One big page manual
163 $(outdir)/lilypond.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
164 $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
167 # The split internals reference
169 $(outdir)/lilypond-internals/index.html: $(outdir)/lilypond-internals.texi
171 $(MAKEINFO) --output=$(outdir)/lilypond-internals --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
174 # One big page internals reference
176 $(outdir)/lilypond-internals.html: $(outdir)/lilypond-internals.texi
177 $(MAKEINFO) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
182 $(outdir)/music-glossary/index.html: $(outdir)/music-glossary.texi
184 $(MAKEINFO) --output=$(outdir)/music-glossary --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
185 find $(outdir)/music-glossary/ -name '*'.png -o -name '*'.ly | xargs rm -f
186 # symbolic links to save space
187 (cd $(outdir)/music-glossary/ ; ln -sf ../*.png ../*.ly . )
189 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
191 $(MAKEINFO) -I$(outdir) --output=$@ --docbook $<
193 $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
195 $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
197 $(outdir)/lilypond.dvi: $(OUT_EPS_IMAGES) $(OUT_PNG_IMAGES)
199 $(outdir)/%.png: %.png
200 convert -geometry 50x50% $< $@
202 $(outdir)/%.eps: %.png
206 $(outdir)/lilypond/index.html\
207 $(outdir)/lilypond-internals/index.html\
208 $(outdir)/music-glossary/index.html
210 # Symlinks to refer to external source documents from split and non-split HTML
211 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source
217 $(outdir)/lilypond/source:
219 ln -sf ../../../ $(@)
221 $(outdir)/music-glossary/source:
223 ln -sf ../../../ $(@)
225 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
226 $(datafiles) $(PDF_FILES) $(source-links) info info-dir
228 local-WWW-clean: deep-WWW-clean
231 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
234 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals music-glossary
237 $(outdir)/%.bib: %.bib
241 rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
242 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals $(outdir)/music-glossary
245 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
246 $(MAKE) -C $(top-src-dir)/mf
248 $(outdir)/lilypond.texi: $(ITELY_FILES) $(ITEXI_FILES)
249 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
251 # Prevent building music-glossary.texi from default target
252 $(outdir)/music-glossary.nexi:
254 # Rules for the automatically generated documentation
256 # There used to be a dependency on a dummy target, to force a rebuild
257 # of lilypond-internals every time. however, this triggers
258 # compilation during install, which is a bad thing (tm).
260 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY)
261 cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
262 rm -f $(outdir)/lilypond-internals.nexi
263 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
267 $(outdir)/interfaces.itexi: dummy
268 cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc
271 local-clean: local-delete
274 find $(outdir)/ -name 'lily-[0-9]*' | xargs rm -f