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)
20 MASTER_TEXI_FILES = $(TELY_FILES:%.tely=$(outdir)/%.texi)\
21 $(outdir)/lilypond-internals.texi
23 HTML_FILES = $(TELY_FILES:%.tely=$(outdir)/%-big-page.html)\
24 $(outdir)/lilypond-internals-big-page.html
27 PDF_FILES = $(TELY_FILES:%.tely=$(outdir)/%.pdf)\
28 $(outdir)/lilypond-internals.pdf
30 MAIN_INFO_DOC = lilypond
31 INFO_DOCS = lilypond lilypond-internals music-glossary lilypond-program lilypond-learning
32 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
35 INFO_IMAGES_DIR = lilypond
36 DEST_INFO_IMAGES_SUBDIR = Documentation/user
39 STEPMAKE_TEMPLATES=texinfo omf documentation
40 OMF_FILES += $(outdir)/lilypond-internals.html.omf
42 LOCALSTEPMAKE_TEMPLATES=lilypond ly
44 include $(depth)/make/stepmake.make
49 @echo export LILYPOND_DATADIR=$(LILYPOND_DATADIR)
50 @echo export PYTHONPATH=$(PYTHONPATH)
52 xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
56 rm -f $(INFO_IMAGES_DIR)
58 local-help: extra-local-help
62 info update info pages\n\
63 xml update Docbook xml documentation\n\
66 $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi
69 # Split manuals in HTML
71 $(outdir)/lilypond/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
72 $(outdir)/lilypond-learning/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
76 # Manuals in one big HTML page
78 $(outdir)/lilypond-big-page.html: $(OUT_PNG_IMAGES)
79 $(outdir)/lilypond-learning-big-page.html: $(OUT_PNG_IMAGES)
81 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
83 $(MAKEINFO) -I$(outdir) --output=$@ --docbook $<
85 $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
87 $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
89 $(outdir)/lilypond.pdf $(outdir)/lilypond-learning.pdf: $(OUT_PDF_IMAGES)
91 $(outdir)/%.png: %.png
92 convert -depth 8 -geometry 50x50% $< $@
94 $(outdir)/%.png: %.eps
95 gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
97 $(outdir)/%.pdf: %.png
98 convert -depth 8 $< $@
100 $(outdir)/%.pdf: %.eps
101 gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
105 $(outdir)/lilypond/index.html\
106 $(outdir)/lilypond-internals/index.html\
107 $(outdir)/music-glossary/index.html\
108 $(outdir)/lilypond-program/index.html\
109 $(outdir)/lilypond-learning/index.html
111 # Symlinks to refer to external source documents from split and non-split HTML
112 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source \
113 $(outdir)/lilypond-program/source $(outdir)/lilypond-learning/source $(outdir)/lilypond-internals/source
122 ln -sf $(depth)/.. $(@)
124 local-WWW-1: $(MASTER_TEXI_FILES) $(PDF_FILES) info
126 local-WWW-2: $(HTML_FILES) $(DEEP_HTML_FILES) $(source-links)
128 $(outdir)/%.bib: %.bib
132 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
133 $(MAKE) -C $(top-src-dir)/mf
135 $(outdir)/lilypond.texi $(outdir)/lilypond-program.texi $(outdir)/lilypond-learning.texi $(outdir)/music-glossary.texi: $(ITELY_FILES) $(ITEXI_FILES)
138 # Rules for the automatically generated documentation
140 # There used to be a dependency on a dummy target, to force a rebuild
141 # of lilypond-internals every time. however, this triggers
142 # compilation during install, which is a bad thing (tm).
144 $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY)
145 cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation