]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/GNUmakefile
* scripts/mup2ly.py: Cut-n-paste include missing lilylib.
[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_FILES = $(addprefix $(outdir)/, lilypond.info lilypond-internals.info)
21
22 STEPMAKE_TEMPLATES=tex texinfo documentation
23 LOCALSTEPMAKE_TEMPLATES=lilypond ly
24
25 # Hmm, what about?
26 # local-dist: check-info
27
28 info: #  check-info  # -> reinstate when actively hacking doco.
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
42 # Cancel default info generation rule.  We want to generate info from
43 # `.nexi', making sure we don't run LilyPond for inline pictures, when
44 # generating info.
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
54 # Generic rule using % twice not possible?
55 # $(outdir)/%/%.html: $(outdir)/%.texi
56 $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi
57         mkdir -p $(dir $@)
58         $(MAKEINFO) --output=$@ --html $<
59         -cp -f $(outdir)/*.png $(outdir)/lilypond
60         -cp -f $(outdir)/lilypond/index.html $@
61         $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
62
63 $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi
64         mkdir -p $(dir $@)
65         $(MAKEINFO) --output=$@ --html $<
66         -cp -f $(outdir)/*.png $(outdir)/lilypond-internals
67         -cp -f $(outdir)/lilypond-internals/index.html $@
68         $(deep-footify) $(shell find $(outdir)/$(*F)/*.html)
69
70 ifeq ($(SPLITTING_MAKEINFO),yes)
71
72 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html
73
74 else
75
76 # Links referred to by Documentation index
77 LILYPOND_LINKS=Reference-Manual.html Tutorial.html Ly2dvi.html Midi2ly.html
78
79 local-WWW: deep-symlinks
80
81 deep-symlinks:
82         mkdir -p $(outdir)/lilypond
83         cd $(outdir)/lilypond && $(foreach i, $(LILYPOND_LINKS),\
84                 rm -f $(i) && ln -s lilypond.html $(i) &&) true
85
86 endif
87
88
89 local-WWW: $(HTML_FILES) $(datafiles) $(PDF_FILES) $(PS_GZ_FILES) $(DEEP_HTML_FILES) info-dir
90
91 local-WWW-clean: deep-WWW-clean
92
93 deep-WWW-clean:
94         rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
95
96 info-dir:
97         $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
98         $(MAKE) footify
99         $(MAKE) deep-footify
100
101
102 $(outdir)/%.bib: %.bib
103         ln -f $< $@
104 # we want footers even if website builds (or is built) partly
105         $(MAKE) footify
106
107 local-clean:
108         rm -f fonts.aux fonts.log feta*.tfm feta*.*pk 
109         rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
110
111 #$(outdir)/lilypond.nexi: $(outdir)/interfaces.itexi
112 #$(outdir)/lilypond.texi: $(outdir)/interfaces.itexi
113
114 # Rules for the automatically generated documentation
115 # When cross-compiling, we don't have lilypond, so we fake
116 ifneq ($(CROSS),yes)
117
118
119 # there used to be a dependency on a dummy target, to force a rebuild of lilypond-internals every time.
120 # however, this triggers compilation during install, which  is a bad thing (tm).
121
122 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(builddir)/lily/$(outconfbase)/lilypond
123         cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond --verbose $(abs-srcdir)/ly/generate-documentation
124         -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
125
126
127 ## unused
128 $(outdir)/interfaces.itexi: dummy
129         cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond $(abs-srcdir)/ly/generate-interface-doc
130
131 else
132
133 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
134         touch $@
135         touch $(outdir)/$(*F).nexi
136
137 $(outdir)/interfaces.itexi:
138         cp dummy-interfaces.itexi $@
139 endif
140