ASCIIDOC ?= asciidoc
A2X	 ?= a2x
A2XOPTS  := -k $(VERBOSE)
XMLLINT  := --no-xmllint

# The last rule is expected to fail of XMLLINT is not defined above
tests:
	if test ! -d works ; then mkdir works ; fi
	if test ! -d fails ; then mkdir fails ; fi
	$(ASCIIDOC) -b html -o works/adoc.html -a inctext=true test.txt
	$(ASCIIDOC) -b html -o fails/adoc.html		       test.txt
	$(A2X) $(A2XOPTS) -f xhtml $(XMLLINT) --destination-dir=works -a inctext=true test.txt
	$(A2X) $(A2XOPTS) -f xhtml $(XMLLINT) --destination-dir=fails		      test.txt

clean:
	rm -rf works fails
