diff options
author | jlam <jlam> | 2004-02-06 03:04:50 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-02-06 03:04:50 +0000 |
commit | 762753c48a02a72b82ad9af6c61060f9220b51fb (patch) | |
tree | 429ebb5ed1cad414f69277d63bfae94e1170955a /mk/buildlink3 | |
parent | 7eb52bbf2f9e891084603402572e189c25ca2bf1 (diff) | |
download | pkgsrc-762753c48a02a72b82ad9af6c61060f9220b51fb.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/buildlink3')
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index 28a4be01c85..7caec21041c 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.75 2004/02/05 07:17:14 jlam Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.76 2004/02/06 03:04:50 jlam Exp $ # # An example package buildlink3.mk file: # @@ -54,10 +54,14 @@ BUILDLINK_OPSYS?= ${OPSYS} # Prepend ${BUILDLINK_DIR}/bin to the PATH so that the wrappers are found # first when searching for executables. # -.if defined(_OPSYS_DEFAULT_PATH) +.if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \ + empty(PREPEND_PATH:M${BUILDLINK_DIR}/bin) +PREPEND_PATH+= ${BUILDLINK_DIR}/bin +. if defined(_OPSYS_DEFAULT_PATH) PATH:= ${BUILDLINK_DIR}/bin:${_OPSYS_DEFAULT_PATH} -.else +. else PATH:= ${BUILDLINK_DIR}/bin:${PATH} +. endif .endif # BUILDLINK_DEPENDS contains the list of packages for which we add |