BIBL=$(wildcard ls ../bibl/*.xml)

Overview.html: threats-note-skel.xml threats.xml threats-https.xml $(BIBL)
	xsltproc --xinclude --nonet ../rec/bibsort.xsl threats-note-skel.xml |\
	xsltproc --nonet add-ids.xsl - | \
	xsltproc --nonet fix-links.xsl -| \
	xsltproc --nonet ../rec/xmlspec.xsl - | \
	xsltproc --nonet ../rec/fix-style.xsl - \
		 > Overview.html
	-tidy -utf8 -asxhtml -i -m Overview.html

threats.xml: threats-https.xml
	lynx -dump -source http://www.w3.org/2006/WSC/wiki/ThreatTrees\?action=print | \
		tidy -asxhtml - | xsltproc --nonet threats.xsl -  | \
		xsltproc --nonet local.xsl - | \
		 sed -f fixup.sed > threats.xml

threats-https.xml:
	lynx -dump -source http://www.w3.org/2006/WSC/wiki/HTTPS_Threat_Tree\?action=print | \
		tidy -asxhtml - | xsltproc --nonet threats.xsl - | sed -f	fixup.sed > threats-https.xml


.PHONY: threats.xml threats-https.xml
