]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/GNUmakefile
* Documentation/user/music-glossary.tely: add @omf tags
[lilypond.git] / Documentation / user / GNUmakefile
1 # Documentation/tex/Makefile
2
3 depth=../..
4
5
6 LATEX_FILES =$(wildcard *.latex)
7
8 # todo: add latex.
9 DVI_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.dvi))
10
11 EXTRA_DIST_FILES= $(LATEX_FILES)
12
13 HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html))
14
15 PS_FILES = $(DVI_FILES:.dvi=.ps)
16 PDF_FILES = $(DVI_FILES:.dvi=.pdf)
17
18 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
19
20 INFO_DOCS = lilypond lilypond-internals music-glossary
21 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
22
23 STEPMAKE_TEMPLATES=tex texinfo omf documentation
24
25 OMF_FILES += $(outdir)/lilypond-internals.html.omf
26
27 LOCALSTEPMAKE_TEMPLATES=lilypond ly
28 LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"'
29
30 include $(depth)/make/stepmake.make 
31
32 # Ugh,ugh.
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))
36
37 dvi: $(DVI_FILES)
38
39 ps: $(PS_FILES)
40
41 # Cancel the default info generation rule.  We want to generate info
42 # from `.nexi', making sure we don't run LilyPond for inline pictures,
43 # when just generating info:
44
45 $(outdir)/%.info: $(outdir)/%.texi
46
47 default: 
48
49 # Info is now built by default via texinfo-rules.
50 # We must build them by default, otherwise they get built during make install
51 info: $(INFO_FILES)
52
53 local-help: extra-local-help
54
55 extra-local-help:
56         @echo -e "\
57   dvi         update dvi documents\n\
58   info        update info pages\n\
59   ps          update PostScript documents\n\
60 "
61
62 # Generic rule using % twice not possible?
63 # $(outdir)/%/%.html: $(outdir)/%.texi
64 $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi
65         mkdir -p $(dir $@)
66         $(MAKEINFO) --output=$@ --html $<
67         -cp -f $(outdir)/*.png $(outdir)/lilypond
68         -cp -f $(outdir)/lilypond/index.html $@
69         $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
70
71 $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi
72         mkdir -p $(dir $@)
73         $(MAKEINFO) --output=$@ --html $<
74         -cp -f $(outdir)/*.png $(outdir)/lilypond-internals
75         -cp -f $(outdir)/lilypond-internals/index.html $@
76         $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
77
78 ifeq ($(SPLITTING_MAKEINFO),yes)
79
80 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html
81
82 else
83
84 # Links referred to by Documentation index
85 LILYPOND_LINKS=Reference-Manual.html Tutorial.html Ly2dvi.html Midi2ly.html
86
87 local-WWW: deep-symlinks
88
89 deep-symlinks:
90         mkdir -p $(outdir)/lilypond
91         cd $(outdir)/lilypond && $(foreach i, $(LILYPOND_LINKS),\
92                 rm -f $(i) && ln -s lilypond.html $(i) &&) true
93
94 endif
95
96
97 local-WWW: $(HTML_FILES) $(datafiles) $(PDF_FILES) $(PS_GZ_FILES) $(DEEP_HTML_FILES) info-dir
98
99 local-WWW-clean: deep-WWW-clean
100
101 deep-WWW-clean:
102         rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
103
104 info-dir:
105         $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
106         $(MAKE) footify
107         $(MAKE) deep-footify
108
109
110 $(outdir)/%.bib: %.bib
111         ln -f $< $@
112 # we want footers even if website builds (or is built) partly
113         $(MAKE) footify
114
115 local-clean:
116         rm -f fonts.aux fonts.log feta*.tfm feta*.*pk 
117         rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
118
119 #$(outdir)/lilypond.nexi: $(outdir)/interfaces.itexi
120 #$(outdir)/lilypond.texi: $(outdir)/interfaces.itexi
121
122 # Rules for the automatically generated documentation
123 # When cross-compiling, we don't have lilypond, so we fake
124 ifneq ($(CROSS),yes)
125
126
127 # there used to be a dependency on a dummy target, to force a rebuild of lilypond-internals every time.
128 # however, this triggers compilation during install, which  is a bad thing (tm).
129
130 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(builddir)/lily/$(outconfbase)/lilypond
131         cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond --verbose $(abs-srcdir)/ly/generate-documentation
132         -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
133
134
135 ## unused
136 $(outdir)/interfaces.itexi: dummy
137         cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond $(abs-srcdir)/ly/generate-interface-doc
138
139 else
140
141 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
142         touch $@
143         touch $(outdir)/$(*F).nexi
144
145 $(outdir)/interfaces.itexi:
146         cp dummy-interfaces.itexi $@
147 endif
148
149