-ifneq ($(ONLY_HTML_DOCS),1)
-
-# EPUB (pandoc directly)
-DOC_TARGETS += doc/$(1).epub
-doc/$(1).epub: $$(D)/$(1).md | doc/
- @$$(call E, pandoc: $$@)
- $$(CFG_PANDOC) $$(PANDOC_EPUB_OPTS) $$< --output=$$@
-
-# PDF (md =(pandoc)=> tex =(pdflatex)=> pdf)
-DOC_TARGETS += doc/$(1).tex
-doc/$(1).tex: $$(D)/$(1).md doc/uptack.tex doc/footer.tex doc/version.tex | doc/
- @$$(call E, pandoc: $$@)
- $$(CFG_PANDOC) $$(PANDOC_TEX_OPTS) $$< --output=$$@
-
-ifneq ($(NO_PDF_DOCS),1)
-ifeq ($$(SHOULD_BUILD_PDF_DOC_$(1)),1)
-DOC_TARGETS += doc/$(1).pdf
-ifneq ($(XELATEX),1)
-doc/$(1).pdf: doc/$(1).tex
- @$$(call E, latex compiler: $$@)
- $$(Q)$$(CFG_LATEX) \
- -interaction=batchmode \
- -output-directory=doc \
- $$<
-else
-# The version of xelatex on the snap bots seemingly ingores -output-directory
-# So we'll output to . and move to the doc directory manually.
-# This will leave some intermediate files in the build directory.
-doc/$(1).pdf: doc/$(1).tex
- @$$(call E, latex compiler: $$@)
- $$(Q)$$(CFG_LATEX) \
- -interaction=batchmode \
- -output-directory=. \
- $$<
- $$(Q)mv ./$(1).pdf $$@
-endif # XELATEX
-endif # SHOULD_BUILD_PDF_DOCS_$(1)
-endif # NO_PDF_DOCS
-
-endif # ONLY_HTML_DOCS
-