summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjfieber <jfieber@FreeBSD.org>1995-09-10 21:49:24 +0000
committerjfieber <jfieber@FreeBSD.org>1995-09-10 21:49:24 +0000
commitc87bfe009e8d6159e8ed451cd75c830cf3668cd9 (patch)
tree71a37348da0e78d8adfaf583f96a64093f120ac0
parentfb586a0db46da48fae0e47a20c7e44deefc793ae (diff)
downloadFreeBSD-src-c87bfe009e8d6159e8ed451cd75c830cf3668cd9.zip
FreeBSD-src-c87bfe009e8d6159e8ed451cd75c830cf3668cd9.tar.gz
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.
-rw-r--r--share/mk/bsd.sgml.mk29
1 files changed, 12 insertions, 17 deletions
diff --git a/share/mk/bsd.sgml.mk b/share/mk/bsd.sgml.mk
index 4e0bb63..799dfdb0c 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
OpenPOWER on IntegriCloud