summaryrefslogtreecommitdiff
path: root/share
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
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')
-rw-r--r--share/mk/bsd.man.mk36
-rw-r--r--share/mk/bsd.subdir.mk4
2 files changed, 12 insertions, 28 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
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk
index 6fbaae26471..284f38cdf26 100644
--- a/share/mk/bsd.subdir.mk
+++ b/share/mk/bsd.subdir.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.subdir.mk,v 1.19 2012/10/15 11:14:38 espie Exp $
+# $OpenBSD: bsd.subdir.mk,v 1.20 2015/01/16 01:58:17 schwarze Exp $
# $NetBSD: bsd.subdir.mk,v 1.11 1996/04/04 02:05:06 jtc Exp $
# @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
@@ -76,7 +76,7 @@ realinstall: beforeinstall _SUBDIRUSE
.endif
-.for t in all clean cleandir includes depend obj tags regress
+.for t in all clean cleandir includes depend obj tags regress manlint
. if !target($t)
$t: _SUBDIRUSE
. endif