mirror of
https://github.com/opnsense/src.git
synced 2026-02-27 03:40:37 -05:00
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
32 lines
664 B
Makefile
32 lines
664 B
Makefile
# $FreeBSD$
|
|
|
|
LIB= gnuregex
|
|
SHLIB_MAJOR= 5
|
|
|
|
REGEXDIR= ${SRCTOP}/contrib/libgnuregex
|
|
.PATH: ${REGEXDIR}
|
|
|
|
WARNS?= 1
|
|
|
|
SRCS= gnuregex.c
|
|
INCSGROUPS= INCS WRINCS PXINCS
|
|
INCS= regex.h.patched
|
|
INCSNAME= regex.h
|
|
INCSDIR= ${INCLUDEDIR}/gnu
|
|
WRINCS= gnuregex.h
|
|
PXINCS= ${REGEXDIR}/regex.h
|
|
PXINCSDIR= ${INCSDIR}/posix
|
|
|
|
CFLAGS+= -D__attribute_warn_unused_result__=""
|
|
CFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR} -I${REGEXDIR}
|
|
|
|
CLEANFILES= regex.h.patched gnuregex.c
|
|
regex.h.patched: regex.h
|
|
sed 's=<posix/regex\.h>=<gnu/posix/regex.h>=g' \
|
|
< ${.ALLSRC} > ${.TARGET}
|
|
|
|
gnuregex.c: regex.c
|
|
sed 's=<regex\.h>=<gnu/regex.h>=g' \
|
|
< ${.ALLSRC} > ${.TARGET}
|
|
|
|
.include <bsd.lib.mk>
|