Module Name: src
Committed By: rillig
Date: Sat Jan 30 16:05:45 UTC 2021
Modified Files:
src/usr.bin/make: Makefile
Log Message:
make(1): run lint with strict bool mode
The make code is not supposed to use constructs such as "if (strcmp(s1,
s2))" or "if (p && *p)", instead all boolean expressions have a form
that would be accepted by a C#, Go or Java compiler as well. This also
ensures that pre-C99 compilers generate equivalent code as C99
compilers, at least regarding boolean expressions.
To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/usr.bin/make/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/Makefile
diff -u src/usr.bin/make/Makefile:1.111 src/usr.bin/make/Makefile:1.112
--- src/usr.bin/make/Makefile:1.111 Sat Dec 12 16:54:20 2020
+++ src/usr.bin/make/Makefile Sat Jan 30 16:05:45 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.111 2020/12/12 16:54:20 rillig Exp $
+# $NetBSD: Makefile,v 1.112 2021/01/30 16:05:45 rillig Exp $
# @(#)Makefile 5.2 (Berkeley) 12/28/90
PROG= make
@@ -127,6 +127,8 @@ SUBDIR.roff+= PSD.doc
SUBDIR+= unit-tests
.endif
+LINTFLAGS+= -T # strict bool mode, available since 2021-01-11
+
${SRCS:M*.c:.c=.o}: ${HDRS}
CLEANFILES+= *.o