diff --git a/Makefile.defaults b/Makefile.defaults index 9646692..5ad7f2f 100644 --- a/Makefile.defaults +++ b/Makefile.defaults @@ -174,6 +174,29 @@ clean:: endef +define pandoc_build + +ifeq (${HAVE_PANDOC},yes) + +doc:: docs/$(1).pdf docs/$(1).html +ifeq (${HAVE_DYNAMO},yes) + $(DYNAMO) build-doc -markdown wiki +endif + +docs/$(1).pdf: force +ifeq (${HAVE_DYNAMO},yes) + $(DYNAMO) build-doc -pandoc docs + $(3) +endif + cd docs && pandoc $(DOC_OPTIONS) -o $(1).pdf --template=./eisvogel.tex $(2) + +docs/$(1).html: docs/$(1).pdf force + cd docs && pandoc $(HTML_OPTIONS) -o $(1).html $(2) + +endif + +endef + force: build-test::