diff options
author | jlam <jlam> | 2004-02-05 01:57:38 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-02-05 01:57:38 +0000 |
commit | a3333d67ba615234c99f8b9baf3a4bd58b259897 (patch) | |
tree | b20b6bb0d4b685ae78f4ad4aac9a00251bf0cbf8 /mk/compiler | |
parent | c098d4e0bdc24cea3b5c098801cc6cb95dd113b7 (diff) | |
download | pkgsrc-a3333d67ba615234c99f8b9baf3a4bd58b259897.tar.gz |
Don't compute the CC_VERSION unless ${CC} exists.
Diffstat (limited to 'mk/compiler')
-rw-r--r-- | mk/compiler/gcc.mk | 6 | ||||
-rw-r--r-- | mk/compiler/mipspro.mk | 6 | ||||
-rw-r--r-- | mk/compiler/sunpro.mk | 6 |
3 files changed, 15 insertions, 3 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 2e388e076e8..78c58023755 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.34 2004/02/05 01:50:55 jlam Exp $ +# $NetBSD: gcc.mk,v 1.35 2004/02/05 01:57:38 jlam Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined @@ -295,11 +295,15 @@ IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES .endif .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) +. if exists(${CC}) CC_VERSION!= if ${CC} -dumpversion > /dev/null 2>&1; then \ ${ECHO} "gcc-`${CC} -dumpversion`"; \ else \ ${ECHO} "gcc-${_GCC_REQD}"; \ fi +. else +CC_VERSION= gcc-${_GCC_REQD} +. endif .else CC_VERSION= ${_GCC_PKG} .endif diff --git a/mk/compiler/mipspro.mk b/mk/compiler/mipspro.mk index d4592c5e0c3..e7ecd4986dc 100644 --- a/mk/compiler/mipspro.mk +++ b/mk/compiler/mipspro.mk @@ -1,4 +1,4 @@ -# $NetBSD: mipspro.mk,v 1.7 2004/02/03 20:38:39 jlam Exp $ +# $NetBSD: mipspro.mk,v 1.8 2004/02/05 01:57:38 jlam Exp $ .if !defined(COMPILER_MIPSPRO_MK) COMPILER_MIPSPRO_MK= defined @@ -26,6 +26,10 @@ CPP= ${MIPSPROBASE}/bin/cc -E CXX= ${MIPSPROBASE}/bin/CC .endif +if exists(${CC}) CC_VERSION!= ${CC} -V 2>&1 | ${GREP} '^cc' +.else +CC_VERSION= mipspro +.endif .endif # COMPILER_MIPSPRO_MK diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk index e855d1983a8..7618004907f 100644 --- a/mk/compiler/sunpro.mk +++ b/mk/compiler/sunpro.mk @@ -1,4 +1,4 @@ -# $NetBSD: sunpro.mk,v 1.5 2004/02/03 20:38:39 jlam Exp $ +# $NetBSD: sunpro.mk,v 1.6 2004/02/05 01:57:38 jlam Exp $ .if !defined(COMPILER_SUNPRO_MK) COMPILER_SUNPRO_MK= defined @@ -28,6 +28,10 @@ CXX= ${SUNWSPROBASE}/bin/CC _COMPILER_LD_FLAG= # empty +.if exists(${CC}) CC_VERSION!= ${CC} -V 2>&1 | ${GREP} '^cc' +.else +CC_VERSION= sunpro +.endif .endif # COMPILER_SUNPRO_MK |