XMLLINT = xmllint
XMLTO = xsltproc 
CSS = /usr/share/sgml/docbook/xsl-stylesheets-1.75.2/html/docbook.xsl 

FIGURE_FILES =				\
	hal-arch.png

SPEC_XML_EXTRA_FILES =			\
	hal-spec-introduction.xml	\
	hal-spec-fdi-files.xml		\
	hal-spec-locking.xml		\
	hal-spec-access-control.xml	\
	hal-spec-properties.xml		\
	hal-spec-interfaces.xml	

htmldoc_DATA = hal-spec.html $(FIGURE_FILES) docbook.css

hal-spec.html : hal-spec.xml.in $(FIGURE_FILES) $(SPEC_XML_EXTRA_FILES)
	${XMLLINT} --xinclude hal-spec.xml.in > hal-spec.xml
	$(XMLTO) --encoding UTF-8 --stringparam html.stylesheet docbook.css --output hal-spec.html $(CSS) hal-spec.xml 

hal-spec.xml.in: hal-spec.xml.in.in
	gsed -e 's,@VERSION@,0.5.15,' hal-spec.xml.in.in >hal-spec.xml.in

clean:
	rm -f *~
	rm -f *.html
	rm -f hal-spec.xml
	rm -f hal-spec.xml.in Makefile.in
