From 614b9c68cdd9d8bbfae418b642a71596e2bb9325 Mon Sep 17 00:00:00 2001 From: John Fieber Date: Sun, 10 Sep 1995 21:49:24 +0000 Subject: [PATCH] Now works correctly with obj directories. FORMATS can be defined as an empty string to suppress generation or installation of any files. Previously setting it to "null" had that effects. Now uses MANOWN, MANGRP and MANMODE for installation instead of BINOWN, BINGRP and BINMODE. --- share/mk/bsd.sgml.mk | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/share/mk/bsd.sgml.mk b/share/mk/bsd.sgml.mk index 4e0bb63caba..799dfdb0c55 100644 --- a/share/mk/bsd.sgml.mk +++ b/share/mk/bsd.sgml.mk @@ -7,36 +7,31 @@ .include "${.CURDIR}/../Makefile.inc" .endif -# Variables of possible interest to the user - - # FORMATS indicates which output formats will be generated. See # the sgmlfmt(1) man page for a list of valid formats. -# Specify "null" for FORMATS to build and install nothing. +# If FORMATS is empty, nothing will be built or installed. +# Use SGMLOPTS to pass extra flags to sgmlfmt(1). FORMATS?= ascii html +SGMLFLAGS+= ${SGMLOPTS} VOLUME?= ${.CURDIR:T} DOC?= ${.CURDIR:T} -SGMLFMT?= sgmlfmt -LPR?= lpr -SGMLFLAGS+= ${SGMLOPTS} BINDIR?= /usr/share/doc -BINMODE?= 444 SRCDIR?= ${.CURDIR} DISTRIBUTION?= doc - -# Everything else +SGMLFMT?= sgmlfmt +LPR?= lpr DOCS= ${FORMATS:S/^/${DOC}./g} .MAIN: all all: ${DOCS} -# Empty targets for FORMATS= null. -${DOC}.null: -install-null: -print-null: +# If FORMATS is empty, do nothing +.if empty(FORMATS) +${DOC}. install- print- clean-: +.endif .if !target(obj) .if defined(NOOBJ) @@ -124,12 +119,12 @@ print-${_FORMAT}: ${DOC}.${_FORMAT} .if !target(install-${_FORMAT}) .if ${_FORMAT} == "html" install-${_FORMAT}: ${DOC}.${_FORMAT} - ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \ *.${.TARGET:S/install-//} ${DESTDIR}${BINDIR}/${VOLUME} .else install-${_FORMAT}: ${DOC}.${_FORMAT} - ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \ ${DOC}.${.TARGET:S/install-//} ${DESTDIR}${BINDIR}/${VOLUME} .endif @@ -137,7 +132,7 @@ install-${_FORMAT}: ${DOC}.${_FORMAT} .if !target(${DOC}.${_FORMAT}) ${DOC}.${_FORMAT}: ${SRCS} - (cd ${SRCDIR}; ${SGMLFMT} -f ${.TARGET:S/${DOC}.//} ${SGMLFLAGS} ${DOC}) + ${SGMLFMT} -f ${.TARGET:S/${DOC}.//} ${SGMLFLAGS} ${.CURDIR}/${DOC}.sgml .endif