fe815331bb
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
50 lines
1.2 KiB
Makefile
50 lines
1.2 KiB
Makefile
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
.include <src.opts.mk>
|
|
PACKAGE= rescue
|
|
MK_SSP= no
|
|
|
|
# Certain library entries have hard-coded references to
|
|
# /bin, /sbin, etc, that require those entries to be
|
|
# recompiled for use in /rescue. This Makefile
|
|
# accomplishes that. Note that this is pure build hackery.
|
|
# This library should never be installed, and isn't even linked
|
|
# with in the normal way. (See ../rescue/Makefile for details.)
|
|
|
|
.PATH: ${SRCTOP}/lib/libc/gen \
|
|
${SRCTOP}/lib/libc/net \
|
|
${SRCTOP}/lib/libc/stdlib \
|
|
${SRCTOP}/lib/libutil
|
|
|
|
LIB= rescue
|
|
INTERNALLIB= # Don't install this library
|
|
SRCS= exec.c getusershell.c login_class.c popen.c rcmdsh.c \
|
|
sysctl.c system.c
|
|
|
|
WARNS?= 3
|
|
|
|
CFLAGS+= -DRESCUE
|
|
# Flags copied from src/lib/libc and src/lib/libutil
|
|
# libc/db/Makefile.inc
|
|
CFLAGS+= -D__DBINTERFACE_PRIVATE
|
|
# libc/net/Makefile.inc & libutil/Makefile
|
|
.if ${MK_INET6_SUPPORT} != "no"
|
|
CFLAGS+= -DINET6
|
|
.endif
|
|
# libc/regex/Makefile.inc & libc/regex/grot/Makefile
|
|
CFLAGS+= -DPOSIX_MISTAKE
|
|
# libc/rpc/Makefile.inc
|
|
CFLAGS+= -DBROKEN_DES -DPORTMAP -DDES_BUILTIN
|
|
# libc/Makefile
|
|
.if ${MK_NIS} != "no"
|
|
CFLAGS+= -DYP
|
|
.endif
|
|
.if ${MK_HESIOD} != "no"
|
|
CFLAGS+= -DHESIOD
|
|
.endif
|
|
CFLAGS+= -I${SRCTOP}/lib/libc/include
|
|
|
|
.include <bsd.lib.mk>
|