Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Aug 1998 13:30:58 +0200
From:      Wolfram Schneider <wosch@panke.de.freebsd.org>
To:        doc@FreeBSD.ORG
Subject:   bsd.docb.mk
Message-ID:  <19980825133058.A534@panke.de>

next in thread | raw e-mail | index | archive | help
I tried to add docbook targets to bsd.sgml.mk and give up. Our
bsd.*.mk files are unreadable and write-only.

So I wrote a new system make file for docbook sgml files. It is
small and easy to read.

A sample makefile for tutorials/devel:

DOC=    devel
VOLUME= tutorials/${DOC}
SRCS=   ${DOC}.docb

.include <bsd.docb.mk>

Wolfram

#	$Id$
#
# The include file <bsd.docb.mk> handles installing SGML/docbook documents.
#
#
# +++ variables +++
#
# DISTRIBUTION	Name of distribution. [bin]
#
# SGMLOPTS	Flags to sgmlfmt. []
#
# SGMLFMT	Format sgml files command. [sgmlfmt]
#
# Variables DOCOWN, DOCGRP, DOCMODE, DOCDIR, DESTDIR, DISTDIR are
# set by other Makefiles (e.g. bsd.own.mk)
#
#
# +++ targets +++
#
#	all:
#		Converts sgml files to the specified output format
#		(see ${FORMATS}).
#
#	distribute:
# 		This is a variant of install, which will
# 		put the stuff into the right "distribution".
#
#	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}
DISTRIBUTION?=	bin
SGMLFMT?=	sgmlfmt

_docs=	${DOC:S/$/.html/g}
CLEANFILES+=${_docs}


.SUFFIXES:	.docb .html
.docb.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>
-- 
Wolfram Schneider <wosch@freebsd.org> http://www.freebsd.org/~w/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980825133058.A534>