1 # Documentation/tex/Makefile
6 LATEX_FILES =$(wildcard *.latex)
9 DVI_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.dvi))
11 EXTRA_DIST_FILES= $(LATEX_FILES) $(wildcard *.itexi *.itely)
13 HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html))
15 PS_FILES = $(DVI_FILES:.dvi=.ps)
17 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
19 INFO_FILES = $(addprefix $(outdir)/, lilypond.info lilypond-internals.info)
21 STEPMAKE_TEMPLATES=tex texinfo documentation
22 LOCALSTEPMAKE_TEMPLATES=lilypond ly
25 # local-dist: check-info
29 include $(depth)/make/stepmake.make
32 # emacs cannot fix the menu structure when @mbinclude is used
33 # lilypond.tely uses mbinclude
34 TEXINFO_SOURCES := $(filter-out lilypond.tely, $(TEXINFO_SOURCES))
41 # Cancel default info generation rule. We want to generate info from
42 # `.nexi', making sure we don't run LilyPond for inline pictures, when
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
53 # Generic rule using % twice not possible?
54 # $(outdir)/%/%.html: $(outdir)/%.texi
55 $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi
56 $(MAKEINFO) --output=$@ --html $<
57 -cp -f $(outdir)/*.png $(outdir)/lilypond
58 -cp -f $(outdir)/lilypond/index.html $@
59 $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
61 $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi
62 $(MAKEINFO) --output=$@ --html $<
63 -cp -f $(outdir)/*.png $(outdir)/lilypond-internals
64 -cp -f $(outdir)/lilypond-internals/index.html $@
65 $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
68 ifeq ($(SPLITTING_MAKEINFO),yes)
70 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html
72 local-WWW: rm-deep-symlinks
75 cd $(outdir) && rm -f lilypond lilypond-internals; true
79 DEEP_HTML_FILES = $(outdir)/lilypond.html $(outdir)/lilypond-internals.html
81 # Links referred to by Documentation index
82 LILYPOND_LINKS=Reference-Manual.html Tutorial.html Ly2dvi.html Midi2ly.html
84 local-WWW: deep-symlinks
87 cd $(outdir) && rm -f lilypond && ln -s . lilypond
88 cd $(outdir) && rm -f lilypond-internals && ln -s . lilypond-internals
89 cd $(outdir) && $(foreach i, $(LILYPOND_LINKS),\
90 rm -f $(i) && ln -s lilypond.html $(i) &&) true
94 local-WWW: $(HTML_FILES) $(datafiles) $(PS_GZ_FILES) $(DEEP_HTML_FILES) info-dir
96 local-WWW-clean: deep-WWW-clean
99 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
102 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
107 $(outdir)/%.bib: %.bib
109 # we want footers even if website builds (or is built) partly
113 rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
114 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
116 #$(outdir)/lilypond.nexi: $(outdir)/interfaces.itexi
117 #$(outdir)/lilypond.texi: $(outdir)/interfaces.itexi
119 # Rules for the automatically generated documentation
120 # When cross-compiling, we don't have lilypond, so we fake
124 # there used to be a dependency on a dummy target, to force a rebuild of lilypond-internals every time.
125 # however, this triggers compilation during install, which is a bad thing (tm).
127 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(depth)/$(builddir)/lily/$(outconfbase)/lilypond
128 cd $(outdir) && ../$(depth)/$(builddir)/lily/$(outconfbase)/lilypond ../$(src-depth)/ly/generate-documentation
129 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
133 $(outdir)/interfaces.itexi: dummy
134 cd $(outdir) && ../$(depth)/$(builddir)/lily/$(outconfbase)/lilypond ../$(src-depth)/ly/generate-interface-doc
138 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
140 touch $(outdir)/$(*F).nexi
142 $(outdir)/interfaces.itexi:
143 cp dummy-interfaces.itexi $@