summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.docb.mk
blob: 7e2ce761edfe882c558a946392ad19cf481024d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# $FreeBSD$
#
# The include file <bsd.docb.mk> handles installing SGML/docbook documents.
#
# +++ 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.

.include <bsd.init.mk>

# 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}

all:	${_docs}

install:
	${INSTALL} ${COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \
		${_docs} ${DESTDIR}${DOCDIR}/${VOLUME}

.include <bsd.obj.mk>
OpenPOWER on IntegriCloud