]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/GNUmakefile
(updated_grob_properties): new
[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) $(IMAGES)
12 IMAGES=$(wildcard *.png)
13
14 OUT_EPS_IMAGES=$(addprefix $(outdir)/,$(IMAGES:.png=.eps))
15 OUT_PNG_IMAGES=$(addprefix $(outdir)/,$(IMAGES))
16
17 HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html))
18
19 PS_FILES = $(DVI_FILES:.dvi=.ps)
20 PDF_FILES = $(DVI_FILES:.dvi=.pdf)
21
22 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
23
24 INFO_DOCS = lilypond lilypond-internals music-glossary
25 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
26
27 STEPMAKE_TEMPLATES=tex texinfo omf documentation
28
29 OMF_FILES += $(outdir)/lilypond-internals.html.omf
30
31 LOCALSTEPMAKE_TEMPLATES=lilypond ly
32 LILYPOND_BOOK_FLAGS = --process="lilypond-bin -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"
33
34 include $(depth)/make/stepmake.make 
35
36 dvi: $(DVI_FILES)
37
38 ps: $(PS_FILES)
39
40 # Cancel the default info generation rule.  We want to generate info
41 # from `.nexi', making sure we don't run LilyPond for inline pictures,
42 # when just generating info:
43
44 $(outdir)/%.info: $(outdir)/%.texi
45
46 default: 
47
48 # Info is now built by default via texinfo-rules.
49 # We must build them by default, otherwise they get built during make install
50 info: $(INFO_FILES)
51
52 local-help: extra-local-help
53
54 extra-local-help:
55         @echo -e "\
56   dvi         update dvi documents\n\
57   info        update info pages\n\
58   ps          update PostScript documents\n\
59 "
60
61 # Generic rule using % twice not possible?
62 # $(outdir)/%/%.html: $(outdir)/%.texi
63 $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi 
64         mkdir -p $(dir $@)
65         $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --html $<
66         $(MAKEINFO) -I$(outdir) --output=$@ --html --no-split --no-headers $<
67         -ln -f $(outdir)/*.png $(outdir)/*.ly $(outdir)/lilypond/
68
69 $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi
70         mkdir -p $(dir $@)
71         $(MAKEINFO) --output=$(outdir)/lilypond-internals --html $<
72         $(MAKEINFO) -I$(outdir) --output=$@ --html --no-split --no-headers $<
73
74 ifeq ($(SPLITTING_MAKEINFO),yes)
75
76 $(outdir)/lilypond.dvi: $(OUT_EPS_IMAGES) $(OUT_PNG_IMAGES)
77
78 $(outdir)/%.png: %.png
79         convert -geometry 50x50% $< $@
80
81 $(outdir)/%.eps: %.png
82         convert $< $@
83
84 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html
85
86 else
87
88 # Links referred to by Documentation index
89 LILYPOND_LINKS=Reference-Manual.html Tutorial.html Ly2dvi.html Midi2ly.html
90
91 local-WWW: outimages deep-symlinks
92
93 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
97
98 endif
99
100
101 local-WWW: $(HTML_FILES) $(datafiles) $(PDF_FILES) $(PS_GZ_FILES) $(DEEP_HTML_FILES) info-dir
102
103 local-WWW-clean: deep-WWW-clean
104
105 deep-WWW-clean:
106         rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
107
108 info-dir:
109         $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
110
111
112 $(outdir)/%.bib: %.bib
113         ln -f $< $@
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 # lilypond.texi deps
120 $(builddir)/mf/$(outconfbase)/feta16list.ly:
121         $(MAKE) -C $(topdir)/mf
122
123 $(outdir)/lilypond.texi: $(ITELY_FILES) macros.itexi 
124
125 # Rules for the automatically generated documentation
126 # When cross-compiling, we don't have lilypond, so we fake
127 ifneq ($(CROSS),yes)
128
129
130 # There used to be a dependency on a dummy target, to force a rebuild
131 # of lilypond-internals every time.  however, this triggers
132 # compilation during install, which is a bad thing (tm).
133
134 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(builddir)/lily/$(outconfbase)/lilypond-bin
135         cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond-bin --verbose $(abs-srcdir)/ly/generate-documentation
136         -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
137
138
139 ## unused
140 $(outdir)/interfaces.itexi: dummy
141         cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond-bin $(abs-srcdir)/ly/generate-interface-doc
142
143 else
144
145 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
146         touch $@
147         touch $(outdir)/$(*F).nexi
148
149 $(outdir)/interfaces.itexi:
150         cp dummy-interfaces.itexi $@
151 endif
152
153
154 local-clean: local-delete
155
156 local-delete:
157         -rm -f $(outdir)/lily-1*
158         -rm -f $(outdir)/*