003 File Manager
Current Path:
/usr/src/contrib/bmake/mk
usr
/
src
/
contrib
/
bmake
/
mk
/
📁
..
📄
ChangeLog
(52.99 KB)
📄
FILES
(858 B)
📄
README
(12.8 KB)
📄
auto.dep.mk
(1.95 KB)
📄
auto.obj.mk
(2.41 KB)
📄
autoconf.mk
(1.89 KB)
📄
autodep.mk
(5.72 KB)
📄
compiler.mk
(1.13 KB)
📄
cython.mk
(2.49 KB)
📄
dep.mk
(2.98 KB)
📄
dirdeps-cache-update.mk
(5.86 KB)
📄
dirdeps-options.mk
(2.92 KB)
📄
dirdeps-targets.mk
(5.26 KB)
📄
dirdeps.mk
(28.03 KB)
📄
doc.mk
(1.08 KB)
📄
dpadd.mk
(9.42 KB)
📄
files.mk
(2.13 KB)
📄
final.mk
(403 B)
📄
gendirdeps.mk
(12.02 KB)
📄
host-target.mk
(1.49 KB)
📄
host.libnames.mk
(700 B)
📄
inc.mk
(2.2 KB)
📄
init.mk
(2.14 KB)
📄
install-mk
(3.92 KB)
📄
install-new.mk
(1.28 KB)
📄
java.mk
(2.09 KB)
📄
ldorder.mk
(4.64 KB)
📄
lib.mk
(15.83 KB)
📄
libnames.mk
(585 B)
📄
libs.mk
(2.11 KB)
📄
links.mk
(1.63 KB)
📄
man.mk
(3.53 KB)
📄
manifest.mk
(2.37 KB)
📄
meta.autodep.mk
(9.41 KB)
📄
meta.stage.mk
(11.01 KB)
📄
meta.subdir.mk
(2.11 KB)
📄
meta.sys.mk
(4.03 KB)
📄
meta2deps.py
(23.86 KB)
📄
meta2deps.sh
(9.43 KB)
📄
mk-files.txt
(14.24 KB)
📄
mkopt.sh
(2.31 KB)
📄
nls.mk
(802 B)
📄
obj.mk
(2.15 KB)
📄
options.mk
(2.61 KB)
📄
own.mk
(5.85 KB)
📄
prlist.mk
(907 B)
📄
prog.mk
(5.28 KB)
📄
progs.mk
(2.23 KB)
📄
rst2htm.mk
(1.53 KB)
📄
scripts.mk
(2.4 KB)
📄
srctop.mk
(1.66 KB)
📄
stage-install.sh
(2.85 KB)
📄
subdir.mk
(2.2 KB)
📁
sys
📄
sys.clean-env.mk
(3.56 KB)
📄
sys.debug.mk
(1.19 KB)
📄
sys.dependfile.mk
(2.08 KB)
📄
sys.mk
(3.55 KB)
📄
sys.vars.mk
(2.91 KB)
📄
target-flags.mk
(1.55 KB)
📄
warnings.mk
(4.12 KB)
📄
whats.mk
(1.99 KB)
📄
yacc.mk
(1.38 KB)
Editing: warnings.mk
# RCSid: # $Id: warnings.mk,v 1.15 2020/08/19 17:51:53 sjg Exp $ # # @(#) Copyright (c) 2002, Simon J. Gerraty # # This file is provided in the hope that it will # be of use. There is absolutely NO WARRANTY. # Permission to copy, redistribute or otherwise # use this file is hereby granted provided that # the above copyright notice and this notice are # left intact. # # Please send copies of changes and bug-fixes to: # sjg@crufty.net # .ifndef _w_cflags # make sure we get the behavior we expect .MAKE.SAVE_DOLLARS = no # Any number of warnings sets can be added. .-include <warnings-sets.mk> # Modest defaults - put more elaborate sets in warnings-sets.mk # -Wunused etc are here so you can set # W_unused=-Wno-unused etc. MIN_WARNINGS?= -Wall \ -Wformat \ -Wimplicit \ -Wunused \ -Wuninitialized LOW_WARNINGS?= ${MIN_WARNINGS} -W -Wstrict-prototypes -Wmissing-prototypes MEDIUM_WARNINGS?= ${LOW_WARNINGS} -Werror HIGH_WARNINGS?= ${MEDIUM_WARNINGS} \ -Wcast-align \ -Wcast-qual \ -Wparentheses \ -Wpointer-arith \ -Wmissing-declarations \ -Wreturn-type \ -Wswitch \ -Wwrite-strings EXTRA_WARNINGS?= ${HIGH_WARNINGS} -Wextra # The two step default makes it easier to test build with different defaults. DEFAULT_WARNINGS_SET?= MIN WARNINGS_SET?= ${DEFAULT_WARNINGS_SET} # There is always someone who wants more... .if !empty(WARNINGS_XTRAS) ${WARNINGS_SET}_WARNINGS += ${WARNINGS_XTRAS} .endif # If you add sets, besure to list them (you don't have to touch this list). ALL_WARNINGS_SETS+= MIN LOW MEDIUM HIGH EXTRA .if !empty(WARNINGS_SET) .for ws in ${WARNINGS_SET} .if empty(${ws}_WARNINGS) .if ${MAKE_VERSION:[1]:C/.*-//} >= 20050530 .BEGIN: _empty_warnings _empty_warnings: .PHONY .else .BEGIN: .endif @echo "ERROR: Invalid: WARNINGS_SET=${ws}" @echo "ERROR: Try one of: ${ALL_WARNINGS_SETS:O:u}"; exit 1 .endif .endfor .endif # Without -O or if we've set -O0 somewhere - to make debugging more effective, # we need to turn off -Wuninitialized as otherwise we get a warning that # -Werror turns into an error. To be safe, set W_uninitialized blank. _w_cflags= ${CFLAGS} ${CFLAGS_LAST} ${CPPFLAGS} .if ${_w_cflags:M-O*} == "" || ${_w_cflags:M-O0} != "" W_uninitialized= .endif # .for loops have the [dis]advantage of being evaluated when read, # so adding to WARNINGS_SET[_${MACHINE_ARCH}] after this file is # read has no effect. # Replacing the above .for loops with the WARNINGS+= below solves that # but tiggers a double free bug in bmake-20040118 and earlier. # Don't try and read this too fast! # # The first :@ "loop" handles multiple sets in WARNINGS_SET # # In the second :@ "loop", the ::?= noise sets W_foo?=-Wfoo etc # which makes it easy to turn off override individual flags # (see W_uninitialized above). # # The last bit expands to ${W_foo_${.TARGET:T}:U${W_foo}} # which is the bit we ultimately want. It allows W_* to be set on a # per target basis. # # NOTE: that we force the target extension to be .o # # define this once, we use it a couple of times below (hence the doubled $$). M_warnings_list = @s@$${$$s_WARNINGS}@:O:u:@w@$${$${w:C/-(.)/\1_/}::?=$$w} $${$${w:C/-(.)/\1_/}_${MACHINE_ARCH}_${.TARGET:T:R}.o:U$${$${w:C/-(.)/\1_/}_${.TARGET:T:R}.o:U$${$${w:C/-(.)/\1_/}_${MACHINE_ARCH}:U$${$${w:C/-(.)/\1_/}}}}}@ # first a list of warnings from the chosen set _warnings = ${WARNINGS_SET_${MACHINE_ARCH}:U${WARNINGS_SET}:${M_warnings_list}} # now a list of all -Wno-* overrides not just those defined by WARNINGS_SET # since things like -Wall imply lots of others. # this should be a super-set of the -Wno-* in _warnings, but # just in case... _no_warnings = ${_warnings:M-Wno-*} ${ALL_WARNINGS_SETS:${M_warnings_list}:M-Wno-*} # -Wno-* must follow any others WARNINGS += ${_warnings:N-Wno-*} ${_no_warnings:O:u} .ifndef NO_CFLAGS_WARNINGS # Just ${WARNINGS} should do, but this is more flexible? CFLAGS+= ${WARNINGS_${.TARGET:T:R}.o:U${WARNINGS}} .endif # it is rather silly that g++ blows up on some warning flags NO_CXX_WARNINGS+= \ implicit \ missing-declarations \ missing-prototypes \ nested-externs \ shadow \ strict-prototypes .for s in ${SRCS:M*.c*:N*.c:N*h} .for w in ${NO_CXX_WARNINGS} W_$w_${s:T:R}.o= .endfor .endfor .endif # _w_cflags
Upload File
Create Folder