summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2003-07-13 06:44:02 +0000
committergrant <grant@pkgsrc.org>2003-07-13 06:44:02 +0000
commit30373d0843908d3d9c7ca125a54571984df4f54d (patch)
treeb689af55c3fddb0a90382bf002a20b7d39966134 /mk
parent9dcb7fb8b232af106e96f46c54c4734c343598a0 (diff)
downloadpkgsrc-30373d0843908d3d9c7ca125a54571984df4f54d.tar.gz
when creating the buildinfo file, set CC=${CC} without the version
information, and set CC_VERSION appropriately by trying -v and -V args. works for gcc2, gcc3 and SunPro, may need tweaking for MIPSPro.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk9
1 files changed, 6 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 41a23be7f1d..8c2e2f2d6f4 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1213 2003/07/12 15:34:37 wiz Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1214 2003/07/13 06:44:02 grant Exp $
#
# This file is in the public domain.
#
@@ -4206,8 +4206,11 @@ fake-pkg: ${PLIST} ${DESCR} ${MESSAGE}
. for def in ${BUILD_DEFS}
@${ECHO} ${def}=${${def}:Q} | ${SED} -e 's|^PATH=[^ ]*|PATH=...|' >> ${BUILD_INFO_FILE}
. endfor
- @if ${CC} -dumpversion >/dev/null 2>&1; then \
- ${ECHO} "CC=${CC}-`${CC} -dumpversion`" >> ${BUILD_INFO_FILE}; \
+ @${ECHO} "CC=${CC}" >> ${BUILD_INFO_FILE}
+ @if ${CC} -v 2>&1 | ${GREP} -q '^gcc'; then \
+ ${ECHO} "CC_VERSION=`${CC} -v 2>&1 | ${GREP} '^gcc'`" >> ${BUILD_INFO_FILE}; \
+ elif ${CC} -V 2>&1 | ${GREP} -q '^cc'; then \
+ ${ECHO} "CC_VERSION=`${CC} -V 2>&1 | ${GREP} '^cc'`" >> ${BUILD_INFO_FILE}; \
fi
. if defined(USE_PERL5) && (${USE_PERL5} == "run")
@${ECHO} "PERL=`${PERL5} --version 2>/dev/null | ${GREP} 'This is perl'`" >> ${BUILD_INFO_FILE}