summaryrefslogtreecommitdiff
path: root/share/mk/bsd.man.mk
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-01-16 01:58:19 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-01-16 01:58:19 +0000
commitb81f1c93e0a291ee9daddcda9045fad31b7ac885 (patch)
tree5c710fbb30f0b2625dc1f4d8cfa0a3fd8ea444ec /share/mk/bsd.man.mk
parent2b3c4079a646bba3a7f12e71e86990e878bfbf90 (diff)
Delete the MANLINT variable and the related SUFFIXES rules because
since yesterday, "mandoc -Tlint -Wfatal" can no longer fail. Instead, as suggested by deraadt@, provide a manlint target that is *not* run during make build, but can be run whenever you want to check syntax of manuals. "nice stuff" deraadt@
Diffstat (limited to 'share/mk/bsd.man.mk')
-rw-r--r--share/mk/bsd.man.mk36
1 files changed, 10 insertions, 26 deletions
diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk
index c2d18f6f276..163c87471b3 100644
--- a/share/mk/bsd.man.mk
+++ b/share/mk/bsd.man.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.man.mk,v 1.40 2014/03/08 17:08:11 schwarze Exp $
+# $OpenBSD: bsd.man.mk,v 1.41 2015/01/16 01:58:17 schwarze Exp $
# $NetBSD: bsd.man.mk,v 1.23 1996/02/10 07:49:33 jtc Exp $
# @(#)bsd.man.mk 5.2 (Berkeley) 5/11/90
@@ -11,8 +11,6 @@
.endif
BEFOREMAN?=
-MANLINT=${MAN:S/$/.manlint/}
-CLEANFILES+=.man-linted ${MANLINT}
# Add / so that we don't have to specify it.
.if defined(MANSUBDIR) && !empty(MANSUBDIR)
@@ -22,34 +20,13 @@ MANSUBDIR=/
.endif
# Files contained in ${BEFOREMAN} must be built before generating any
-# manual page source code. However, static manual page files contained
-# in the source tree must not appear as targets, or the ${.IMPSRC} in
-# the .man.manlint suffix rule below will not find them in the .PATH.
+# manual page source code.
.for page in ${MAN}
. if target(${page})
${page}: ${BEFOREMAN}
. endif
.endfor
-# In any case, ${BEFOREMAN} must be finished before linting any manuals.
-.if !empty(MANLINT)
-${MANLINT}: ${BEFOREMAN}
-.endif
-
-# Set up the suffix rules for checking manuals.
-_MAN_SUFFIXES=1 2 3 3p 4 5 6 7 8 9
-.for s in ${_MAN_SUFFIXES}
-.SUFFIXES: .${s} .${s}.manlint
-.${s}.${s}.manlint:
-.if ${WARNINGS:L} == "yes"
- @echo "mandoc -Tlint ${.IMPSRC}"
- @mandoc -Tlint ${.IMPSRC} || [ $$? -lt 4 ]
-.else
- mandoc -Tlint -Wfatal ${.IMPSRC}
-.endif
- @touch ${.TARGET}
-.endfor
-
# Install the real manuals.
.for page in ${MAN}
. for sub in ${MANSUBDIR}
@@ -78,4 +55,11 @@ maninstall:
.endif
# Explicitly list ${BEFOREMAN} to get it done even if ${MAN} is empty.
-all: ${BEFOREMAN} ${MAN} ${MANLINT}
+all: ${BEFOREMAN} ${MAN}
+
+manlint: ${MAN}
+.if defined(MAN) && !empty(MAN)
+ mandoc -Tlint ${.ALLSRC}
+.endif
+
+.PHONY: manlint