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 writing-sections.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
46 @echo export LILYPOND_DATADIR=$(LILYPOND_DATADIR)
47 @echo export PYTHONPATH=$(PYTHONPATH)
49 xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
51 # There are two modes for info: with and without images.
54 # This builds all .info targets with images, in out-www.
55 # Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info
57 local-install-info: info
58 -$(INSTALL) -d $(DESTDIR)$(infodir)
59 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
60 ## Can not have absolute symlinks because some binary packages build schemes
61 ## install files in nonstandard root. Best we can do is to notify the
62 ## builder or packager.
64 @echo "***************************************************************"
65 @echo "Please add or update the LilyPond direntries, do"
67 @echo " install-info --info-dir=$(infodir) $(outdir)/lilypond.info"
69 @echo "For images in the INFO docs to work, do: "
71 @echo " (cd $(infodir) && ln -sfT ../doc/lilypond/html/Documentation/user lilypond)"
72 @echo "or add something like that to the postinstall script."
74 else # installing directly into standard /usr/...
75 -$(INSTALL) -d $(DESTDIR)$(infodir)
76 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
77 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
78 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
79 -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-internals.info
80 -install-info --remove --info-dir=$(infodir) $(outdir)/music-glossary.info
81 install-info --info-dir=$(infodir) $(outdir)/lilypond.info
82 cd $(infodir) && ln -sfT $(webdir)/Documentation/user lilypond
83 endif # installing directly into standard /usr/...
86 rm -f $(infodir)/lilypond
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)$(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 --remove --info-dir=$(infodir) $(outdir)/lilypond-internals.info
114 -install-info --remove --info-dir=$(infodir) $(outdir)/music-glossary.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 "
122 endif # installing into standard /usr/* root# installing into /usr/...
126 # All web targets, except info image symlinks and info docs are
127 # installed in non-recursing target from TOP-SRC-DIR
128 local-install-WWW: local-install-info
129 local-uninstall-WWW: local-uninstall-info
134 rm -f $(INFO_IMAGES_DIR)
136 local-help: extra-local-help
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 # Split manuals in HTML
153 $(outdir)/lilypond/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
154 $(outdir)/lilypond-learning/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
158 # Manuals in one big HTML page
160 $(outdir)/lilypond-big-page.html: $(OUT_PNG_IMAGES)
161 $(outdir)/lilypond-learning-big-page.html: $(OUT_PNG_IMAGES)
163 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
165 $(MAKEINFO) -I$(outdir) --output=$@ --docbook $<
167 $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
169 $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
171 $(outdir)/lilypond.pdf $(outdir)/lilypond-learning.pdf: $(OUT_PDF_IMAGES)
173 $(outdir)/%.png: %.png
174 convert -depth 8 -geometry 50x50% $< $@
176 $(outdir)/%.png: %.eps
177 gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
179 $(outdir)/%.pdf: %.png
180 convert -depth 8 $< $@
182 $(outdir)/%.pdf: %.eps
183 gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
187 $(outdir)/lilypond/index.html\
188 $(outdir)/lilypond-internals/index.html\
189 $(outdir)/music-glossary/index.html\
190 $(outdir)/lilypond-program/index.html\
191 $(outdir)/lilypond-learning/index.html
193 # Symlinks to refer to external source documents from split and non-split HTML
194 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source $(outdir)/lilypond-program/source $(outdir)/lilypond-learning/source
203 ln -sf ../../../ $(@)
205 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
206 $(datafiles) $(PDF_FILES) $(source-links) info
208 $(outdir)/%.bib: %.bib
213 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
214 $(MAKE) -C $(top-src-dir)/mf
216 $(outdir)/lilypond.texi $(outdir)/lilypond-program.texi $(outdir)/lilypond-learning.texi $(outdir)/music-glossary.texi: $(ITELY_FILES) $(ITEXI_FILES)
217 $(outdir)/lilypond.nexi $(outdir)/lilypond-program.nexi $(outdir)/lilypond-learning.nexi $(outdir)/music-glossary.nexi: $(ITELY_FILES) $(ITEXI_FILES)
220 # Rules for the automatically generated documentation
222 # There used to be a dependency on a dummy target, to force a rebuild
223 # of lilypond-internals every time. however, this triggers
224 # compilation during install, which is a bad thing (tm).
226 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY)
227 cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
228 rm -f $(outdir)/lilypond-internals.nexi
229 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
233 $(outdir)/interfaces.itexi: dummy
234 cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc