1 # Documentation/tex/Makefile
7 LATEX_FILES =$(wildcard *.latex)
11 DVI_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.dvi))
13 EXTRA_DIST_FILES= $(LATEX_FILES) $(wildcard *.itexi *.itely)
15 HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html))
17 PS_FILES = $(DVI_FILES:.dvi=.ps) $(OUTDOC_FILES:.doc=.ps) $(OUTTEX_FILES:.tex=.ps)
19 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
21 INFO_FILES = $(addprefix $(outdir)/, lilypond.info lilypond-internals.info)
23 STEPMAKE_TEMPLATES=tex texinfo documentation
24 LOCALSTEPMAKE_TEMPLATES=lilypond ly
26 include $(depth)/make/stepmake.make
33 # Cancel default info generation rule. We want to generate info from
34 # `.nexi', making sure we don't run LilyPond for inline pictures, when
36 $(outdir)/%.info: $(outdir)/%.texi
40 # Info is now built by default via texinfo-rules.
41 # We must build them by default, otherwise they get built during make install
45 # The new pretest version of makeinfo, 4.0a splits html files into their own
46 # directory. Available from
47 # ftp://texinfo.org/texinfo/pretests/texinfo-4.0a.tar.gz
48 SPLITTING_MAKEINFO = $(shell makeinfo --version | egrep '4.0((.jcn[2,3])|a)')
51 # Generic rule using % twice not possible?
52 # $(outdir)/%/%.html: $(outdir)/%.texi
53 $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi
54 -$(MAKEINFO) --force --output=$@ --html $<
55 -cp -f $(outdir)/*.png $(outdir)/lilypond
56 -cp -f $(outdir)/lilypond/index.html $@
57 $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
59 $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi
60 -$(MAKEINFO) --force --output=$@ --html $<
61 -cp -f $(outdir)/*.png $(outdir)/lilypond-internals
62 -cp -f $(outdir)/lilypond-internals/index.html $@
63 $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
65 $(outdir)/features/features.html: $(outdir)/features.texi
66 -$(MAKEINFO) --force --output=$@ --html $<
67 -cp -f $(outdir)/*.png $(outdir)/features
68 -cp -f $(outdir)/features/index.html $@
69 $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
71 ifneq ($(SPLITTING_MAKEINFO),)
73 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html $(outdir)/features/features.html
77 DEEP_HTML_FILES = $(outdir)/lilypond.html $(outdir)/lilypond-internals.html
82 local-WWW: $(HTML_FILES) $(datafiles) $(PS_GZ_FILES) $(DEEP_HTML_FILES)
83 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals features
87 # $(PYTHON) $(step-bindir)/ls-latex.py --title 'User documentation' \
88 # $(DOC_FILES) $(TEX_FILES) $(TELY_FILES) \
89 # | sed "s!$(outdir)/!!g" > $(outdir)/index.html
93 $(outdir)/%.bib: %.bib
95 # we want footers even if website builds (or is built) partly
99 rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
100 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals $(outdir)/features
102 backdoc-WWW: $(outdir)/lilypond-internals/lilypond-internals.html
103 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
105 #ugh. lily/OUT/lilypond hardcoded.
106 # when cross-compiling, we don't have lilypond
108 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
109 cd $(outdir) && ../$(depth)/$(builddir)/lily/out/lilypond ../$(src-depth)/ly/generate-documentation
110 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
112 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
114 touch $(outdir)/$(*F).nexi