Add missing file to `make dist'.
[ttfautohint.git] / doc / Makefile.am
blob7eff0010b264dc9c3bdd8633d5be1cfd80d3bce1
1 # Makefile.am
3 # Copyright (C) 2011-2015 by Werner Lemberg.
5 # This file is part of the ttfautohint library, and may only be used,
6 # modified, and distributed under the terms given in `COPYING'.  By
7 # continuing to use, modify, or distribute this file you indicate that you
8 # have read `COPYING' and understand and accept it fully.
10 # The file `COPYING' mentioned in the previous paragraph is distributed
11 # with the ttfautohint library.
13 DOCSRC = ttfautohint-1.pandoc \
14          ttfautohint-2.pandoc \
15          ttfautohint-3.pandoc \
16          ../NEWS
18 DOCIMGSVG = img/blue-zones.svg \
19             img/glyph-terms.svg \
20             img/o-and-i.svg \
21             img/segment-edge.svg
23 DOCIMGPDF = img/blue-zones.pdf \
24             img/glyph-terms.pdf \
25             img/o-and-i.pdf \
26             img/segment-edge.pdf
28 DOCIMGPNG = img/ttfautohintGUI.png \
29             img/a-before-hinting.png \
30             img/a-after-hinting.png \
31             img/a-after-autohinting.png \
32             img/afii10108-11px-after-hinting.png \
33             img/afii10108-11px-before-hinting.png \
34             img/afii10108-12px-after-hinting.png \
35             img/afii10108-12px-before-hinting.png \
36             img/e-17px-x14.png \
37             img/e-17px-x17.png \
38             img/ff-g-26px.png \
39             img/ff-g-26px-wD.png \
40             img/Halant-Regular-O-Q.png \
41             img/Halant-Regular-O-Q-unhinted-12px.png \
42             img/Halant-Regular-O-good-Q-badly-hinted-12px.png \
43             img/Halant-Regular-O-good-Q-better-hinted-12px.png \
44             img/Halant-Regular-O-good-Q-well-hinted-12px.png
46 DOC = ttfautohint.html \
47       ttfautohint.pdf \
48       ttfautohint.txt \
49       $(DOCIMGPNG) \
50       $(DOCIMGSVG) \
51       $(DOCIMGPDF) \
52       footnote-popup.js \
53       jquery-1.11.2.min.js \
54       toc-unfold.js
56 EXTRA_DIST = c2pandoc.sed \
57              make-snapshot.sh \
58              strip-comments.sh \
59              ttfautohint-1.pandoc \
60              ttfautohint-2.pandoc \
61              ttfautohint-3.pandoc \
62              template.html \
63              template.tex \
64              ttfautohint-css.html \
65              ttfautohint-js.html
67 if WITH_DOC
68   nobase_dist_doc_DATA = $(DOC)
69 endif
72 ttfautohint-2.pandoc: $(top_srcdir)/lib/ttfautohint.h
73         $(SED) -f $(srcdir)/c2pandoc.sed < $< > $@
75 ttfautohint.txt: $(DOCSRC)
76         $(SHELL) $(srcdir)/strip-comments.sh $^ > $@
78 if WITH_DOC
80   # suffix rules must always start in column 0
81 .svg.pdf:
82           $(INKSCAPE) --export-pdf=$@ $<
84   # build snapshot image of ttfautohintGUI:
85   # this needs X11 and ImageMagick's `import' tool
86   # (in the `make-snaphshot.sh' script)
87   img/ttfautohintGUI.png: $(top_srcdir)/frontend/maingui.cpp \
88                           $(top_srcdir)/configure.ac
89           cd $(top_builddir)/frontend \
90             && $(MAKE) $(AM_MAKEFLAGS) ttfautohintGUI$(EXEEXT)
91           -mkdir img 2> /dev/null
92           $(SHELL) $(srcdir)/make-snapshot.sh \
93                      $(top_builddir)/frontend/ttfautohintGUI$(EXEEXT) $@
95   ttfautohint.html: ttfautohint.txt $(DOCIMGPNG) $(DOCIMGSVG) \
96                     ttfautohint-css.html ttfautohint-js.html \
97                     template.html $(top_srcdir)/.version
98           $(PANDOC) --smart \
99                     --template=$(srcdir)/template.html \
100                     --default-image-extension=".svg" \
101                     --variable="version:$(VERSION)" \
102                     --toc \
103                     --include-in-header=$(srcdir)/ttfautohint-css.html \
104                     --include-in-header=$(srcdir)/ttfautohint-js.html \
105                     --standalone \
106                     --output=$@ $<
108   ttfautohint.pdf: ttfautohint.txt $(DOCIMGPNG) $(DOCIMGPDF) \
109                    template.tex $(top_srcdir)/.version
110           TEXINPUTS="$(srcdir);" \
111           $(PANDOC) --smart \
112                     --latex-engine=$(LATEX) \
113                     --template=$(srcdir)/template.tex \
114                     --default-image-extension=".pdf" \
115                     --variable="version:$(VERSION)" \
116                     --number-sections \
117                     --toc \
118                     --chapters \
119                     --standalone \
120                     --output=$@ $<
121 else
122 .svg.pdf:
123           @echo 1>&2 "warning: can't generate \`$@'"
124           @echo 1>&2 "         please install inkscape and reconfigure"
126   img/ttfautohintGUI.png: $(top_srcdir)/frontend/maingui.cpp \
127                           $(top_srcdir)/configure.ac
128           @echo 1>&2 "warning: can't generate \`$@'"
129           @echo 1>&2 "         please install ImageMagick's \`import' tool and reconfigure"
131   ttfautohint.html: ttfautohint.txt $(DOCIMGPNG) $(DOCIMGSVG) \
132                     ttfautohint-css.html template.html $(top_srcdir)/.version
133           @echo 1>&2 "warning: can't generate \`$@'"
134           @echo 1>&2 "         pleasae install pandoc and reconfigure"
136   ttfautohint.pdf: $ttfautohint.txt $(DOCIMGPNG) $(DOCIMGPDF) \
137                    template.tex $(top_srcdir)/.version
138           @echo 1>&2 "warning: can't generate \`$@'"
139           @echo 1>&2 "         please install pdftex and pandoc, then reconfigure"
140 endif
142 # end of Makefile.am