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