]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r345723:
authorEnji Cooper <ngie@FreeBSD.org>
Mon, 29 Apr 2019 19:32:11 +0000 (19:32 +0000)
committerEnji Cooper <ngie@FreeBSD.org>
Mon, 29 Apr 2019 19:32:11 +0000 (19:32 +0000)
commite56781230d461768f3bfd90e7081e76ccb1a5b58
tree83f992ecb54315e46803a1fa3ba031dbdd572550
parent7565124b7309490d82a786dea1f1efc5172a8ca1
MFC r345723:

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.
share/mk/bsd.progs.mk