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