diff options
author | ngie <ngie@FreeBSD.org> | 2016-04-23 07:09:23 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-04-23 07:09:23 +0000 |
commit | 48f1966681c54559cfb75a24922874dca996bb6a (patch) | |
tree | cb2002820b028b25f927b1cef8220cbd407891a1 /share/mk | |
parent | c5bc872f5c9fb9b766c4e955af3e68622a46114e (diff) | |
download | FreeBSD-src-48f1966681c54559cfb75a24922874dca996bb6a.zip FreeBSD-src-48f1966681c54559cfb75a24922874dca996bb6a.tar.gz |
MFC r297282,r297456,r298012,r298013,r298014:
r297282 (by bdrewery):
We don't have a CPPFLAGS, COPTS or CPUFLAGS.
r297456 (by bdrewery):
We don't support DPLIBS.
r298012:
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
r298013:
Commit documentation change for r298012
Requested by: bdrewery
r298014:
Regenerate the list of bsd.progs.mk supported variables
Prefix with dashes (unordered list) and put one variable on each
line (to avoid future conflicts)
Done via the following one-liner:
> sh -c 'for i in $(make -C tests/sys/aio PROG=foo -VPROG_VARS:O); do printf "\t\t- $i\n"; done'
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.README | 23 | ||||
-rw-r--r-- | share/mk/bsd.prog.mk | 1 | ||||
-rw-r--r-- | share/mk/bsd.progs.mk | 4 |
3 files changed, 23 insertions, 5 deletions
diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 89f5f7e..6872a6b 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -262,9 +262,26 @@ PROGS_CXX PROG and PROGS_CXX in one Makefile. To define LDADD.foo= -lutil SRCS.bar= bar_src.c - The supported variables are BINDIR BINGRP BINMODE BINOWN - CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS DPSRCS LDADD - LDFLAGS MAN MLINKS PROGNAME SRCS. + The supported variables are: + - BINDIR + - BINGRP + - BINMODE + - BINOWN + - CFLAGS + - CXXFLAGS + - DEBUG_FLAGS + - DPADD + - DPSRCS + - LDADD + - LDFLAGS + - LINKS + - MAN + - MLINKS + - NO_WERROR + - PROGNAME + - SRCS + - STRIP + - WARNS PROGNAME The name that the above program will be installed as, if different from ${PROG}. diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index bc8bffd..dc7e426 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -7,6 +7,7 @@ # XXX The use of COPTS in modern makefiles is discouraged. .if defined(COPTS) +.warning COPTS should be CFLAGS. CFLAGS+=${COPTS} .endif diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk index 8aecbdf..69cb1bf 100644 --- a/share/mk/bsd.progs.mk +++ b/share/mk/bsd.progs.mk @@ -34,8 +34,8 @@ UPDATE_DEPENDFILE_PROG?= no .if defined(PROG) # just one of many PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN NO_WERROR \ - PROGNAME SRCS WARNS -PROG_VARS += CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD 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}) |