aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/mk/rst2htm.mk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bmake/mk/rst2htm.mk')
-rw-r--r--contrib/bmake/mk/rst2htm.mk15
1 files changed, 11 insertions, 4 deletions
diff --git a/contrib/bmake/mk/rst2htm.mk b/contrib/bmake/mk/rst2htm.mk
index 66eb8552f875..5dbc8ddaf960 100644
--- a/contrib/bmake/mk/rst2htm.mk
+++ b/contrib/bmake/mk/rst2htm.mk
@@ -1,4 +1,6 @@
-# $Id: rst2htm.mk,v 1.12 2021/05/26 04:20:31 sjg Exp $
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# $Id: rst2htm.mk,v 1.16 2025/04/16 00:42:07 sjg Exp $
#
# @(#) Copyright (c) 2009, Simon J. Gerraty
#
@@ -16,16 +18,20 @@
# convert reStructuredText to HTML, using rst2html.py from
# docutils - http://docutils.sourceforge.net/
+# pickup customizations
+.-include <local.rst2htm.mk>
+
.if empty(TXTSRCS)
TXTSRCS != 'ls' -1t ${.CURDIR}/*.txt ${.CURDIR}/*.rst 2>/dev/null; echo
.endif
RSTSRCS ?= ${TXTSRCS}
HTMFILES ?= ${RSTSRCS:R:T:O:u:%=%.htm}
+PDFFILES ?= ${RSTSRCS:R:T:O:u:%=%.pdf}
# can be empty, 4 or 5
HTML_VERSION ?=
-RST2HTML ?= rst2html${HTML_VERSION}.py
+RST2HTML ?= rst2html${HTML_VERSION}
RST2PDF ?= rst2pdf
-RST2S5 ?= rst2s5.py
+RST2S5 ?= rst2s5
# the following will run RST2S5 if the target name contains the word 'slides'
# otherwise it uses RST2HTML
RST2HTM = ${"${.TARGET:T:M*slides*}":?${RST2S5}:${RST2HTML}}
@@ -37,9 +43,10 @@ RST2PDF_FLAGS ?= ${"${.TARGET:T:M*slides*}":?${RST2PDF_SLIDES_FLAGS}:${RST2PDF_D
RST_SUFFIXES ?= .rst .txt
-CLEANFILES += ${HTMFILES}
+CLEANFILES += ${HTMFILES} ${PDFFILES}
html: ${HTMFILES}
+pdf: ${PDFFILES}
.SUFFIXES: ${RST_SUFFIXES} .htm .pdf