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)
24 # this prevents aux files from being reused for translated docs
25 TEXI2PDF_FLAGS = --tidy
27 INFO_DOCS = lilypond lilypond-internals music-glossary lilypond-program lilypond-learning
28 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
31 INFO_IMAGES_DIR = lilypond
34 STEPMAKE_TEMPLATES=tex texinfo omf documentation
35 OMF_FILES += $(outdir)/lilypond-internals.html.omf
37 LOCALSTEPMAKE_TEMPLATES=lilypond ly
40 TEXINPUTS=$(top-src-dir)/tex::
43 include $(depth)/make/stepmake.make
47 @echo export LILYPOND_DATADIR=$(LILYPOND_DATADIR)
48 @echo export PYTHONPATH=$(PYTHONPATH)
50 xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
52 # There are two modes for info: with and without images.
55 # This builds all .info targets with images, in out-www.
56 # Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info
58 # Cancel the special, non-image info generation rule that skips images:
59 $(outdir)/%.info: $(outdir)/%.nexi
61 # "makeinfo --info" MUST be able to read PNGs from CWD for info images
62 # to work, hence lilypond/ -> $(outdir)/ symlink.
63 # $(outdir)/lilypond/*.png symlinks are only needed to view
64 # out-www/*.info with Emacs -- HTML docs no longer need these
65 # symlinks, see replace_symlinks_urls in
66 # buildscripts/add_html_footer.py.
67 $(outdir)/%.info: lilypond
68 lilypond: $(OUT_PNG_IMAGES)
70 ln -s $(outdir) lilypond
71 mkdir -p $(outdir)/lilypond
72 find $(outdir)/lilypond/ -name '*'.png | xargs rm -f
73 (cd $(outdir)/lilypond/ ; ln -sf ../*.png . )
75 local-install-info: info
76 -$(INSTALL) -d $(DESTDIR)$(infodir)
77 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
78 ## Can not have absolute symlinks because some binary packages build schemes
79 ## install files in nonstandard root. Best we can do is to notify the
80 ## builder or packager.
82 @echo "***************************************************************"
83 @echo "Please add or update the LilyPond direntries, do"
85 @echo " install-info --info-dir=$(infodir) $(outdir)/lilypond.info"
87 @echo "For images in the INFO docs to work, do: "
89 @echo " (cd $(infodir) && ln -sfT ../doc/lilypond/html/Documentation/user lilypond)"
90 @echo "or add something like that to the postinstall script."
92 else # installing directly into standard /usr/...
93 -$(INSTALL) -d $(DESTDIR)$(infodir)
94 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
95 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
96 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
97 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-internals.info
98 -install-info --remove --info-dir=$(infodir) $(outdir)/music-glossary.info
99 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
100 cd $(infodir) && ln -sfT $(webdir)/Documentation/user lilypond
101 endif # installing directly into standard /usr/...
104 rm -f $(infodir)/lilypond
108 # Cancel the default info generation rule that generates images:
109 $(outdir)/%.info: $(outdir)/%.texi
111 local-install-info: info
112 -$(INSTALL) -d $(DESTDIR)$(package_infodir)
113 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
114 ## Can not have absolute symlinks because some binary packages build schemes
115 ## install files in nonstandard root. Best we can do is to notify the
116 ## builder or packager.
118 @echo "***************************************************************"
119 @echo "Please add or update the LilyPond direntries, do"
121 @echo " install-info --info-dir=$(infodir) out/lilypond.info"
123 @echo "For images in the INFO docs to work, do"
125 @echo " make out=www install-info "
127 @echo "and read the extra instructions."
129 else # installing directly into standard /usr/...
130 -$(INSTALL) -d $(DESTDIR)$(infodir)
131 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
132 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
133 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
134 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-internals.info
135 -install-info --remove --info-dir=$(infodir) $(outdir)/music-glossary.info
136 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
138 @echo "***************************************************************"
139 @echo "For images in the INFO docs to work, do"
141 @echo " make out=www install-info "
143 endif # installing into standard /usr/* root# installing into /usr/...
147 # All web targets, except info image symlinks and info docs are
148 # installed in non-recursing target from TOP-SRC-DIR
149 local-install-WWW: local-install-info
150 local-uninstall-WWW: local-uninstall-info
157 local-help: extra-local-help
161 info update info pages\n\
162 ps update PostScript documents\n\
163 xml update Docbook xml documentation\n\
166 # Generic rule using % twice not possible?
167 # $(outdir)/%/%.html: $(outdir)/%.texi
168 $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi
169 $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
172 # Split manuals in HTML
174 $(outdir)/lilypond/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
175 $(outdir)/lilypond-program/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
176 $(outdir)/lilypond-learning/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
177 $(outdir)/music-glossary/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
181 # Manuals in one big HTML page
183 $(outdir)/lilypond-big-page.html: $(OUT_PNG_IMAGES)
184 $(outdir)/lilypond-program-big-page.html: $(OUT_PNG_IMAGES)
185 $(outdir)/lilypond-learning-big-page.html: $(OUT_PNG_IMAGES)
187 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
189 $(MAKEINFO) -I$(outdir) --output=$@ --docbook $<
191 $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
193 $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
195 $(outdir)/lilypond.pdf $(outdir)/lilypond-program.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
196 $(outdir)/lilypond-learning.pdf $(outdir)/music-glossary.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
198 $(outdir)/%.png: %.png
199 convert -depth 8 -geometry 50x50% $< $@
201 $(outdir)/%.png: %.eps
202 gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
204 $(outdir)/%.pdf: %.png
205 convert -depth 8 $< $@
207 $(outdir)/%.pdf: %.eps
208 gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
212 $(outdir)/lilypond/index.html\
213 $(outdir)/lilypond-internals/index.html\
214 $(outdir)/music-glossary/index.html\
215 $(outdir)/lilypond-program/index.html\
216 $(outdir)/lilypond-learning/index.html
218 # Symlinks to refer to external source documents from split and non-split HTML
219 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source $(outdir)/lilypond-program/source $(outdir)/lilypond-learning/source
228 ln -sf ../../../ $(@)
230 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
231 $(datafiles) $(PDF_FILES) $(source-links) info
233 $(outdir)/%.bib: %.bib
238 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
239 $(MAKE) -C $(top-src-dir)/mf
241 $(outdir)/lilypond.texi $(outdir)/lilypond-program.texi $(outdir)/lilypond-learning.texi: $(ITELY_FILES) $(ITEXI_FILES)
242 $(outdir)/lilypond.nexi $(outdir)/lilypond-program.nexi $(outdir)/lilypond-learning.nexi: $(ITELY_FILES) $(ITEXI_FILES)
245 # Rules for the automatically generated documentation
247 # There used to be a dependency on a dummy target, to force a rebuild
248 # of lilypond-internals every time. however, this triggers
249 # compilation during install, which is a bad thing (tm).
251 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY)
252 cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
253 rm -f $(outdir)/lilypond-internals.nexi
254 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
258 $(outdir)/interfaces.itexi: dummy
259 cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc