diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-06 04:37:02 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-06 04:37:02 +0000 |
commit | d72bb0e381ac340e9822b3b8a4a2d4a4f6df46f6 (patch) | |
tree | f6ef70f7dd739d99171898ff7944f83d524e3f1e /mk/compiler | |
parent | fd4c71ddde3378e0d549a90a5a311d8243a37f6e (diff) | |
download | pkgsrc-d72bb0e381ac340e9822b3b8a4a2d4a4f6df46f6.tar.gz |
Hiding the PATH from certain phases of the build only accidentally worked
due to a type on gcc.mk that causes the ${_GCC_PREFIX}/bin to always be
prepended to the PATH. The problem that was hiding was "make" resolving
to ${TOOLS_DIR}/bin/make if the package used GNU make, which broke
building since the package Makefile is a BSD Makefile and we passed
PATH to some phases of the build. Fix this by expanding MAKE to the
full path to ${MAKE} in bsd.prefs.mk. We also garbage collect the now
useless checks for PHASES_AFTER_BUILDLINK that cluttered the PREPEND_PATH
code.
Diffstat (limited to 'mk/compiler')
-rw-r--r-- | mk/compiler/ccache.mk | 5 | ||||
-rw-r--r-- | mk/compiler/distcc.mk | 5 | ||||
-rw-r--r-- | mk/compiler/gcc.mk | 11 | ||||
-rw-r--r-- | mk/compiler/mipspro.mk | 5 | ||||
-rw-r--r-- | mk/compiler/sunpro.mk | 5 |
5 files changed, 13 insertions, 18 deletions
diff --git a/mk/compiler/ccache.mk b/mk/compiler/ccache.mk index 22ce3a7e6ab..e636c0b7d6d 100644 --- a/mk/compiler/ccache.mk +++ b/mk/compiler/ccache.mk @@ -1,4 +1,4 @@ -# $NetBSD: ccache.mk,v 1.9 2004/02/06 03:04:50 jlam Exp $ +# $NetBSD: ccache.mk,v 1.10 2004/02/06 04:37:02 jlam Exp $ .if !defined(COMPILER_CCACHE_MK) COMPILER_CCACHE_MK= one @@ -58,8 +58,7 @@ COMPILER_CCACHE_MK+= two . if !empty(_USE_CCACHE:M[yY][eE][sS]) . if !empty(_LANGUAGES.ccache) -. if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \ - empty(PREPEND_PATH:M${_CCACHE_DIR}/bin) +. if empty(PREPEND_PATH:M${_CCACHE_DIR}/bin) PREPEND_PATH+= ${_CCACHE_DIR}/bin PATH:= ${_CCACHE_DIR}/bin:${PATH} . endif diff --git a/mk/compiler/distcc.mk b/mk/compiler/distcc.mk index c93040344d8..b256179d4ce 100644 --- a/mk/compiler/distcc.mk +++ b/mk/compiler/distcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: distcc.mk,v 1.12 2004/02/06 03:04:50 jlam Exp $ +# $NetBSD: distcc.mk,v 1.13 2004/02/06 04:37:02 jlam Exp $ .if !defined(COMPILER_DISTCC_MK) COMPILER_DISTCC_MK= one @@ -58,8 +58,7 @@ COMPILER_DISTCC_MK+= two . if !empty(_USE_DISTCC:M[yY][eE][sS]) . if !empty(_LANGUAGES.distcc) -. if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \ - empty(PREPEND_PATH:M${_DISTCC_DIR}/bin) +. if empty(PREPEND_PATH:M${_DISTCC_DIR}/bin) PREPEND_PATH+= ${_DISTCC_DIR}/bin PATH:= ${_DISTCC_DIR}/bin:${PATH} . endif diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index b3295ed0333..2b142b26e17 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.38 2004/02/06 03:04:50 jlam Exp $ +# $NetBSD: gcc.mk,v 1.39 2004/02/06 04:37:02 jlam Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= one @@ -298,17 +298,16 @@ COMPILER_GCC_MK+= two # Prepend the path to the compiler to the PATH. . if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) . if exists(${_GCC_PREFIX}bin/gcc) && !empty(_LANGUAGES.gcc) -. if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \ - empty(PREPEND_PATH:M${_GCC_PREFIX}bin) -PREPEND_PATH+= ${GCC_PREFIX}bin +. if empty(PREPEND_PATH:M${_GCC_PREFIX}bin) +FOO!= echo ${PREPEND_PATH} 1>&2; echo 0 +PREPEND_PATH+= ${_GCC_PREFIX}bin PATH:= ${_GCC_PREFIX}bin:${PATH} . endif . endif . elif !empty(_IS_BUILTIN_GCC:M[yY][eE][sS]) _CC_DIRPATH= ${_CC:H} . if !empty(_CC_DIRPATH:M/*) -. if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \ - empty(PREPEND_PATH:M${_CC_DIRPATH}) +. if empty(PREPEND_PATH:M${_CC_DIRPATH}) PREPEND_PATH+= ${_CC_DIRPATH} PATH:= ${_CC_DIRPATH}:${PATH} . endif diff --git a/mk/compiler/mipspro.mk b/mk/compiler/mipspro.mk index 0868c146c13..22d72b26c5e 100644 --- a/mk/compiler/mipspro.mk +++ b/mk/compiler/mipspro.mk @@ -1,4 +1,4 @@ -# $NetBSD: mipspro.mk,v 1.12 2004/02/06 03:04:50 jlam Exp $ +# $NetBSD: mipspro.mk,v 1.13 2004/02/06 04:37:02 jlam Exp $ .if !defined(COMPILER_MIPSPRO_MK) COMPILER_MIPSPRO_MK= one @@ -40,8 +40,7 @@ COMPILER_MIPSPRO_MK+= two # Prepend the path to the compiler to the PATH. . if !empty(_LANGUAGES.mipspro) -. if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \ - empty(PREPEND_PATH:M${MIPSPROBASE}/bin) +. if empty(PREPEND_PATH:M${MIPSPROBASE}/bin) PREPEND_PATH+= ${MIPSPROBASE}/bin PATH:= ${MIPSPROBASE}/bin:${PATH} . endif diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk index 827eb990edc..b15d4eb0ec0 100644 --- a/mk/compiler/sunpro.mk +++ b/mk/compiler/sunpro.mk @@ -1,4 +1,4 @@ -# $NetBSD: sunpro.mk,v 1.9 2004/02/06 03:04:50 jlam Exp $ +# $NetBSD: sunpro.mk,v 1.10 2004/02/06 04:37:02 jlam Exp $ .if !defined(COMPILER_SUNPRO_MK) COMPILER_SUNPRO_MK= one @@ -41,8 +41,7 @@ COMPILER_SUNPRO_MK+= two # Prepend the path to the compiler to the PATH. . if !empty(_LANGUAGES.sunpro) -. if !empty(PHASES_AFTER_BUILDLINK:M${PKG_PHASE}) && \ - empty(PREPEND_PATH:M${SUNWSPROBASE}/bin) +. if empty(PREPEND_PATH:M${SUNWSPROBASE}/bin) PREPEND_PATH+= ${SUNWSPROBASE}/bin PATH:= ${SUNWSPROBASE}/bin:${PATH} . endif |