]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/GNUmakefile
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / Documentation / user / GNUmakefile
1 depth=../..
2
3 LATEX_FILES =$(call src-wildcard,*.latex)
4
5 # todo: add latex.
6 DVI_FILES = $(TELY_FILES:%.tely=$(outdir)/%.dvi)
7
8 EXTRA_DIST_FILES= $(LATEX_FILES) $(IMAGES) README.txt $(EPS_ILLUSTRATIONS)
9
10 IMAGES=$(call src-wildcard,*.png)
11 EPS_ILLUSTRATIONS=context-example.eps
12
13 OUT_EPS_IMAGES=$(IMAGES:%.png=$(outdir)/%.eps) $(addprefix $(outdir)/,$(EPS_ILLUSTRATIONS))
14 OUT_PNG_IMAGES=$(OUT_EPS_IMAGES:%.eps=%.png)
15
16 OUT_TEXI_FILES=$(ITEXI_FILES:%.itexi=$(outdir)/%.texi)\
17  $(ITELY_FILES:%.itely=$(outdir)/%.texi)
18 HTML_FILES = $(TELY_FILES:%.tely=$(outdir)/%.html)\
19  $(outdir)/lilypond-internals.html
20
21 PS_FILES = $(DVI_FILES:.dvi=.ps)
22 PDF_FILES = $(DVI_FILES:.dvi=.pdf)
23
24 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
25
26 INFO_DOCS = lilypond lilypond-internals music-glossary
27 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
28
29 STEPMAKE_TEMPLATES=tex texinfo omf documentation
30 #TEXI2DVI_FLAGS = -E
31 OMF_FILES += $(outdir)/lilypond-internals.html.omf
32
33 LOCALSTEPMAKE_TEMPLATES=lilypond ly
34
35
36 TEXINPUTS=$(top-src-dir)/tex::
37 export TEXINPUTS
38
39 include $(depth)/make/stepmake.make
40
41 dvi: $(DVI_FILES)
42
43 ps: $(PS_FILES)
44
45 info: $(INFO_FILES)
46
47 pathsettings:
48         @echo export PATH=$(PATH)
49         @echo export LILYPONDPREFIX=$(LILYPONDPREFIX)
50         @echo export PYTHONPATH=$(PYTHONPATH)
51
52 xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
53
54 # There are two modes for info: with and without images.
55 ifeq ($(out),www)
56
57 # This builds all .info targets with images, in out-www.
58 # Viewawble with a recent Emacs, doing: M-x info out-www/lilypond.info
59
60 # Cancel the special, non-image info generation rule that skips images:
61 $(outdir)/%.info: $(outdir)/%.nexi
62
63 local-install-info: info
64         -$(INSTALL) -d $(DESTDIR)$(package_infodir)
65 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
66 ## Can not have absolute symlinks because some binary packages build schemes
67 ## install files in nonstandard root.  Best we can do is to notify the
68 ## builder or packager.
69         @echo
70         @echo "***************************************************************"
71         @echo "Please add or update the LilyPond direntries, do"
72         @echo
73         @echo "    install-info --info-dir=$(infodir) $(outdir)/lilypond.info"
74         @echo
75         @echo "For images in the INFO docs to work, do: "
76         @echo
77         @echo "    (cd $(package_infodir) && ln -sf ../../doc/lilypond/Documentation/user/*png .)"
78         @echo "or add something like that to the postinstall script."
79         @echo
80 else
81         -$(INSTALL) -d $(DESTDIR)$(package_infodir)
82         -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
83         install-info --info-dir=$(infodir) $(outdir)/lilypond.info
84         (cd $(package_infodir) && ln -sf $(webdir)/Documentation/user/*png .)
85 endif
86
87 local-uninstall-WWW:
88         rm -f $(package_infodir)/*.png
89
90 else
91
92 # Cancel the default info generation rule that generates images:
93 $(outdir)/%.info: # $(outdir)/%.texi
94
95 local-install-info: info
96         -$(INSTALL) -d $(DESTDIR)$(package_infodir)
97 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
98 ## Can not have absolute symlinks because some binary packages build schemes
99 ## install files in nonstandard root.  Best we can do is to notify the
100 ## builder or packager.
101         @echo
102         @echo "***************************************************************"
103         @echo "Please add or update the LilyPond direntries, do"
104         @echo
105         @echo "    install-info --info-dir=$(infodir) out/lilypond.info"
106         @echo
107         @echo "For images in the INFO docs to work, do"
108         @echo
109         @echo "    make out=www install-info "
110         @echo
111         @echo "and read the extra instructions."
112         @echo
113 else
114         -$(INSTALL) -d $(DESTDIR)$(package_infodir)
115         -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
116         install-info --info-dir=$(infodir) $(outdir)/lilypond.info
117         @echo
118         @echo "***************************************************************"
119         @echo "For images in the INFO docs to work, do"
120         @echo
121         @echo "    make out=www install-info "
122         @echo
123 endif
124
125
126 endif
127
128 # All web targets, except info image symlinks and info docs are
129 # installed in non-recursing target from TOP-SRC-DIR
130 local-install-WWW: local-install-info
131 local-uninstall-WWW: local-uninstall-info
132
133 default:
134
135
136 local-help: extra-local-help
137
138 extra-local-help:
139         @echo -e "\
140   dvi         update dvi documents\n\
141   info        update info pages\n\
142   ps          update PostScript documents\n\
143   xml         update Docbook xml documentation\n\
144 "
145
146 # Generic rule using % twice not possible?
147 # $(outdir)/%/%.html: $(outdir)/%.texi
148 $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi
149 $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
150
151 #
152 # The split user manual
153 #
154 $(outdir)/lilypond/index.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
155         mkdir -p $(dir $@)
156         $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
157         find $(outdir)/lilypond/ -name '*'.png -o -name '*'.ly | xargs rm -f
158 # symbolic links to save space
159         (cd $(outdir)/lilypond/ ; ln -sf ../*.png ../*.ly . )
160
161 #
162 # One big page manual
163 #
164 $(outdir)/lilypond.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
165         $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
166
167 #
168 # The split internals reference
169 #
170 $(outdir)/lilypond-internals/index.html: $(outdir)/lilypond-internals.texi
171         mkdir -p $(dir $@)
172         $(MAKEINFO) --output=$(outdir)/lilypond-internals --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
173
174 #
175 # One big page internals reference
176 #
177 $(outdir)/lilypond-internals.html: $(outdir)/lilypond-internals.texi
178         $(MAKEINFO) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
179
180 #
181 # The split glossary
182 #
183 $(outdir)/music-glossary/index.html: $(outdir)/music-glossary.texi
184         mkdir -p $(dir $@)
185         $(MAKEINFO) --output=$(outdir)/music-glossary --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
186         find $(outdir)/music-glossary/ -name '*'.png -o -name '*'.ly | xargs rm -f
187 # symbolic links to save space
188         (cd $(outdir)/music-glossary/ ; ln -sf ../*.png ../*.ly . )
189
190 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
191         mkdir -p $(dir $@)
192         $(MAKEINFO) -I$(outdir) --output=$@ --docbook $<
193
194 $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
195         mkdir -p $(dir $@)
196         $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
197
198 $(outdir)/lilypond.dvi: $(OUT_EPS_IMAGES) $(OUT_PNG_IMAGES)
199
200 $(outdir)/%.png: %.png
201         convert -geometry 50x50% $< $@
202
203 $(outdir)/%.png: %.eps
204         convert $< $@
205
206 $(outdir)/%.eps: %.png
207         convert $< $@
208
209 $(outdir)/%.eps: %.eps
210         cp $< $@
211
212 DEEP_HTML_FILES =\
213  $(outdir)/lilypond/index.html\
214  $(outdir)/lilypond-internals/index.html\
215  $(outdir)/music-glossary/index.html
216
217 # Symlinks to refer to external source documents from split and non-split HTML
218 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source
219
220 $(outdir)/source:
221         @rm -f $(@)
222         ln -sf ../../ $(@)
223
224 $(outdir)/lilypond/source:
225         @rm -f $(@)
226         ln -sf ../../../ $(@)
227
228 $(outdir)/music-glossary/source:
229         @rm -f $(@)
230         ln -sf ../../../ $(@)
231
232 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
233  $(datafiles) $(PDF_FILES) $(source-links) info info-dir
234
235 local-WWW-clean: deep-WWW-clean
236
237 deep-WWW-clean:
238         rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
239
240 info-dir:
241         $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals music-glossary
242
243
244 $(outdir)/%.bib: %.bib
245         ln -f $< $@
246
247 local-clean:
248         rm -f fonts.aux fonts.log feta*.tfm feta*.*pk
249         rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals $(outdir)/music-glossary
250
251 # lilypond.texi deps
252 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
253         $(MAKE) -C $(top-src-dir)/mf
254
255 $(outdir)/lilypond.texi: $(ITELY_FILES) $(ITEXI_FILES)
256 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
257
258 # Prevent building music-glossary.texi from default target
259 $(outdir)/music-glossary.nexi:
260
261 # Rules for the automatically generated documentation
262
263 # There used to be a dependency on a dummy target, to force a rebuild
264 # of lilypond-internals every time.  however, this triggers
265 # compilation during install, which is a bad thing (tm).
266
267 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY)
268         cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation
269         rm -f $(outdir)/lilypond-internals.nexi
270         -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
271
272
273 ## unused
274 $(outdir)/interfaces.itexi: dummy
275         cd $(outdir) && lilypond $(top-src-dir)/ly/generate-interface-doc
276
277
278 local-clean: local-delete
279
280 local-delete:
281         find $(outdir)/ -name 'lily-[0-9]*' | xargs rm -f
282         -rm -f $(outdir)/*