suffix = .xhtml
link_suffix = $(suffix)
version = $(shell git rev-parse --short HEAD)
versioned_jpg = 's/.*/.jpg?&/'
versioned_png = 's/.*/.png?&/'
#versioned_jpg='s/.*/.&.jpg/'
#versioned_png='s/.*/.&.png/'
version_args = --stringparam versioned_jpg $(shell echo $(version) | sed $(versioned_jpg)) --stringparam versioned_png $(shell echo $(version) | sed $(versioned_png))
xsltproc=xsltproc --stringparam stylesheet "$(shell cat style.min.css)" --stringparam version $(version) $(version_args)
svg2png=rsvg-convert -f png
fix_doctype=sed 's/ SYSTEM "about:legacy-compat"//'
to_html=$(fix_doctype) | xsltproc xsl/convert-xhtml-to-html.xsl - | $(fix_doctype) | sed -e 's/
<\/br>/
/g' -e 's/<\/img>//g' -e 's/<\/link>//g' -e 's/<\/meta>//g' -e 's/ $@
%$(suffix): %.xml %.xsl $(common_depend)
$(V_XSLT) $(xsltproc) --stringparam suffix $(link_suffix) $< | $(fix_doctype) > $@
%$(suffix): %.xml $(common_depend)
$(V_XSLT) $(xsltproc) --stringparam suffix $(link_suffix) $< | $(fix_doctype) > $@
%.html: %.xml %.xsl $(common_depend)
$(V_XSLT) $(xsltproc) --stringparam suffix .html $< | $(to_html) | $(html_minify) > $@
%.html: %.xml $(common_depend)
$(V_XSLT) $(xsltproc) --stringparam suffix .html $< | $(to_html) | $(html_minify) > $@
style.min.css: style.css font.css
$(V_CSS) node_modules/.bin/postcss -u postcss-import -u postcss-css-variables style.css | node_modules/.bin/cleancss > style.min.css
clean:
rm -f $(pages_gen) checkmark.png
rm -f $(pages_gen_html)