1 # Documentation/tex/Makefile
6 LATEX_FILES =$(wildcard *.latex)
10 DVI_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.dvi))
12 EXTRA_DIST_FILES= $(LATEX_FILES) $(wildcard *.itexi *.itely)
14 HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html))
16 PS_FILES = $(DVI_FILES:.dvi=.ps) $(OUTDOC_FILES:.doc=.ps) $(OUTTEX_FILES:.tex=.ps)
18 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
20 INFO_FILES = $(addprefix $(outdir)/, lilypond.info lilypond-internals.info)
22 STEPMAKE_TEMPLATES=tex texinfo documentation
23 LOCALSTEPMAKE_TEMPLATES=lilypond ly
25 include $(depth)/make/stepmake.make
32 # Cancel default info generation rule. We want to generate info from
33 # `.nexi', making sure we don't run LilyPond for inline pictures, when
35 $(outdir)/%.info: $(outdir)/%.texi
39 # Info is now built by default via texinfo-rules.
40 # We must build them by default, otherwise they get built during make install
44 # The new pretest version of makeinfo, 4.0a splits html files into their own
45 # directory. Available from
46 # ftp://texinfo.org/texinfo/pretests/texinfo-4.0a.tar.gz
47 SPLITTING_MAKEINFO = $(shell makeinfo --version | egrep '4.0((.jcn[2,3])|a)')
50 # Generic rule using % twice not possible?
51 # $(outdir)/%/%.html: $(outdir)/%.texi
52 $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi
53 -$(MAKEINFO) --force --output=$@ --html $<
54 -cp -f $(outdir)/*.png $(outdir)/lilypond
55 -cp -f $(outdir)/lilypond/index.html $@
56 $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
58 $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi
59 -$(MAKEINFO) --force --output=$@ --html $<
60 -cp -f $(outdir)/*.png $(outdir)/lilypond-internals
61 -cp -f $(outdir)/lilypond-internals/index.html $@
62 $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
64 ifneq ($(SPLITTING_MAKEINFO),)
66 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html
70 DEEP_HTML_FILES = $(outdir)/lilypond.html $(outdir)/lilypond-internals.html
72 local-WWW: deep-symlinks
76 # Links referred to by Documentation index
77 LILYPOND_LINKS=Reference-Manual.html Features.html Ly2dvi.html Midi2ly.html
80 cd $(outdir) && rm -f lilypond && ln -s . lilypond
81 cd $(outdir) && rm -f lilypond-internals && ln -s . lilypond-internals
82 cd $(outdir) && $(foreach i, $(LILYPOND_LINKS),\
83 rm -f $(i) && ln -s $(i) lilypond.html &&) true
87 local-WWW: $(HTML_FILES) $(datafiles) $(PS_GZ_FILES) $(DEEP_HTML_FILES)
88 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
92 # $(PYTHON) $(step-bindir)/ls-latex.py --title 'User documentation' \
93 # $(DOC_FILES) $(TEX_FILES) $(TELY_FILES) \
94 # | sed "s!$(outdir)/!!g" > $(outdir)/index.html
98 $(outdir)/%.bib: %.bib
100 # we want footers even if website builds (or is built) partly
104 rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
105 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
107 backdoc-WWW: $(outdir)/lilypond-internals/lilypond-internals.html
108 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
110 #ugh. lily/OUT/lilypond hardcoded.
111 # when cross-compiling, we don't have lilypond
113 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
114 cd $(outdir) && ../$(depth)/$(builddir)/lily/out/lilypond ../$(src-depth)/ly/generate-documentation
115 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
117 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
119 touch $(outdir)/$(*F).nexi