]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/GNUmakefile
patch::: 1.3.122.jcn3
[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 local-WWW: deep-symlinks
73
74 deep-symlinks:
75         cd $(outdir) && rm -f lilypond && ln -s . lilypond
76         cd $(outdir) && rm -f lilypond-internals && ln -s . lilypond-internals
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         rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals
100
101 backdoc-WWW: $(outdir)/lilypond-internals/lilypond-internals.html
102         $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals
103
104 #ugh. lily/OUT/lilypond hardcoded.
105 # when cross-compiling, we don't have lilypond
106 ifneq ($(CROSS),yes)
107 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
108         cd $(outdir) && ../$(depth)/$(builddir)/lily/out/lilypond ../$(src-depth)/ly/generate-documentation
109         -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
110 else
111 $(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi:
112         touch $@
113         touch $(outdir)/$(*F).nexi
114 endif
115