Whitespace.
[ttfautohint.git] / doc / Makefile.am
blobcbecab167093400c49c2d262b649988461cde4d4
1 # Makefile.am
3 # Copyright (C) 2011-2014 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
41 DOC = ttfautohint.html \
42       ttfautohint.pdf \
43       ttfautohint.txt \
44       $(DOCIMGPNG) \
45       $(DOCIMGSVG) \
46       $(DOCIMGPDF) \
47       footnote-popup.js \
48       jquery-1.11.0.min.js
50 EXTRA_DIST = c2pandoc.sed \
51              make-snapshot.sh \
52              strip-comments.sh \
53              ttfautohint-1.pandoc \
54              ttfautohint-2.pandoc \
55              ttfautohint-3.pandoc \
56              template.html \
57              template.tex \
58              ttfautohint-css.html \
59              ttfautohint-js.html
61 if WITH_DOC
62   nobase_dist_doc_DATA = $(DOC)
63 endif
66 ttfautohint-2.pandoc: $(top_srcdir)/lib/ttfautohint.h
67         $(SED) -f $(srcdir)/c2pandoc.sed < $< > $@
69 ttfautohint.txt: $(DOCSRC)
70         $(SHELL) $(srcdir)/strip-comments.sh $^ > $@
72 if WITH_DOC
74   # suffix rules must always start in column 0
75 .svg.pdf:
76           $(INKSCAPE) --export-pdf=$@ $<
78   # build snapshot image of ttfautohintGUI:
79   # this needs X11 and ImageMagick's `import' tool
80   # (in the `make-snaphshot.sh' script)
81   img/ttfautohintGUI.png: $(top_srcdir)/frontend/maingui.cpp \
82                           $(top_srcdir)/configure.ac
83           cd $(top_builddir)/frontend \
84             && $(MAKE) $(AM_MAKEFLAGS) ttfautohintGUI$(EXEEXT)
85           -mkdir img 2> /dev/null
86           $(SHELL) $(srcdir)/make-snapshot.sh \
87                      $(top_builddir)/frontend/ttfautohintGUI$(EXEEXT) $@
89   ttfautohint.html: ttfautohint.txt $(DOCIMGPNG) $(DOCIMGSVG) \
90                     ttfautohint-css.html ttfautohint-js.html \
91                     template.html $(top_srcdir)/.version
92           $(PANDOC) --smart \
93                     --template=$(srcdir)/template.html \
94                     --default-image-extension=".svg" \
95                     --variable="version:$(VERSION)" \
96                     --toc \
97                     --include-in-header=$(srcdir)/ttfautohint-css.html \
98                     --include-in-header=$(srcdir)/ttfautohint-js.html \
99                     --standalone \
100                     --output=$@ $<
102   ttfautohint.pdf: ttfautohint.txt $(DOCIMGPNG) $(DOCIMGPDF) \
103                    template.tex $(top_srcdir)/.version
104           TEXINPUTS="$(srcdir);" \
105           $(PANDOC) --smart \
106                     --latex-engine=$(LATEX) \
107                     --template=$(srcdir)/template.tex \
108                     --default-image-extension=".pdf" \
109                     --variable="version:$(VERSION)" \
110                     --number-sections \
111                     --toc \
112                     --chapters \
113                     --standalone \
114                     --output=$@ $<
115 else
116 .svg.pdf:
117           @echo 1>&2 "warning: can't generate \`$@'"
118           @echo 1>&2 "         please install inkscape and reconfigure"
120   img/ttfautohintGUI.png: $(top_srcdir)/frontend/maingui.cpp \
121                           $(top_srcdir)/configure.ac
122           @echo 1>&2 "warning: can't generate \`$@'"
123           @echo 1>&2 "         please install ImageMagick's \`import' tool and reconfigure"
125   ttfautohint.html: ttfautohint.txt $(DOCIMGPNG) $(DOCIMGSVG) \
126                     ttfautohint-css.html template.html $(top_srcdir)/.version
127           @echo 1>&2 "warning: can't generate \`$@'"
128           @echo 1>&2 "         pleasae install pandoc and reconfigure"
130   ttfautohint.pdf: $ttfautohint.txt $(DOCIMGPNG) $(DOCIMGPDF) \
131                    template.tex $(top_srcdir)/.version
132           @echo 1>&2 "warning: can't generate \`$@'"
133           @echo 1>&2 "         please install pdftex and pandoc, then reconfigure"
134 endif
136 # end of Makefile.am