diff options
author | jlam <jlam> | 2004-02-06 03:04:50 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-02-06 03:04:50 +0000 |
commit | d446ccd672bee0419a7fe14c5a48da4d9057d5b9 (patch) | |
tree | 429ebb5ed1cad414f69277d63bfae94e1170955a /mk/buildlink2 | |
parent | 8f09416c8a3e46929130c54844cab505f73727bc (diff) | |
download | pkgsrc-d446ccd672bee0419a7fe14c5a48da4d9057d5b9.tar.gz |
We only prepend a directory to the PATH if we haven't already done so
(by checking PREPEND_PATH) and only for those phases of the build that
care about the PATH (buildlink or later). We also pass the PATH to
those same phases of the build so that executing ${CC} will work correctly
from custom {pre,do,post}-* targets that occur at buildlink time or
later.
Diffstat (limited to 'mk/buildlink2')
-rw-r--r-- | mk/buildlink2/bsd.buildlink2.mk | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk index a4d8370c174..fe3175c49d7 100644 --- a/mk/buildlink2/bsd.buildlink2.mk +++ b/mk/buildlink2/bsd.buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink2.mk,v 1.110 2004/02/05 09:57:53 jlam Exp $ +# $NetBSD: bsd.buildlink2.mk,v 1.111 2004/02/06 03:04:50 jlam Exp $ # # An example package buildlink2.mk file: # @@ -125,7 +125,11 @@ LDFLAGS+= ${FLAG} # Prepend ${BUILDLINK_DIR}/bin to the PATH so that the wrappers are found # first when searching for executables. # -PATH:= ${BUILDLINK_DIR}/bin:${PATH} +.if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \ + empty(PREPEND_PATH:M${BUILDLINK_DIR}/bin) +PREPEND_PATH+= ${BUILDLINK_DIR}/bin +PATH:= ${BUILDLINK_DIR}/bin:${PATH} +.endif .for _pkg_ in ${BUILDLINK_PACKAGES} # |