all: pages template.html.de template.html.en
XSLTPROC = xsltproc --xinclude --nomkdir
tmp/website.xml.de: tmp/website.xml.stamp
$(XSLTPROC) -o "$@" --stringparam lang de styles/select-lang.xsl xmls/website.xml
tmp/website.xml.en: tmp/website.xml.stamp
$(XSLTPROC) -o "$@" --stringparam lang en styles/select-lang.xsl xmls/website.xml
%.html.de: tmp/website.xml.de styles/website-de.xsl styles/website.xsl styles/news.xsl styles/bibliography.xsl
$(XSLTPROC) -o "$*.html.de" --stringparam path "/$*" styles/website-de.xsl tmp/website.xml.de
%.html.en: tmp/website.xml.en styles/website-en.xsl styles/website.xsl styles/news.xsl styles/bibliography.xsl
$(XSLTPROC) -o "$*.html.en" --stringparam path "/$*" styles/website-en.xsl tmp/website.xml.en
#index.html.de: tmp/website.xml.de styles/website-de.xsl styles/website.xsl styles/news.xsl styles/bibliography.xsl
# $(XSLTPROC) -o "index.html.de" --stringparam path "/" styles/website-de.xsl tmp/website.xml.de
#
#index.html.en: tmp/website.xml.en styles/website-en.xsl styles/website.xsl styles/news.xsl styles/bibliography.xsl
# $(XSLTPROC) -o "index.html.en" --stringparam path "/" styles/website-en.xsl tmp/website.xml.en
tmp/songlist.xml: xmls/songs/*.xml
( cd xmls; \
echo '' ;\
for file in songs/*.xml; do \
bn=$$(basename $$file .xml); \
echo "" ; done ; \
echo '' ) > "$@";
tmp/website.deps: tmp/songlist.xml tmp/website.xml.stamp styles/deps.xsl
$(XSLTPROC) -o "$@" styles/deps.xsl xmls/website.xml
tmp/website.incls: tmp/website.xml.stamp styles/includes.xsl
xsltproc -o "$@" styles/includes.xsl xmls/website.xml
sinclude tmp/website.deps
sinclude tmp/website.incls