summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.docb.mk
diff options
context:
space:
mode:
authorwosch <wosch@FreeBSD.org>1998-08-29 11:01:22 +0000
committerwosch <wosch@FreeBSD.org>1998-08-29 11:01:22 +0000
commitf9c986074aac4d56a4e8b972a8c90f7824362409 (patch)
tree82627303464c3e918f207cb5e99ead572361ac10 /share/mk/bsd.docb.mk
parent1f57e569c42a76180fb64baf779beae260b09b5a (diff)
downloadFreeBSD-src-f9c986074aac4d56a4e8b972a8c90f7824362409.zip
FreeBSD-src-f9c986074aac4d56a4e8b972a8c90f7824362409.tar.gz
bsd.docb.mk handles installing SGML/docbook documents.
Diffstat (limited to 'share/mk/bsd.docb.mk')
-rw-r--r--share/mk/bsd.docb.mk55
1 files changed, 55 insertions, 0 deletions
diff --git a/share/mk/bsd.docb.mk b/share/mk/bsd.docb.mk
new file mode 100644
index 0000000..2ea5f3da
--- /dev/null
+++ b/share/mk/bsd.docb.mk
@@ -0,0 +1,55 @@
+# The include file <bsd.docb.mk> handles installing SGML/docbook documents.
+#
+# $Id
+#
+# +++ variables +++
+#
+# DOC Name of the document.
+#
+# VOLUME Name of the installation subdirectory.
+#
+# SGMLOPTS Flags to sgmlfmt.
+#
+# SGMLFMT Format sgml files command. [sgmlfmt]
+#
+#
+# +++ targets +++
+#
+# all:
+# Converts sgml files to the specified output format
+# (see ${FORMATS}).
+#
+# install:
+# Install formated output.
+
+
+.if !target(__initialized__)
+__initialized__:
+.if exists(${.CURDIR}/../Makefile.inc)
+.include "${.CURDIR}/../Makefile.inc"
+.endif
+.endif
+
+# Use SGMLOPTS to pass extra flags to sgmlfmt(1).
+VOLUME?= ${.CURDIR:T}
+DOC?= ${.CURDIR:T}
+SGMLFMT?= sgmlfmt
+
+_docs= ${DOC:S/$/.html/g}
+CLEANFILES+=${_docs}
+
+# A DocBook document has the suffix .docb or .sgml. If a document
+# with both suffixes exists, .docb wins.
+.SUFFIXES: .docb .sgml .html
+
+.docb.html .sgml.html: ${SRCS}
+ ${SGMLFMT} -d docbook -f html ${SGMLOPTS} ${.IMPSRC}
+
+.MAIN: all
+all: ${_docs}
+
+install:
+ ${INSTALL} ${COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \
+ ${_docs} ${DESTDIR}${DOCDIR}/${VOLUME}
+
+.include <bsd.obj.mk>
OpenPOWER on IntegriCloud