Synchronize with FreeType.
[ttfautohint.git] / doc / Makefile.am
blobf3dc6939829042938e57ab2eac63daaaa6e29043
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
17 DOCIMGSVG = img/blue-zones.svg \
18             img/glyph-terms.svg \
19             img/o-and-i.svg \
20             img/segment-edge.svg
22 DOCIMGPDF = img/blue-zones.pdf \
23             img/glyph-terms.pdf \
24             img/o-and-i.pdf \
25             img/segment-edge.pdf
27 DOCIMGPNG = img/ttfautohintGUI.png \
28             img/a-before-hinting.png \
29             img/a-after-hinting.png \
30             img/a-after-autohinting.png \
31             img/afii10108-11px-after-hinting.png \
32             img/afii10108-11px-before-hinting.png \
33             img/afii10108-12px-after-hinting.png \
34             img/afii10108-12px-before-hinting.png \
35             img/e-17px-x14.png \
36             img/e-17px-x17.png \
37             img/ff-g-26px.png \
38             img/ff-g-26px-wD.png
40 DOC = ttfautohint.html \
41       ttfautohint.pdf \
42       ttfautohint.txt \
43       $(DOCIMGPNG) \
44       $(DOCIMGSVG) \
45       $(DOCIMGPDF) \
46       footnote-popup.js \
47       jquery-1.11.0.min.js
49 EXTRA_DIST = c2pandoc.sed \
50              make-snapshot.sh \
51              strip-comments.sh \
52              ttfautohint-1.pandoc \
53              ttfautohint-2.pandoc \
54              ttfautohint-3.pandoc \
55              template.html \
56              template.tex \
57              ttfautohint-css.html \
58              ttfautohint-js.html
60 if WITH_DOC
61   nobase_dist_doc_DATA = $(DOC)
62 endif
65 ttfautohint-2.pandoc: $(top_srcdir)/lib/ttfautohint.h
66         $(SED) -f $(srcdir)/c2pandoc.sed < $< > $@
68 ttfautohint.txt: $(DOCSRC)
69         $(SHELL) $(srcdir)/strip-comments.sh $^ > $@
71 if WITH_DOC
73   # suffix rules must always start in column 0
74 .svg.pdf:
75           $(INKSCAPE) --export-pdf=$@ $<
77   # build snapshot image of ttfautohintGUI:
78   # this needs X11 and ImageMagick's `import' tool
79   # (in the `make-snaphshot.sh' script)
80   img/ttfautohintGUI.png: $(top_srcdir)/frontend/maingui.cpp \
81                           $(top_srcdir)/configure.ac
82           cd $(top_builddir)/frontend \
83             && $(MAKE) $(AM_MAKEFLAGS) ttfautohintGUI$(EXEEXT)
84           -mkdir img 2> /dev/null
85           $(SHELL) $(srcdir)/make-snapshot.sh \
86                      $(top_builddir)/frontend/ttfautohintGUI$(EXEEXT) $@
88   ttfautohint.html: ttfautohint.txt $(DOCIMGPNG) $(DOCIMGSVG) \
89                     ttfautohint-css.html ttfautohint-js.html \
90                     template.html $(top_srcdir)/.version
91           $(PANDOC) --smart \
92                     --template=$(srcdir)/template.html \
93                     --default-image-extension=".svg" \
94                     --variable="version:$(VERSION)" \
95                     --toc \
96                     --include-in-header=$(srcdir)/ttfautohint-css.html \
97                     --include-in-header=$(srcdir)/ttfautohint-js.html \
98                     --standalone \
99                     --output=$@ $<
101   ttfautohint.pdf: ttfautohint.txt $(DOCIMGPNG) $(DOCIMGPDF) \
102                    template.tex $(top_srcdir)/.version
103           TEXINPUTS="$(srcdir);" \
104           $(PANDOC) --smart \
105                     --latex-engine=$(LATEX) \
106                     --template=$(srcdir)/template.tex \
107                     --default-image-extension=".pdf" \
108                     --variable="version:$(VERSION)" \
109                     --number-sections \
110                     --toc \
111                     --chapters \
112                     --standalone \
113                     --output=$@ $<
114 else
115 .svg.pdf:
116           @echo 1>&2 "warning: can't generate \`$@'"
117           @echo 1>&2 "         please install inkscape and reconfigure"
119   img/ttfautohintGUI.png: $(top_srcdir)/frontend/maingui.cpp \
120                           $(top_srcdir)/configure.ac
121           @echo 1>&2 "warning: can't generate \`$@'"
122           @echo 1>&2 "         please install ImageMagick's \`import' tool and reconfigure"
124   ttfautohint.html: ttfautohint.txt $(DOCIMGPNG) $(DOCIMGSVG) \
125                     ttfautohint-css.html template.html $(top_srcdir)/.version
126           @echo 1>&2 "warning: can't generate \`$@'"
127           @echo 1>&2 "         pleasae install pandoc and reconfigure"
129   ttfautohint.pdf: $ttfautohint.txt $(DOCIMGPNG) $(DOCIMGPDF) \
130                    template.tex $(top_srcdir)/.version
131           @echo 1>&2 "warning: can't generate \`$@'"
132           @echo 1>&2 "         please install pdftex and pandoc, then reconfigure"
133 endif
135 # end of Makefile.am