diff options
author | jlam <jlam> | 2005-06-01 17:05:19 +0000 |
---|---|---|
committer | jlam <jlam> | 2005-06-01 17:05:19 +0000 |
commit | 7d2dfcbebdb8288dc7d0e1e0e610960e339c50b9 (patch) | |
tree | cad834d5c37ec21e14ca36e74299ee426139a47b | |
parent | cab71d0bd3594494d43a4fa45ee332112bfce2bb (diff) | |
download | pkgsrc-7d2dfcbebdb8288dc7d0e1e0e610960e339c50b9.tar.gz |
Include bsd.makevars.mk in bsd.prefs.mk instead of bsd.pkg.mk. This
allows the saved make variables to be re-set whenever bsd.prefs.mk is
included, and is a shortcut for the common case where a Makefile
includes both.
-rw-r--r-- | mk/bsd.makevars.mk | 13 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 3 | ||||
-rw-r--r-- | mk/bsd.prefs.mk | 5 |
3 files changed, 13 insertions, 8 deletions
diff --git a/mk/bsd.makevars.mk b/mk/bsd.makevars.mk index 2fe63a99171..c0771252aa6 100644 --- a/mk/bsd.makevars.mk +++ b/mk/bsd.makevars.mk @@ -1,9 +1,10 @@ -# $NetBSD: bsd.makevars.mk,v 1.1 2005/06/01 03:04:16 jlam Exp $ +# $NetBSD: bsd.makevars.mk,v 1.2 2005/06/01 17:05:19 jlam Exp $ # -# This Makefile fragment is included by other Makefiles to set all of +# This Makefile fragment is included by bsd.prefs.mk to set all of # the variables saved through MAKEVARS. Typical usage is: # -# .include "../../mk/bsd.makevars.mk" +# .include "../../mk/bsd.prefs.mk" +# # .if !define(EXPENSIVE_VAR) # EXPENSIVE_VAR!= ( ... an expensive computation ... ) # .endif @@ -26,8 +27,10 @@ _REV_ALL_PHASES:= ${_phase_} ${_REV_ALL_PHASES} .endif MAKEVARS+= _REV_ALL_PHASES -# Try including the .makevars.mk.* files in reverse order so that the -# latest file is included and no more. +# Try including the *.makevars.mk files in reverse order so that the +# latest file is included and no more. We check for _MAKEVARS_MK since +# all of the *.makevars.mk files define this symbol at the top of the +# file. # .for _phase_ in ${_REV_ALL_PHASES} _MAKEVARS_MK.${_phase_}= ${WRKDIR}/.${_phase_}_makevars.mk diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 462c8840d70..c724302daa4 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1682 2005/06/01 03:04:16 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1683 2005/06/01 17:05:19 jlam Exp $ # # This file is in the public domain. # @@ -20,7 +20,6 @@ .include "../../mk/bsd.prefs.mk" .include "../../mk/bsd.hacks.mk" -.include "../../mk/bsd.makevars.mk" # This has to come first to avoid showing all BUILD_DEFS added by this # Makefile, which are usually not customizable. diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index cc6f2eb7428..54cf66d5a32 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.193 2005/05/22 19:11:12 jlam Exp $ +# $NetBSD: bsd.prefs.mk,v 1.194 2005/06/01 17:05:19 jlam Exp $ # # Make file, included to get the site preferences, if any. Should # only be included by package Makefiles before any .if defined() @@ -566,4 +566,7 @@ PREPEND_PATH+= ${USE_X11:D${X11BASE}/bin} ${LOCALBASE}/bin # Wrapper framework definitions .include "${PKGSRCDIR}/mk/wrapper/wrapper-defs.mk" +# Make variable definitions cache +.include "${PKGSRCDIR}/mk/bsd.makevars.mk" + .endif # BSD_PKG_MK |