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