From ad973af2b772ec134110322d71e91bb4af0a2cdc Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 3 Nov 2023 10:32:13 -0400 Subject: [PATCH] Makefile.am: base64-encode and substitute the favicon into index.html --- Makefile.am | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 2ddde99..62f5bbf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,6 +32,9 @@ SCOUR = @SCOUR@ --enable-id-stripping \ --no-line-breaks \ --error-on-flowtext +favicon.min.svg: favicon.svg + $(SCOUR) $< > $@ + # Optimize our SVG once using XSL, to catch a few things # that "scour" misses. tableau.min.svg: tableau.svg svgclean.xsl @@ -53,13 +56,19 @@ tableau.min.min.svg: tableau.min.svg .woff2.base64: @BASE64@ -w0 $< > $@ +# Same with the favicon SVG. +.svg.base64: + @BASE64@ -w0 $< > $@ + # Build index.html by substituting the contents of a few (single # line!) files into @PLACEHOLDERS@ within index.html.in. If you put # tildes in tableau.svg this will probably break, so please don't do # that. -index.html: index.html.in tableau.min.min.svg CharmBypass-Regular.base64 CharmBypass-Bold.base64 +index.html: index.html.in tableau.min.min.svg CharmBypass-Regular.base64 CharmBypass-Bold.base64 favicon.base64 + sed -e "s~@CBPREGULAR@~$$(cat CharmBypass-Regular.base64)~" \ -e "s~@CBPBOLD@~$$(cat CharmBypass-Bold.base64)~" \ + -e "s~@FAVICON@~$$(cat favicon.base64)~" \ -e "s~@SVGDATA@~$$(cat tableau.min.min.svg)~" \ $< > $@ @@ -72,5 +81,6 @@ dist_pkgdata_DATA = index.html CLEANFILES = $(dist_pkgdata_DATA) \ CharmBypass-Regular.base64 \ CharmBypass-Bold.base64 \ + favicon.min.svg \ tableau.min.svg \ tableau.min.min.svg -- 2.43.2