Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Mar 2019 00:57:34 +0000 (UTC)
From:      Enji Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r345723 - head/share/mk
Message-ID:  <201903300057.x2U0vYcH088425@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sat Mar 30 00:57:33 2019
New Revision: 345723
URL: https://svnweb.freebsd.org/changeset/base/345723

Log:
  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

Modified:
  head/share/mk/bsd.progs.mk

Modified: head/share/mk/bsd.progs.mk
==============================================================================
--- head/share/mk/bsd.progs.mk	Sat Mar 30 00:57:07 2019	(r345722)
+++ head/share/mk/bsd.progs.mk	Sat Mar 30 00:57:33 2019	(r345723)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903300057.x2U0vYcH088425>