]> gitweb.michael.orlitzky.com - charm-bypass.git/blob - Makefile.am
svgclean.xsl: fix text node processing
[charm-bypass.git] / Makefile.am
1 EXTRA_DIST = doc src
2
3 # List of element IDs that we use in the HTML document.
4 PRECIOUS_IDS = \
5 bus \
6 city \
7 citycopy \
8 codebg \
9 codetext \
10 clouds \
11 cloudscopy \
12 train \
13 tram \
14 trees \
15 treescopy \
16 serviceid \
17 servicename \
18 sky \
19 ticket \
20 ticketbg \
21 ticketdate \
22 tickettime \
23 zone
24
25 # Optimize our SVG once using XSL, to catch a few things
26 # that "scour" misses.
27 tableau.min.svg: tableau.svg svgclean.xsl
28 @XSLTPROC@ svgclean.xsl $< > $@
29
30 # Optimize our SVG again, and remove its XML prologue so that it can
31 # be included directly into the HTML document.
32 tableau.min.min.svg: tableau.min.svg
33 @SCOUR@ --protect-ids-list=$$(echo $(PRECIOUS_IDS) | tr ' ' ',') \
34 --enable-id-stripping \
35 --enable-comment-stripping \
36 --remove-descriptive-elements \
37 --no-renderer-workaround \
38 --strip-xml-prolog \
39 --no-line-breaks \
40 --error-on-flowtext \
41 $< > $@
42
43 # Use FontForge to convert the sfd source files to woff2.
44 .sfd.woff2:
45 @FONTFORGE@ -script sfd2woff.ff $<
46
47 # Base64-encode a woff2 (web open font format 2.0) file. We use this
48 # to embed fonts directly into the CSS that requires them.
49 .woff2.base64:
50 @BASE64@ -w0 $< > $@
51
52 # Build index.html by substituting the contents of a few (single
53 # line!) files into @PLACEHOLDERS@ within index.html.in. If you put
54 # tildes in tableau.svg this will probably break, so please don't do
55 # that.
56 index.html: index.html.in tableau.min.min.svg CharmBypass-Regular.base64 CharmBypass-Bold.base64
57 sed -e "s~@CBPREGULAR@~$$(cat CharmBypass-Regular.base64)~" \
58 -e "s~@CBPBOLD@~$$(cat CharmBypass-Bold.base64)~" \
59 -e "s~@SVGDATA@~$$(cat tableau.min.min.svg)~" \
60 $< > $@
61
62 # If you really want to, we support installing index.html
63 # to (say) /usr/share/charm-bypass/index.html.
64 dist_pkgdata_DATA = index.html
65
66 # Automake doesn't understand our wacky build process so we have to
67 # tell it which files are produced by running "make"
68 CLEANFILES = $(dist_pkgdata_DATA) \
69 CharmBypass-Regular.base64 \
70 CharmBypass-Bold.base64 \
71 tableau.min.svg \
72 tableau.min.min.svg