pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk fix logic error introduced in last, sync comments a...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7f64cd4f19d2
branches: trunk
changeset: 462771:7f64cd4f19d2
user: grant <grant%pkgsrc.org@localhost>
date: Sun Oct 12 03:05:37 2003 +0000
description:
fix logic error introduced in last, sync comments about CC_VERSION
with reality.
diffstat:
mk/compiler.mk | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (45 lines):
diff -r 44dc278be586 -r 7f64cd4f19d2 mk/compiler.mk
--- a/mk/compiler.mk Sun Oct 12 01:19:08 2003 +0000
+++ b/mk/compiler.mk Sun Oct 12 03:05:37 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.19 2003/10/11 03:43:14 grant Exp $
+# $NetBSD: compiler.mk,v 1.20 2003/10/12 03:05:37 grant Exp $
# This Makefile fragment implements handling for supported
# C/C++/fortran compilers.
@@ -46,7 +46,8 @@
#
# CC_VERSION
# The compiler and version being used. For gcc, this is
-# 'gcc-<version>' and (currently) empty for other compilers.
+# 'gcc-<version>' and the string reported by ${CC} -V | grep
+# '^cc' for others.
#
# e.g.
# .include "../../mk/bsd.prefs.mk"
@@ -229,20 +230,20 @@
.endif
# CC_VERSION can be tested by package Makefiles to tweak things based
-# on the compiler being used. This is only functional for gcc right now.
+# on the compiler being used.
#
CC_VERSION?= # empty
-.if !defined(_CC_VERSION)
-. if defined(_CC_IS_GCC)
+.if defined(_CC_IS_GCC)
+. if !defined(_CC_VERSION)
_CC_VERSION!= if ${CC} -dumpversion > /dev/null 2>&1; then \
${ECHO} `${CC} -dumpversion`; \
else \
${ECHO} ""; \
fi
+. endif
CC_VERSION= gcc-${_CC_VERSION}
-. else
+.else
CC_VERSION!= ${CC} -V 2>&1 | ${GREP} '^cc'
-. endif
.endif
# The SunPro C++ compiler doesn't support passing linker flags with
Home |
Main Index |
Thread Index |
Old Index