From: schwarze Date: Fri, 16 Jan 2015 01:58:17 +0000 (+0000) Subject: Delete the MANLINT variable and the related SUFFIXES rules because X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dac384a83a9668679bfa96f1fafedc4aa205e8b6;p=openbsd 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@ --- diff --git a/lib/libcrypto/man/Makefile b/lib/libcrypto/man/Makefile index cd8c8585a54..c6dc286934b 100644 --- a/lib/libcrypto/man/Makefile +++ b/lib/libcrypto/man/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.14 2014/12/06 22:18:18 schwarze Exp $ +# $OpenBSD: Makefile,v 1.15 2015/01/16 01:58:18 schwarze Exp $ .include # for NOMAN @@ -1146,4 +1146,4 @@ maninstall: .include clean cleandir: - rm -f ${MAN} ${MANLINT} + rm -f ${MAN} diff --git a/lib/libssl/man/Makefile b/lib/libssl/man/Makefile index c12692357e3..25a29721446 100644 --- a/lib/libssl/man/Makefile +++ b/lib/libssl/man/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.29 2014/07/11 17:43:41 deraadt Exp $ +# $OpenBSD: Makefile,v 1.30 2015/01/16 01:58:17 schwarze Exp $ .include # for NOMAN @@ -272,4 +272,4 @@ maninstall: .include clean cleandir: - rm -f ${MAN} ${MANLINT} + rm -f ${MAN} 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 diff --git a/usr.bin/mandoc/Makefile b/usr.bin/mandoc/Makefile index ab2d12ac84a..04585dff27e 100644 --- a/usr.bin/mandoc/Makefile +++ b/usr.bin/mandoc/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.89 2014/12/14 17:55:37 schwarze Exp $ +# $OpenBSD: Makefile,v 1.90 2015/01/16 01:58:18 schwarze Exp $ .include @@ -29,7 +29,7 @@ LINKS = ${BINDIR}/mandoc ${BINDIR}/apropos \ MAN = apropos.1 man.1 mandoc.1 whatis.1 makewhatis.8 -CLEANFILES += man.cgi cgi.o man.cgi.8.manlint +CLEANFILES += man.cgi cgi.o # ----------------------------------------------------------------------