]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/GNUmakefile
patch::: 1.3.119.jcn2
[lilypond.git] / Documentation / user / GNUmakefile
1 # Documentation/tex/Makefile
2
3 depth=../..
4
5
6
7 LATEX_FILES =$(wildcard *.latex)
8
9
10 # todo: add latex.
11 DVI_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.dvi))
12
13 EXTRA_DIST_FILES= $(LATEX_FILES)    $(wildcard *.itexi *.itely)
14
15 HTML_FILES = $(addprefix $(outdir)/, $(TELY_FILES:.tely=.html))
16
17 PS_FILES = $(DVI_FILES:.dvi=.ps)  $(OUTDOC_FILES:.doc=.ps) $(OUTTEX_FILES:.tex=.ps)
18
19 PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
20
21 INFO_FILES = $(addprefix $(outdir)/, lilypond.info lilypond-internals.info)
22
23 STEPMAKE_TEMPLATES=tex texinfo documentation
24 LOCALSTEPMAKE_TEMPLATES=lilypond ly
25
26 include $(depth)/make/stepmake.make 
27
28 dvi: $(DVI_FILES)
29
30 ps: $(PS_FILES)
31
32
33 # Cancel default info generation rule.  We want to generate info from
34 # `.nexi', making sure we don't run LilyPond for inline pictures, when
35 # generating info.
36 $(outdir)/%.info: $(outdir)/%.texi
37 # Cancel default dvi rule, we use lilypond-book.
38 $(outdir)/%.dvi: $(outdir)/%.texi
39
40 default: 
41
42 # Info is now built by default via texinfo-rules.
43 # We must build them by default, otherwise they get built during make install
44 info: $(INFO_FILES)
45
46
47 # The next version of makeinfo should split html files into their own
48 # directory.  For now available only as patches from
49 # http://appel.lilypond.org/software
50 SPLITTING_MAKEINFO = $(shell makeinfo --version | grep '4.0.jcn[2,3]')
51
52
53 # Generic rule using % twice not possible?
54 # $(outdir)/%/%.html: $(outdir)/%.texi
55 $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi
56         -$(MAKEINFO) --force --output=$@ --html $<
57         -mv -f $(outdir)/*.png $(outdir)/lilypond
58         $(deep-footify) $(sort $(wildcard $(outdir)/$(*F)/*.html))
59
60 $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi
61         -$(MAKEINFO) --force --output=$@ --html $<
62         -mv -f $(outdir)/*.png $(outdir)/lilypond-internals
63         $(deep-footify) $(sort $(wildcard $(outdir)/$(*F)/*.html))
64
65 $(outdir)/features/features.html: $(outdir)/features.texi
66         -$(MAKEINFO) --force --output=$@ --html $<
67         -mv -f $(outdir)/*.png $(outdir)/features
68         $(deep-footify) $(sort $(wildcard $(outdir)/$(*F)/*.html))
69
70 ifneq ($(SPLITTING_MAKEINFO),)
71
72 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html $(outdir)/features/features.html
73
74 else
75
76 DEEP_HTML_FILES = $(outdir)/lilypond.html $(outdir)/lilypond-internals.html
77
78 endif
79
80
81 local-WWW: $(HTML_FILES) $(datafiles) $(PS_GZ_FILES) $(DEEP_HTML_FILES)
82         $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
83         $(MAKE) footify
84         $(MAKE) deep-footify
85
86 #       $(PYTHON) $(step-bindir)/ls-latex.py --title 'User documentation' \
87 #          $(DOC_FILES) $(TEX_FILES) $(TELY_FILES) \
88 #         | sed "s!$(outdir)/!!g" > $(outdir)/index.html
89
90
91
92 $(outdir)/%.bib: %.bib
93         ln -f $< $@
94 # we want footers even if website builds (or is built) partly
95         $(MAKE) footify
96
97 localclean:
98         rm -f fonts.aux fonts.log feta*.tfm feta*.*pk 
99
100 backdoc-WWW: $(outdir)/lilypond-internals/lilypond-internals.html
101         $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
102
103 #ugh. lily/OUT/lilypond hardcoded.
104 # when cross-compiling, we don't have lilypond
105 ifneq ($(CROSS),yes)
106 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
107         cd $(outdir) && ../$(depth)/$(builddir)/lily/out/lilypond ../$(src-depth)/ly/generate-documentation
108         -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
109 else
110 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
111         touch $@
112         touch $(outdir)/$(*F).nexi
113 endif
114