3 LATEX_FILES =$(wildcard *.latex)
6 DVI_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.dvi))
8 EXTRA_DIST_FILES= $(LATEX_FILES) $(IMAGES)
9 IMAGES=$(wildcard *.png)
11 OUT_EPS_IMAGES=$(addprefix $(outdir)/,$(IMAGES:.png=.eps))
12 OUT_PNG_IMAGES=$(addprefix $(outdir)/,$(IMAGES))
13 OUT_ITEXI_FILES=$(addprefix $(outdir)/,$(ITELY_FILES:.itely=.itexi)
14 HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html))\
15 $(outdir)/lilypond-internals.html
17 PS_FILES = $(DVI_FILES:.dvi=.ps)
18 PDF_FILES = $(DVI_FILES:.dvi=.pdf)
20 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
22 INFO_DOCS = lilypond lilypond-internals music-glossary
23 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
25 STEPMAKE_TEMPLATES=tex texinfo omf documentation
27 OMF_FILES += $(outdir)/lilypond-internals.html.omf
29 LOCALSTEPMAKE_TEMPLATES=lilypond ly
31 include $(depth)/make/stepmake.make
40 @echo export PATH=$(PATH)
41 @echo export LILYPONDPREFIX=$(LILYPONDPREFIX)
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/out-www/*png .)"
70 @echo "or add something like that to the postinstall script."
73 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
74 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
75 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
76 (cd $(package_infodir) && ln -sf $(local_package_docdir)/Documentation/user/out-www/*png .)
80 rm -f $(package_infodir)/*.png
84 # Cancel the default info generation rule that generates images:
85 $(outdir)/%.info: # $(outdir)/%.texi
87 local-install-info: info
88 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
89 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
90 ## Can not have absolute symlinks because some binary packages build schemes
91 ## install files in nonstandard root. Best we can do is to notify the
92 ## builder or packager.
94 @echo "***************************************************************"
95 @echo "Please add or update the LilyPond direntries, do"
97 @echo " install-info --info-dir=$(infodir) out/lilypond.info"
99 @echo "For images in the INFO docs to work, do"
101 @echo " make out=www install-info "
103 @echo "and read the extra instructions."
106 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
107 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
108 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
110 @echo "***************************************************************"
111 @echo "For images in the INFO docs to work, do"
113 @echo " make out=www install-info "
120 # All web targets, except info image symlinks and info docs are
121 # installed in non-recursing target from TOPDIR
122 local-install-WWW: local-install-info
123 local-uninstall-WWW: local-uninstall-info
128 local-help: extra-local-help
132 dvi update dvi documents\n\
133 info update info pages\n\
134 ps update PostScript documents\n\
135 xml update Docbook xml documentation\n\
138 # Generic rule using % twice not possible?
139 # $(outdir)/%/%.html: $(outdir)/%.texi
140 $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi
141 $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
144 # The split user manual
146 $(outdir)/lilypond/index.html: $(outdir)/lilypond.texi
148 $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(abs-srcdir)/Documentation/texinfo.css --html $<
149 find $(outdir)/lilypond/ -name '*'.png -o -name '*'.ly | xargs rm -f
150 # symbolic links to save space
151 (cd $(outdir)/lilypond/ ; ln -sf ../*.png ../*.ly . )
154 # One big page manual
156 $(outdir)/lilypond.html: $(outdir)/lilypond.texi
157 $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(abs-srcdir)/Documentation/texinfo.css --html --no-split --no-headers $<
160 # The split internals reference
162 $(outdir)/lilypond-internals/index.html: $(outdir)/lilypond-internals.texi
164 $(MAKEINFO) --output=$(outdir)/lilypond-internals --css-include=$(abs-srcdir)/Documentation/texinfo.css --html $<
167 # One big page internals reference
169 $(outdir)/lilypond-internals.html: $(outdir)/lilypond-internals.texi
170 $(MAKEINFO) --output=$@ --css-include=$(abs-srcdir)/Documentation/texinfo.css --html --no-split --no-headers $<
175 $(outdir)/music-glossary/index.html: $(outdir)/music-glossary.texi
177 $(MAKEINFO) --output=$(outdir)/music-glossary --css-include=$(abs-srcdir)/Documentation/texinfo.css --html $<
178 find $(outdir)/music-glossary/ -name '*'.png -o -name '*'.ly | xargs rm -f
179 # symbolic links to save space
180 (cd $(outdir)/music-glossary/ ; ln -sf ../*.png ../*.ly . )
182 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
184 $(MAKEINFO) -I$(outdir) --output=$@ --docbook $<
186 $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
188 $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
190 $(outdir)/lilypond.dvi: $(OUT_EPS_IMAGES) $(OUT_PNG_IMAGES)
192 $(outdir)/%.png: %.png
193 convert -geometry 50x50% $< $@
195 $(outdir)/%.eps: %.png
199 $(outdir)/lilypond/index.html\
200 $(outdir)/lilypond-internals/index.html\
201 $(outdir)/music-glossary/index.html
203 # Symlinks to refer to external source documents from split and non-split HTML
204 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source
208 ln -sf ../../../ $(@)
210 $(outdir)/lilypond/source:
212 ln -sf ../../../../ $(@)
214 $(outdir)/music-glossary/source:
216 ln -sf ../../../../ $(@)
218 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
219 $(datafiles) $(PDF_FILES) $(source-links) info info-dir
221 local-WWW-clean: deep-WWW-clean
224 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
227 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals music-glossary
230 $(outdir)/%.bib: %.bib
234 rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
235 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals $(outdir)/music-glossary
238 $(builddir)/mf/$(outconfbase)/feta16list.ly:
239 $(MAKE) -C $(topdir)/mf
241 $(outdir)/lilypond.texi: $(ITELY_FILES) $(ITEXI_FILES)
242 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
244 # Rules for the automatically generated documentation
245 # When cross-compiling, we don't have lilypond, so we fake
249 # There used to be a dependency on a dummy target, to force a rebuild
250 # of lilypond-internals every time. however, this triggers
251 # compilation during install, which is a bad thing (tm).
253 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(builddir)/lily/$(outconfbase)/lilypond
254 cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond --verbose $(abs-srcdir)/ly/generate-documentation
255 rm -f $(outdir)/lilypond-internals.nexi
256 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
260 $(outdir)/interfaces.itexi: dummy
261 cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond $(abs-srcdir)/ly/generate-interface-doc
265 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
267 touch $(outdir)/$(*F).nexi
269 $(outdir)/interfaces.itexi:
270 cp dummy-interfaces.itexi $@
274 local-clean: local-delete
277 -for i in $$(seq 0 9); do \
278 for j in dvi eps eps.bbox eps.trans eps.trans.ps ps log png tex; do \
279 rm -f $(outdir)/lily-$$i*$$j; \