]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/essay/GNUmakefile
Doc: move essay into its own manual.
[lilypond.git] / Documentation / essay / GNUmakefile
1 depth=../..
2
3 LATEX_FILES =$(call src-wildcard,*.latex)
4
5
6 EXTRA_DIST_FILES = $(LATEX_FILES) $(IMAGES) $(EPS_ILLUSTRATIONS)
7
8 IMAGES=$(call src-wildcard,*.png)
9 EPS_ILLUSTRATIONS=
10 PDF_ILLUSTRATIONS=
11
12 OUT_PDF_IMAGES=$(IMAGES:%.png=$(outdir)/%.pdf) $(addprefix $(outdir)/,$(PDF_ILLUSTRATIONS))
13
14 OUT_PNG_IMAGES=$(OUT_PDF_IMAGES:%.pdf=%.png)
15
16 #OUT_MASTER_TEXI_FILES = $(outdir)/lilypond-internals.texi
17 OUT_TEXI_FILES=$(ITEXI_FILES:%.itexi=$(outdir)/%.texi)\
18  $(ITELY_FILES:%.itely=$(outdir)/%.texi)
19
20 HTML_FILES = $(TELY_FILES:%.tely=$(outdir)/%-big-page.html)\
21
22 # $(outdir)/lilypond-internals-big-page.html
23
24 # todo: add latex.
25 PDF_FILES = $(TELY_FILES:%.tely=$(outdir)/%.pdf)\
26
27 # $(outdir)/lilypond-internals.pdf
28
29 MAIN_INFO_DOC = lilypond-essay
30 INFO_DOCS = lilypond-essay
31 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
32
33 TEXI2PDF_FLAGS = \
34   -I $(outdir) \
35   -I $(top-src-dir)/Documentation/essay \
36   -I $(top-build-dir)/Documentation/essay/$(outconfbase)
37
38 ifeq ($(out),www)
39 INFO_IMAGES_DIR = lilypond
40 DEST_INFO_IMAGES_SUBDIR = Documentation/essay
41 endif
42
43 STEPMAKE_TEMPLATES=texinfo documentation
44 #OMF_FILES += $(outdir)/lilypond-internals.html.omf
45
46 LOCALSTEPMAKE_TEMPLATES=lilypond ly
47
48 include $(depth)/make/stepmake.make
49
50 default:
51
52 info: $(INFO_FILES)
53         @echo export LILYPOND_DATADIR=$(LILYPOND_DATADIR)
54         @echo export PYTHONPATH=$(PYTHONPATH)
55
56 xml: $(outdir)/lilypond-essay/lilypond.xml
57 #xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
58
59
60 local-clean:
61         rm -f $(INFO_IMAGES_DIR)
62
63 local-help: extra-local-help
64
65 extra-local-help:
66         @echo -e "\
67   info        update info pages\n\
68   xml         update Docbook xml documentation\n\
69 "
70
71 #
72 # Split manuals in HTML
73 #
74 $(outdir)/lilypond-essay/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
75 #$(outdir)/lilypond-learning/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
76
77
78 #
79 # Manuals in one big HTML page
80 #
81 $(outdir)/lilypond-essay-big-page.html: $(OUT_PNG_IMAGES)
82 #$(outdir)/lilypond-learning-big-page.html: $(OUT_PNG_IMAGES)
83
84 $(outdir)/lilypond.xml: $(outdir)/lilypond-essay.texi
85         mkdir -p $(dir $@)
86         $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ --docbook $<
87
88 #$(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internals.texi
89 #       mkdir -p $(dir $@)
90 #       $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$(outdir)/lilypond-internals --docbook $<
91
92 $(outdir)/lilypond-essay.pdf: $(OUT_PDF_IMAGES)
93
94 $(outdir)/%.png: %.png
95         convert -depth 8 -geometry 50x50% $< $@
96
97 $(outdir)/%.png: %.eps
98         gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=$@ -sDEVICE=png16m -dEPSCrop -dNOPAUSE -f $< -c quit
99
100 $(outdir)/%.pdf: %.png
101         convert -depth 8 $< $@
102
103 $(outdir)/%.pdf: %.eps
104         gs -dAutoRotatePages=/None -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ -dEPSCrop -c .setpdfwrite -f $<
105
106
107 DEEP_HTML_FILES =\
108  $(outdir)/lilypond-essay/index.html\
109
110 # $(outdir)/lilypond/index.html\
111 # $(outdir)/lilypond-internals/index.html\
112 # $(outdir)/music-glossary/index.html\
113 # $(outdir)/lilypond-program/index.html\
114 # $(outdir)/lilypond-learning/index.html
115
116 # Symlinks to refer to external source documents from split and non-split HTML
117 source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source \
118  $(outdir)/lilypond-program/source $(outdir)/lilypond-learning/source $(outdir)/lilypond-internals/source
119
120
121 $(outdir)/source:
122         @rm -f $(@)
123         ln -sf $(depth) $(@)
124
125 $(outdir)/%/source:
126         @rm -f $(@)
127         mkdir -p $(dir $@)
128         ln -sf $(depth)/.. $(@)
129
130 ifeq ($(out),www)
131 local-WWW-1: $(MASTER_TEXI_FILES) $(PDF_FILES) info
132
133 local-WWW-2: $(HTML_FILES) $(DEEP_HTML_FILES) $(source-links)
134 endif
135
136 $(outdir)/%.bib: %.bib
137         ln -f $< $@
138
139 # lilypond.texi deps
140 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
141         $(MAKE) -C $(top-src-dir)/mf
142
143 $(outdir)/lilypond-essay.texi: $(ITELY_FILES) $(ITEXI_FILES)
144
145 .SECONDARY: