]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/GNUmakefile
d8d035834e74c555c8e2e22da39f17a726957ec5
[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
38 default: 
39
40 # Info is now built by default via texinfo-rules.
41 # We must build them by default, otherwise they get built during make install
42 info: $(INFO_FILES)
43
44
45 # The next version of makeinfo should split html files into their own
46 # directory.  For now available only as patches from
47 # http://appel.lilypond.org/software
48 SPLITTING_MAKEINFO = $(shell makeinfo --version | grep '4.0.jcn[2,3]')
49
50
51 # Generic rule using % twice not possible?
52 # $(outdir)/%/%.html: $(outdir)/%.texi
53 $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi
54         -$(MAKEINFO) --force --output=$@ --html $<
55         -mv -f $(outdir)/*.png $(outdir)/lilypond
56         $(deep-footify) $(sort $(wildcard $(outdir)/$(*F)/*.html))
57
58 $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi
59         -$(MAKEINFO) --force --output=$@ --html $<
60         -mv -f $(outdir)/*.png $(outdir)/lilypond-internals
61         $(deep-footify) $(sort $(wildcard $(outdir)/$(*F)/*.html))
62
63 $(outdir)/features/features.html: $(outdir)/features.texi
64         -$(MAKEINFO) --force --output=$@ --html $<
65         -mv -f $(outdir)/*.png $(outdir)/features
66         $(deep-footify) $(sort $(wildcard $(outdir)/$(*F)/*.html))
67
68 ifneq ($(SPLITTING_MAKEINFO),)
69
70 DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html $(outdir)/features/features.html
71
72 else
73
74 DEEP_HTML_FILES = $(outdir)/lilypond.html $(outdir)/lilypond-internals.html
75
76 endif
77
78
79 local-WWW: $(HTML_FILES) $(datafiles) $(PS_GZ_FILES) $(DEEP_HTML_FILES)
80         $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
81         $(MAKE) footify
82         $(MAKE) deep-footify
83
84 #       $(PYTHON) $(step-bindir)/ls-latex.py --title 'User documentation' \
85 #          $(DOC_FILES) $(TEX_FILES) $(TELY_FILES) \
86 #         | sed "s!$(outdir)/!!g" > $(outdir)/index.html
87
88
89
90 $(outdir)/%.bib: %.bib
91         ln -f $< $@
92 # we want footers even if website builds (or is built) partly
93         $(MAKE) footify
94
95 localclean:
96         rm -f fonts.aux fonts.log feta*.tfm feta*.*pk 
97
98 backdoc-WWW: $(outdir)/lilypond-internals/lilypond-internals.html
99         $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
100
101 #ugh. lily/OUT/lilypond hardcoded.
102 # when cross-compiling, we don't have lilypond
103 ifneq ($(CROSS),yes)
104 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
105         cd $(outdir) && ../$(depth)/$(builddir)/lily/out/lilypond ../$(src-depth)/ly/generate-documentation
106         -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
107 else
108 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
109         touch $@
110         touch $(outdir)/$(*F).nexi
111 endif
112