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 *-suite1-line.*)
13 HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html))
15 PS_FILES = $(DVI_FILES:.dvi=.ps)
16 PDF_FILES = $(DVI_FILES:.dvi=.pdf)
18 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
20 INFO_DOCS = lilypond lilypond-internals music-glossary
21 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
23 STEPMAKE_TEMPLATES=tex texinfo omf documentation
25 OMF_FILES += $(outdir)/lilypond-internals.html.omf
27 LOCALSTEPMAKE_TEMPLATES=lilypond ly
28 LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"'
30 include $(depth)/make/stepmake.make
33 # emacs cannot fix the menu structure when @mbinclude is used
34 # lilypond.tely uses mbinclude
35 TEXINFO_SOURCES := $(filter-out lilypond.tely, $(TEXINFO_SOURCES))
39 # cp $(IMAGES) $(outdir)
45 # Cancel the default info generation rule. We want to generate info
46 # from `.nexi', making sure we don't run LilyPond for inline pictures,
47 # when just generating info:
49 $(outdir)/%.info: $(outdir)/%.texi
53 # Info is now built by default via texinfo-rules.
54 # We must build them by default, otherwise they get built during make install
57 local-help: extra-local-help
61 dvi update dvi documents\n\
62 info update info pages\n\
63 ps update PostScript documents\n\
66 # Generic rule using % twice not possible?
67 # $(outdir)/%/%.html: $(outdir)/%.texi
68 $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi outimages
70 $(MAKEINFO) --output=$(outdir)/lilypond --html $<
71 -cp -f $(outdir)/*.{png,ly} $(outdir)/lilypond
72 -cp -f $(outdir)/lilypond/index.html $@
73 $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
75 $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi
77 $(MAKEINFO) --output=$(outdir)/lilypond-internals --html $<
78 -cp -f $(outdir)/*.{png,ly} $(outdir)/lilypond-internals
79 -cp -f $(outdir)/lilypond-internals/index.html $@
80 $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
82 ifeq ($(SPLITTING_MAKEINFO),yes)
84 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html
88 # Links referred to by Documentation index
89 LILYPOND_LINKS=Reference-Manual.html Tutorial.html Ly2dvi.html Midi2ly.html
91 local-WWW: outimages deep-symlinks
94 mkdir -p $(outdir)/lilypond
95 cd $(outdir)/lilypond && $(foreach i, $(LILYPOND_LINKS),\
96 rm -f $(i) && ln -s lilypond.html $(i) &&) true
101 local-WWW: $(HTML_FILES) $(datafiles) $(PDF_FILES) $(PS_GZ_FILES) $(DEEP_HTML_FILES) info-dir
103 local-WWW-clean: deep-WWW-clean
106 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
109 $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
114 $(outdir)/%.bib: %.bib
116 # we want footers even if website builds (or is built) partly
120 rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
121 rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
123 #$(outdir)/lilypond.nexi: $(outdir)/interfaces.itexi
124 #$(outdir)/lilypond.texi: $(outdir)/interfaces.itexi
126 # Rules for the automatically generated documentation
127 # When cross-compiling, we don't have lilypond, so we fake
131 # there used to be a dependency on a dummy target, to force a rebuild of lilypond-internals every time.
132 # however, this triggers compilation during install, which is a bad thing (tm).
134 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(builddir)/lily/$(outconfbase)/lilypond
135 cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond --verbose $(abs-srcdir)/ly/generate-documentation
136 -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
140 $(outdir)/interfaces.itexi: dummy
141 cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond $(abs-srcdir)/ly/generate-interface-doc
145 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
147 touch $(outdir)/$(*F).nexi
149 $(outdir)/interfaces.itexi:
150 cp dummy-interfaces.itexi $@