diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2019-03-30 00:57:33 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2019-03-30 00:57:33 +0000 |
commit | b89cf12cc6e633431e4c8bf7a25cf1141c7826d9 (patch) | |
tree | 47b7bb75eab3e4a56a7d2eb605100a46b53c2453 /share/mk/bsd.progs.mk | |
parent | 7893235ff0e1caa4a7950b53e4e94b9e9b722dc4 (diff) | |
download | src-b89cf12cc6e633431e4c8bf7a25cf1141c7826d9.tar.gz src-b89cf12cc6e633431e4c8bf7a25cf1141c7826d9.zip |
PROG_OVERRIDE_VARS should override default values if specified
The behavior prior to this change would not override default values if set in
`bsd.own.mk`, or (in the more general case) globally before `bsd.progs.mk` was
included. This affected `bsd.test.mk` as well, since it consumes
`bsd.progs.mk`.
Some examples of this failing behavior are as follows:
* `BINMODE` defaults to 0555 per `bsd.own.mk`. If someone wanted to set the
`BINMODE` to `NOBINMODE` (0444) for `prog`, for example, like
`BINMODE.prog= ${NOBINMODE}`, `bsd.progs.mk` would not honor the per-PROG
setting.
* An application, `prog`, does not build at `WARNS?= 6`. Before this change,
setting to a lower `WARNS` value, e.g., `WARNS.prog= 3`, would have been
impossible, requiring that `prog` be built from another directory,
the global `WARNS` be lowered, or a per-PROG value needing to be set
across the board. None of the above workarounds is desirable.
This change unbreaks variables defined in `PROG_OVERRIDE_VARS` which have
defaults set before `bsd.progs.mk` is included, by setting them to their
defined values if set on a per-PROG basis.
Reviewed by: asomers
Approved by: emaste (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D19755
Notes
Notes:
svn path=/head/; revision=345723
Diffstat (limited to 'share/mk/bsd.progs.mk')
-rw-r--r-- | share/mk/bsd.progs.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk index 36043ef94860..edfe49995034 100644 --- a/share/mk/bsd.progs.mk +++ b/share/mk/bsd.progs.mk @@ -34,6 +34,11 @@ $v += ${${v}.${PROG}} $v += ${${v}_${PROG}} .endif .else +.if defined(${v}.${PROG}) +$v = ${${v}.${PROG}} +.elif defined(${v}_${PROG}) +$v = ${${v}_${PROG}} +.endif $v ?= .endif .endfor |