#---*- Makefile -*-------------------------------------------------------

# Makelocal-output

PDF_FILES = ${RST_FILES:%.rst=%.pdf}

.PHONY: pdf

pdf: ${PDF_FILES}

%.pdf: %.rst
	pandoc $< -o $@

HTML_FILES = ${RST_FILES:%.rst=%.html}

.PHONY: html

html: ${HTML_FILES}

%.html: %.rst ./tests/makefiles/style.css
	$(shell which rst2html5.py || which rst2html5 || echo "rst2html5.py") -d --syntax-highlight=none --stylesheet=$(word 2, $^) $< $@

.PHONY: clean clean-output

clean: clean-output

clean-output:
	rm -f  $(PDF_FILES) $(HTML_FILES)
