pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/compiler Don't compute the CC_VERSION unless ${CC} ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cad66ecf6b61
branches:  trunk
changeset: 467675:cad66ecf6b61
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Feb 05 01:57:38 2004 +0000

description:
Don't compute the CC_VERSION unless ${CC} exists.

diffstat:

 mk/compiler/gcc.mk     |  6 +++++-
 mk/compiler/mipspro.mk |  6 +++++-
 mk/compiler/sunpro.mk  |  6 +++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diffs (65 lines):

diff -r 8e4957dc0de7 -r cad66ecf6b61 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Thu Feb 05 01:50:55 2004 +0000
+++ b/mk/compiler/gcc.mk        Thu Feb 05 01:57:38 2004 +0000
@@ -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 @@
 .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 -r 8e4957dc0de7 -r cad66ecf6b61 mk/compiler/mipspro.mk
--- a/mk/compiler/mipspro.mk    Thu Feb 05 01:50:55 2004 +0000
+++ b/mk/compiler/mipspro.mk    Thu Feb 05 01:57:38 2004 +0000
@@ -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 @@
 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 -r 8e4957dc0de7 -r cad66ecf6b61 mk/compiler/sunpro.mk
--- a/mk/compiler/sunpro.mk     Thu Feb 05 01:50:55 2004 +0000
+++ b/mk/compiler/sunpro.mk     Thu Feb 05 01:57:38 2004 +0000
@@ -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 @@
 
 _COMPILER_LD_FLAG=     # empty
 
+.if exists(${CC})
 CC_VERSION!=   ${CC} -V 2>&1 | ${GREP} '^cc'
+.else
+CC_VERSION=    sunpro
+.endif
 
 .endif # COMPILER_SUNPRO_MK



Home | Main Index | Thread Index | Old Index