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)
25 MAIN_INFO_DOC = lilypond
26 INFO_DOCS = lilypond lilypond-internals music-glossary lilypond-program lilypond-learning
27 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
30 INFO_IMAGES_DIR = lilypond
31 DEST_INFO_IMAGES_SUBDIR = Documentation/user
34 STEPMAKE_TEMPLATES=texinfo omf documentation
35 OMF_FILES += $(outdir)/lilypond-internals.html.omf
37 LOCALSTEPMAKE_TEMPLATES=lilypond ly
39 include $(depth)/make/stepmake.make
44 @echo export LILYPOND_DATADIR=$(LILYPOND_DATADIR)
45 @echo export PYTHONPATH=$(PYTHONPATH)
47 xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
51 rm -f $(INFO_IMAGES_DIR)
53 local-help: extra-local-help
57 info update info pages\n\
58 xml update Docbook xml documentation\n\
61 # Generic rule using % twice not possible?
62 # $(outdir)/%/%.html: $(outdir)/%.texi
63 $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi
66 # Split manuals in HTML
68 $(outdir)/lilypond/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
69 $(outdir)/lilypond-learning/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
73 # Manuals in one big HTML page
75 $(outdir)/lilypond-big-page.html: $(OUT_PNG_IMAGES)
76 $(outdir)/lilypond-learning-big-page.html: $(OUT_PNG_IMAGES)
78 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
80 $(MAKEINFO) -I$(outdir) --output=$@ --docbook $<
82 $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
84 $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
86 $(outdir)/lilypond.pdf $(outdir)/lilypond-learning.pdf: $(OUT_PDF_IMAGES)
88 $(outdir)/%.png: %.png
89 convert -depth 8 -geometry 50x50% $< $@
91 $(outdir)/%.png: %.eps
92 gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
94 $(outdir)/%.pdf: %.png
95 convert -depth 8 $< $@
97 $(outdir)/%.pdf: %.eps
98 gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
102 $(outdir)/lilypond/index.html\
103 $(outdir)/lilypond-internals/index.html\
104 $(outdir)/music-glossary/index.html\
105 $(outdir)/lilypond-program/index.html\
106 $(outdir)/lilypond-learning/index.html
108 # Symlinks to refer to external source documents from split and non-split HTML
109 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source \
110 $(outdir)/lilypond-program/source $(outdir)/lilypond-learning/source
119 ln -sf $(depth)/.. $(@)
121 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
122 $(datafiles) $(PDF_FILES) $(source-links) info
124 $(outdir)/%.bib: %.bib
129 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
130 $(MAKE) -C $(top-src-dir)/mf
132 $(outdir)/lilypond.texi $(outdir)/lilypond-program.texi $(outdir)/lilypond-learning.texi $(outdir)/music-glossary.texi: $(ITELY_FILES) $(ITEXI_FILES)
135 # Rules for the automatically generated documentation
137 # There used to be a dependency on a dummy target, to force a rebuild
138 # of lilypond-internals every time. however, this triggers
139 # compilation during install, which is a bad thing (tm).
141 $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY)
142 cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
146 $(outdir)/interfaces.itexi: dummy
147 cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc