summaryrefslogtreecommitdiff
path: root/mk/compiler/distcc.mk
diff options
context:
space:
mode:
authorjlam <jlam>2004-02-06 03:04:50 +0000
committerjlam <jlam>2004-02-06 03:04:50 +0000
commit762753c48a02a72b82ad9af6c61060f9220b51fb (patch)
tree429ebb5ed1cad414f69277d63bfae94e1170955a /mk/compiler/distcc.mk
parent7eb52bbf2f9e891084603402572e189c25ca2bf1 (diff)
downloadpkgsrc-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/compiler/distcc.mk')
-rw-r--r--mk/compiler/distcc.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/mk/compiler/distcc.mk b/mk/compiler/distcc.mk
index 603b2932094..c93040344d8 100644
--- a/mk/compiler/distcc.mk
+++ b/mk/compiler/distcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: distcc.mk,v 1.11 2004/02/05 03:39:17 jlam Exp $
+# $NetBSD: distcc.mk,v 1.12 2004/02/06 03:04:50 jlam Exp $
.if !defined(COMPILER_DISTCC_MK)
COMPILER_DISTCC_MK= one
@@ -58,8 +58,13 @@ COMPILER_DISTCC_MK+= two
. if !empty(_USE_DISTCC:M[yY][eE][sS])
. if !empty(_LANGUAGES.distcc)
-PATH:= ${_DISTCC_DIR}/bin:${PATH}
+. if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \
+ empty(PREPEND_PATH:M${_DISTCC_DIR}/bin)
+PREPEND_PATH+= ${_DISTCC_DIR}/bin
+PATH:= ${_DISTCC_DIR}/bin:${PATH}
+. endif
. endif
+. endif
BUILD_DEPENDS+= distcc-[0-9]*:../../devel/distcc