build: provide a default WARNS for all in-tree builds
The current default is provided in various Makefile.inc in some top-level directories and covers a good portion of the tree, but doesn't cover parts of the build a little deeper (e.g. libcasper). Provide a default in src.sys.mk and set WARNS to it in bsd.sys.mk if that variable is defined. This lets us relatively cleanly provide a default WARNS no matter where you're building in the src tree without breaking things outside of the tree. Crunchgen has been updated as a bootstrap tool to work on this change because it needs r365605 at a minimum to succeed. The cleanup necessary to successfully walk over this change on WITHOUT_CLEAN builds has been added. There is a supplemental project to this to list all of the warnings that are encountered when the environment has WARNS=6 NO_WERROR=yes: https://warns.kevans.dev -- this project will hopefully eventually go away in favor of CI doing a much better job than it. Reviewed by: emaste, brooks, ngie (all earlier version) Reviewed by: emaste, arichardson (depend-cleanup.sh change) Differential Revision: https://reviews.freebsd.org/D26455
This commit is contained in:
@@ -6,6 +6,8 @@ SHLIB_MAJOR= 5
|
||||
REGEXDIR= ${SRCTOP}/contrib/libgnuregex
|
||||
.PATH: ${REGEXDIR}
|
||||
|
||||
WARNS?= 1
|
||||
|
||||
SRCS= gnuregex.c
|
||||
INCSGROUPS= INCS WRINCS PXINCS
|
||||
INCS= regex.h.patched
|
||||
|
||||
@@ -18,6 +18,8 @@ CFLAGS+=-I${SRCTOP}/contrib/diff/lib
|
||||
CFLAGS+=-DHAVE_CONFIG_H
|
||||
CFLAGS+=-DDEFAULT_DIFF_PROGRAM=\"/usr/bin/diff\"
|
||||
|
||||
WARNS?= 0
|
||||
|
||||
.for f in diff3.c
|
||||
${f}: ${DIFFSRC}/${f} ${.CURDIR}/${f}.diff
|
||||
patch -s -o ${.TARGET} < ${.CURDIR}/${f}.diff ${DIFFSRC}/${f}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
WARNS?= 0
|
||||
|
||||
VERSION= "6.1.1 [FreeBSD]"
|
||||
VENDOR= marcel
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ SRCS= closeout.c dfa.c error.c exclude.c grep.c grepmat.c hard-locale.c \
|
||||
xstrtoumax.c
|
||||
CLEANFILES+= gnugrep.1
|
||||
|
||||
WARNS?= 0
|
||||
|
||||
CFLAGS+=-I${.CURDIR} -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DHAVE_CONFIG_H
|
||||
|
||||
.if ${MK_BSD_GREP} != "yes"
|
||||
|
||||
Reference in New Issue
Block a user