diff options
author | jlam <jlam@pkgsrc.org> | 2004-11-23 05:32:22 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-11-23 05:32:22 +0000 |
commit | 4b238ef92cb23c198134ac60979ad3e1124e8075 (patch) | |
tree | 25194d5a6ec672369f21a1dd8970340c18cbdbf4 /mk/compiler | |
parent | 37d283d9a6f3291f97956c391993265a4af62124 (diff) | |
download | pkgsrc-4b238ef92cb23c198134ac60979ad3e1124e8075.tar.gz |
Use CCPATH instead of referring to the C compiler by its full path in
multiple places.
Diffstat (limited to 'mk/compiler')
-rw-r--r-- | mk/compiler/ccc.mk | 8 | ||||
-rw-r--r-- | mk/compiler/gcc.mk | 10 | ||||
-rw-r--r-- | mk/compiler/mipspro.mk | 8 | ||||
-rw-r--r-- | mk/compiler/sunpro.mk | 8 | ||||
-rw-r--r-- | mk/compiler/xlc.mk | 6 |
5 files changed, 20 insertions, 20 deletions
diff --git a/mk/compiler/ccc.mk b/mk/compiler/ccc.mk index 4de3fe95b7b..388c1005f6f 100644 --- a/mk/compiler/ccc.mk +++ b/mk/compiler/ccc.mk @@ -1,4 +1,4 @@ -# $NetBSD: ccc.mk,v 1.4 2004/11/23 05:24:28 jlam Exp $ +# $NetBSD: ccc.mk,v 1.5 2004/11/23 05:32:22 jlam Exp $ .if !defined(COMPILER_CCC_MK) COMPILER_CCC_MK= defined @@ -37,9 +37,9 @@ CXX= ${PKG_CXX:T} CXXPATH= /usr/bin/cxx .endif -.if exists(/usr/bin/cc) && !defined(CC_VERSION_STRING) -CC_VERSION_STRING!= /usr/bin/cc -V 2>&1 | awk '{print; exit(0);}' -CC_VERSION!= /usr/bin/cc -V 2>&1 | awk '{print "CCC-"$3; exit(0);}' +.if exists(${CCPATH}) && !defined(CC_VERSION_STRING) +CC_VERSION_STRING!= ${CCPATH} -V 2>&1 | awk '{print; exit(0);}' +CC_VERSION!= ${CCPATH} -V 2>&1 | awk '{print "CCC-"$3; exit(0);}' .else CC_VERSION_STRING?= ${CC_VERSION} CC_VERSION?= CCC diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 9f20de73000..0af3292b316 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.75 2004/11/23 00:46:26 dmcmahill Exp $ +# $NetBSD: gcc.mk,v 1.76 2004/11/23 05:32:22 jlam Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined @@ -377,11 +377,11 @@ IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES .endif .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) -. if exists(${_GCCBINDIR}/gcc) -CC_VERSION_STRING!= ${_GCCBINDIR}/gcc -v 2>&1 +. if exists(${CCPATH}) +CC_VERSION_STRING!= ${CCPATH} -v 2>&1 CC_VERSION!= \ - if ${_GCCBINDIR}/gcc -dumpversion > /dev/null 2>&1; then \ - ${ECHO} "gcc-`${_GCCBINDIR}/gcc -dumpversion`"; \ + if ${CCPATH} -dumpversion > /dev/null 2>&1; then \ + ${ECHO} "gcc-`${CCPATH} -dumpversion`"; \ else \ ${ECHO} "gcc-${_GCC_REQD}"; \ fi diff --git a/mk/compiler/mipspro.mk b/mk/compiler/mipspro.mk index 9be1f9b4688..ede75b5c689 100644 --- a/mk/compiler/mipspro.mk +++ b/mk/compiler/mipspro.mk @@ -1,4 +1,4 @@ -# $NetBSD: mipspro.mk,v 1.27 2004/11/23 00:46:26 dmcmahill Exp $ +# $NetBSD: mipspro.mk,v 1.28 2004/11/23 05:32:22 jlam Exp $ .if !defined(COMPILER_MIPSPRO_MK) COMPILER_MIPSPRO_MK= defined @@ -34,10 +34,10 @@ CXX= ${PKG_CXX:T} CXXPATH= ${MIPSPROBASE}/bin/CC .endif -.if exists(${MIPSPROBASE}/bin/cc) +.if exists(${CCPATH}) # MIPSpro Compilers: Version 7.3.1.2m -CC_VERSION_STRING!= ${MIPSPROBASE}/bin/cc -version 2>&1 || ${TRUE} -CC_VERSION!= ${MIPSPROBASE}/bin/cc -version 2>&1 | ${GREP} '^MIPSpro' +CC_VERSION_STRING!= ${CCPATH} -version 2>&1 || ${TRUE} +CC_VERSION!= ${CCPATH} -version 2>&1 | ${GREP} '^MIPSpro' .else CC_VERSION_STRING?= ${CC_VERSION} CC_VERSION?= MIPSpro Compilers diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk index 1ad96a3c362..79fbb65c42e 100644 --- a/mk/compiler/sunpro.mk +++ b/mk/compiler/sunpro.mk @@ -1,4 +1,4 @@ -# $NetBSD: sunpro.mk,v 1.23 2004/11/23 00:46:26 dmcmahill Exp $ +# $NetBSD: sunpro.mk,v 1.24 2004/11/23 05:32:22 jlam Exp $ .if !defined(COMPILER_SUNPRO_MK) COMPILER_SUNPRO_MK= defined @@ -43,9 +43,9 @@ _COMPILER_RPATH_FLAG= -R # SunPro compiler must be passed certain flags to compile/link 64-bit code. _COMPILER_ABI_FLAG.64= -xtarget=ultra -xarch=v9 -.if exists(${SUNWSPROBASE}/bin/cc) -CC_VERSION_STRING!= ${SUNWSPROBASE}/bin/cc -V 2>&1 || ${TRUE} -CC_VERSION!= ${SUNWSPROBASE}/bin/cc -V 2>&1 | ${GREP} '^cc' +.if exists(${CCPATH}) +CC_VERSION_STRING!= ${CCPATH} -V 2>&1 || ${TRUE} +CC_VERSION!= ${CCPATH} -V 2>&1 | ${GREP} '^cc' .else CC_VERSION_STRING?= ${CC_VERSION} CC_VERSION?= cc: Sun C diff --git a/mk/compiler/xlc.mk b/mk/compiler/xlc.mk index a9db9352153..c410f799712 100644 --- a/mk/compiler/xlc.mk +++ b/mk/compiler/xlc.mk @@ -1,4 +1,4 @@ -# $NetBSD: xlc.mk,v 1.4 2004/11/23 05:24:28 jlam Exp $ +# $NetBSD: xlc.mk,v 1.5 2004/11/23 05:32:22 jlam Exp $ .if !defined(COMPILER_XLC_MK) COMPILER_XLC_MK= defined @@ -34,8 +34,8 @@ CXX= ${PKG_CXX:T} CXXPATH= ${XLCBASE}/bin/xlc++ .endif -.if exists(${XLCBASE}/bin/xlc) -CC_VERSION_STRING!= ${XLCBASE}/bin/xlc -V 2>&1 | ${GREP} 'IBM XL C.*for' | ${SED} -e 's/^ *//' || ${TRUE} +.if exists(${CCPATH}) +CC_VERSION_STRING!= ${CCPATH} -V 2>&1 | ${GREP} 'IBM XL C.*for' | ${SED} -e 's/^ *//' || ${TRUE} CC_VERSION= ${CC_VERSION_STRING} .else CC_VERSION_STRING?= ${CC_VERSION} |