Add DEBUG_FLAGS to PROG_VARS and STRIP to PROG_OVERRIDE_VARS

This will allow the variables [*] to be overridden on a per-PROG basis,
which is useful when controlling "stripping" behavior for some tests
that require debug symbols or to be unstripped

DEBUG_FLAGS (similar to CFLAGS) supports appending, whereas STRIP is
an override

*: Due to how STRIP is defined in bsd.own.mk (in addition to
bsd.lib.mk and bsd.prog.mk), and the fact that bsd.test.mk pulls in
bsd.own.mk first, overriding STRIP doesn't work today.

A follow up commit is pending to "rectify" this after additional
testing is done.

Discussed with: bdrewery
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
Enji Cooper 2016-04-14 22:22:03 +00:00
parent 86ddf15ebd
commit 423e350b31
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298012

View File

@ -23,8 +23,8 @@ PROGS += ${PROGS_CXX}
.if defined(PROG)
# just one of many
PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN NO_WERROR \
PROGNAME SRCS WARNS
PROG_VARS += CFLAGS CXXFLAGS DPADD LDADD LIBADD LINKS \
PROGNAME SRCS STRIP WARNS
PROG_VARS += CFLAGS CXXFLAGS DEBUG_FLAGS DPADD LDADD LIBADD LINKS \
LDFLAGS MLINKS ${PROG_OVERRIDE_VARS}
.for v in ${PROG_VARS:O:u}
.if empty(${PROG_OVERRIDE_VARS:M$v})