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