1 # Documentation/tex/Makefile
6 LATEX_FILES =$(wildcard *.latex)
9 DVI_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.dvi))
11 EXTRA_DIST_FILES= $(LATEX_FILES) $(IMAGES)
12 IMAGES=$(wildcard *.png)
14 OUT_EPS_IMAGES=$(addprefix $(outdir)/,$(IMAGES:.png=.eps))
15 OUT_PNG_IMAGES=$(addprefix $(outdir)/,$(IMAGES))
17 HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html))
19 PS_FILES = $(DVI_FILES:.dvi=.ps)
20 PDF_FILES = $(DVI_FILES:.dvi=.pdf)
22 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
24 INFO_DOCS = lilypond lilypond-internals music-glossary
25 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
27 STEPMAKE_TEMPLATES=tex texinfo omf documentation
29 OMF_FILES += $(outdir)/lilypond-internals.html.omf
31 LOCALSTEPMAKE_TEMPLATES=lilypond ly
32 LILYPOND_BOOK_FLAGS = --process="lilypond-bin -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"
34 include $(depth)/make/stepmake.make
40 # Cancel the default info generation rule. We want to generate info
41 # from `.nexi', making sure we don't run LilyPond for inline pictures,
42 # when just generating info:
44 $(outdir)/%.info: $(outdir)/%.texi
48 # Info is now built by default via texinfo-rules.
49 # We must build them by default, otherwise they get built during make install
52 local-help: extra-local-help
56 dvi update dvi documents\n\
57 info update info pages\n\
58 ps update PostScript documents\n\
61 # Generic rule using % twice not possible?
62 # $(outdir)/%/%.html: $(outdir)/%.texi
63 $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi
64 $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
67 $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi
69 $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --html $<
70 $(MAKEINFO) -I$(outdir) --output=$@ --html --no-split --no-headers $<
71 rm -f $(outdir)/lilypond/*.png $(outdir)/lilypond/*.ly
72 -ln -f $(outdir)/*.png $(outdir)/*.ly $(outdir)/lilypond/
74 $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi
76 $(MAKEINFO) --output=$(outdir)/lilypond-internals --html $<
77 $(MAKEINFO) -I$(outdir) --output=$@ --html --no-split --no-headers $<
79 ifeq ($(SPLITTING_MAKEINFO),yes)
81 $(outdir)/lilypond.dvi: $(OUT_EPS_IMAGES) $(OUT_PNG_IMAGES)
83 $(outdir)/%.png: %.png
84 convert -geometry 50x50% $< $@
86 $(outdir)/%.eps: %.png
89 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html
93 # Links referred to by Documentation index
94 LILYPOND_LINKS=Reference-Manual.html Tutorial.html Ly2dvi.html Midi2ly.html
96 local-WWW: outimages deep-symlinks
99 mkdir -p $(outdir)/lilypond
100 cd $(outdir)/lilypond && $(foreach i, $(LILYPOND_LINKS),\
101 rm -f $(i) && ln -s lilypond.html $(i) &&) true
106 local-WWW: $(HTML_FILES) $(datafiles) $(PDF_FILES) $(PS_GZ_FILES) $(DEEP_HTML_FILES) info-dir
108 local-WWW-clean: deep-WWW-clean
111 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
114 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
117 $(outdir)/%.bib: %.bib
121 rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
122 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
125 $(builddir)/mf/$(outconfbase)/feta16list.ly:
126 $(MAKE) -C $(topdir)/mf
128 $(outdir)/lilypond.texi: $(ITELY_FILES) macros.itexi
130 # Rules for the automatically generated documentation
131 # When cross-compiling, we don't have lilypond, so we fake
135 # There used to be a dependency on a dummy target, to force a rebuild
136 # of lilypond-internals every time. however, this triggers
137 # compilation during install, which is a bad thing (tm).
139 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(builddir)/lily/$(outconfbase)/lilypond-bin
140 cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond-bin --verbose $(abs-srcdir)/ly/generate-documentation
141 rm -f $(outdir)/lilypond-internals.nexi
142 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
146 $(outdir)/interfaces.itexi: dummy
147 cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond-bin $(abs-srcdir)/ly/generate-interface-doc
151 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
153 touch $(outdir)/$(*F).nexi
155 $(outdir)/interfaces.itexi:
156 cp dummy-interfaces.itexi $@
160 local-clean: local-delete
163 -rm -f $(outdir)/lily-1*