summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorjfieber <jfieber@FreeBSD.org>1995-09-10 17:18:24 +0000
committerjfieber <jfieber@FreeBSD.org>1995-09-10 17:18:24 +0000
commita83219b615112f81e0efa102d0de6453c21d0218 (patch)
tree5978a7e18bbb5eb10e8200c3791c3bbb9ffc0bd3 /share
parentacf48f4555769cbedf1cfb2ff6262ac51f6b07c0 (diff)
downloadFreeBSD-src-a83219b615112f81e0efa102d0de6453c21d0218.zip
FreeBSD-src-a83219b615112f81e0efa102d0de6453c21d0218.tar.gz
Fix a bug with the clean target.
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.sgml.mk26
1 files changed, 16 insertions, 10 deletions
diff --git a/share/mk/bsd.sgml.mk b/share/mk/bsd.sgml.mk
index 28e9c55..4e0bb63 100644
--- a/share/mk/bsd.sgml.mk
+++ b/share/mk/bsd.sgml.mk
@@ -1,7 +1,7 @@
# bsd.sgml.mk - 8 Sep 1995 John Fieber
# This file is in the public domain.
#
-# $Id$
+# $Id: bsd.sgml.mk,v 1.1 1995/09/08 19:23:19 jfieber Exp $
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
@@ -54,8 +54,8 @@ obj:
.endif
.endif
-clean:
- rm -f [eE]rrs mklog ${CLEANFILES}
+clean: ${FORMATS:S/^/clean-/g}
+ rm -f [eE]rrs mklog
cleandir: clean
cd ${.CURDIR}; rm -rf obj
@@ -97,7 +97,7 @@ depend:
.endif
-# For each FORMATS type, define a build, install and print target.
+# For each FORMATS type, define a build, install, clean and print target.
# Note that there is special case handling for html targets
# because the number of files generated is generally not possible
# to predict outside of sgmlfmt(1).
@@ -136,15 +136,21 @@ install-${_FORMAT}: ${DOC}.${_FORMAT}
.endif
.if !target(${DOC}.${_FORMAT})
-.if ${_FORMAT} == "html"
-CLEANFILES+= *.${_FORMAT}
-.else
-CLEANFILES+= ${DOC}.${_FORMAT}
-.endif
-
${DOC}.${_FORMAT}: ${SRCS}
(cd ${SRCDIR}; ${SGMLFMT} -f ${.TARGET:S/${DOC}.//} ${SGMLFLAGS} ${DOC})
.endif
+.if !target(clean-${_FORMAT})
+.if ${_FORMAT} == "html"
+clean-${_FORMAT}:
+ rm -f *.${.TARGET:S/clean-//}
+
+.else
+clean-${_FORMAT}:
+ rm -f ${DOC}.${.TARGET:S/clean-//}
+
+.endif
+.endif
+
.endfor
OpenPOWER on IntegriCloud