-PRECIOUS_IDS = \
- bus \
- city \
- citycopy \
- clouds \
- cloudscopy \
- train \
- tram \
- trees \
- treescopy \
- serviceletter \
- servicename \
- sky \
- ticket \
- ticketdate \
- tickettime
-
-# Optimize our SVG, and remove its XML prologue so that it can be
-# included directly into the HTML document.
-day.min.svg: day.svg
- @SCOUR@ --protect-ids-list=$$(echo $(PRECIOUS_IDS) | tr ' ' ',') \
- --enable-id-stripping \
- --enable-comment-stripping \
- --remove-descriptive-elements \
- --no-renderer-workaround \
- --strip-xml-prolog \
- --no-line-breaks \
- --error-on-flowtext \
- $< > $@
+PRECIOUS_IDS = \
+ bus \
+ city \
+ citycopy \
+ codebg \
+ codetext \
+ clouds \
+ cloudscopy \
+ destination \
+ origin \
+ origindest \
+ train \
+ tram \
+ trees \
+ treescopy \
+ serviceid \
+ servicename \
+ sky \
+ ticket \
+ ticketbg \
+ ticketdate \
+ tickettime \
+ zone
+
+# The base "scour" command used to optimize the tableau and favicon.
+SCOUR = @SCOUR@ \
+ --enable-id-stripping \
+ --enable-comment-stripping \
+ --remove-descriptive-elements \
+ --no-renderer-workaround \
+ --no-line-breaks \
+ --error-on-flowtext
+
+# Optimize the favicon using scour.
+favicon.min.svg: favicon.svg
+ $(SCOUR) $< > $@
+
+# Optimize the tableau once using XSL, to catch a few things that
+# "scour" will miss...
+tableau.min.svg: tableau.svg svgclean.xsl
+ @XSLTPROC@ $(srcdir)/svgclean.xsl $< > $@
+
+# Optimize the tableau (again) using scour, removing its XML prologue
+# so that it can be included directly into the HTML document.
+tableau.min.min.svg: tableau.min.svg
+ $(SCOUR) --protect-ids-list=$$(echo $(PRECIOUS_IDS) | tr ' ' ',') \
+ --strip-xml-prolog \
+ $< > $@