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/tools.mk | |
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/tools.mk')
-rw-r--r-- | mk/tools.mk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mk/tools.mk b/mk/tools.mk index 0753aaddf01..483ad3a7b0b 100644 --- a/mk/tools.mk +++ b/mk/tools.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.mk,v 1.23 2004/02/03 08:57:20 grant Exp $ +# $NetBSD: tools.mk,v 1.24 2004/02/06 03:04:50 jlam Exp $ # # This Makefile creates a ${TOOLS_DIR} directory and populates the bin # subdir with tools that hide the ones outside of ${TOOLS_DIR}. @@ -6,11 +6,17 @@ .if !defined(TOOLS_MK) TOOLS_MK= # defined +.include "../../mk/bsd.prefs.mk" + # Prepend ${TOOLS_DIR}/bin to the PATH so that our scripts are found # first when searching for executables. # TOOLS_DIR= ${WRKDIR}/.tools +.if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \ + empty(PREPEND_PATH:M${TOOLS_DIR}/bin) +PREPEND_PATH+= ${TOOLS_DIR}/bin PATH:= ${TOOLS_DIR}/bin:${PATH} +.endif TOOLS_SHELL?= ${SH} _TOOLS_WRAP_LOG= ${WRKLOG} |