1 # If you really want to, we support installing index.html
2 # to (say) /usr/share/charm-bypass/index.html
3 dist_pkgdata_DATA = index.html
7 # https://www.gnu.org/software/automake/manual/html_node/Scripts.html
9 # this looks like the best way to include "sources" for things that
10 # aren't true programs/libraries.
12 CharmBypass-Regular.sfd \
13 CharmBypass-Bold.sfd \
20 # List of element IDs that we use in the HTML document.
45 # The base "scour" command used to optimize the tableau and favicon.
47 --enable-id-stripping \
48 --enable-comment-stripping \
49 --remove-descriptive-elements \
50 --no-renderer-workaround \
54 # Optimize the favicon using scour.
55 favicon.min.svg: favicon.svg
58 # Optimize the tableau once using XSL, to catch a few things that
59 # "scour" will miss...
60 tableau.min.svg: tableau.svg svgclean.xsl
61 @XSLTPROC@ svgclean.xsl $< > $@
63 # Optimize the tableau (again) using scour, removing its XML prologue
64 # so that it can be included directly into the HTML document.
65 tableau.min.min.svg: tableau.min.svg
66 $(SCOUR) --protect-ids-list=$$(echo $(PRECIOUS_IDS) | tr ' ' ',') \
70 # Use FontForge to convert the sfd source files to woff2.
72 @FONTFORGE@ -script $(srcdir)/sfd2woff.ff $< $@
74 # Base64-encode a woff2 (web open font format 2.0) file. We use this
75 # to embed fonts directly into the CSS that requires them.
79 # Same with the favicon SVG.
83 # List all of the dependencies of the final index.html that themselves
84 # had to be built. We collect them here because they need to be listed
85 # in two places, as dependencies of index.html, and in CLEANFILES.
86 index_html_BUILTDEPS = \
87 CharmBypass-Regular.base64 \
88 CharmBypass-Bold.base64 \
92 # Build index.html by substituting the contents of a few (single
93 # line!) files into @PLACEHOLDERS@ within index.html.in. If you put
94 # tildes in tableau.svg this will break, so please don't do that.
95 index.html: index.html.in $(index_html_BUILTDEPS)
96 sed -e "s~@CBPREGULAR@~$$(cat CharmBypass-Regular.base64)~" \
97 -e "s~@CBPBOLD@~$$(cat CharmBypass-Bold.base64)~" \
98 -e "s~@FAVICON@~$$(cat favicon.base64)~" \
99 -e "s~@SVGDATA@~$$(cat tableau.min.min.svg)~" \
102 # Automake doesn't understand our wacky build process so we have to
103 # tell it which files are produced by running "make".
105 $(dist_pkgdata_DATA) \
106 $(index_html_BUILTDEPS) \