diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-06 03:04:50 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-06 03:04:50 +0000 |
commit | bed8d4d73eaa712ebf581692b1866330f1ea8ac7 (patch) | |
tree | 429ebb5ed1cad414f69277d63bfae94e1170955a /mk/tools.mk | |
parent | 498cdb2362645e8a34858e240ad37f89456f3816 (diff) | |
download | pkgsrc-bed8d4d73eaa712ebf581692b1866330f1ea8ac7.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} |