summaryrefslogtreecommitdiff
path: root/usr.bin/cpp
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2010-05-10 18:20:32 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2010-05-10 18:20:32 +0000
commit3d048d0ab0d9212a257df4643785a7fc4500f65a (patch)
treeee69a2ee7a0126c6826e618641e3694b28356554 /usr.bin/cpp
parent74ec6f5d77854dfd44aaf3ee3e8836f9a15c38ff (diff)
Switch to using COMPILER_VERSION instead of USE_GCC3, allows for more flexible
complier picking, eg supporting gcc2, gcc3, and gcc4. based on diff by Marco, with fixes from espie@. ok espie@ general mumbling of approval of others.
Diffstat (limited to 'usr.bin/cpp')
-rw-r--r--usr.bin/cpp/Makefile8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/cpp/Makefile b/usr.bin/cpp/Makefile
index e81a0220fa9..d783b13bb07 100644
--- a/usr.bin/cpp/Makefile
+++ b/usr.bin/cpp/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.9 2010/05/03 18:34:01 drahn Exp $
+# $OpenBSD: Makefile,v 1.10 2010/05/10 18:20:31 drahn Exp $
.include <bsd.own.mk>
@@ -7,13 +7,11 @@ NOMAN=
PROG=cpp
SRCS=
INSTALL_STRIP=
-USE_GCC3?="no"
-USE_GCC4?="no"
cpp: cpp.sh
-.if ${USE_GCC3:L} == "yes"
+.if ${COMPILER_VERSION:L} == "gcc3"
sed -e 's/@GNUC@/-D__GNUC__/' -e 's/@dollaropt@//' ${.CURDIR}/cpp.sh >$@
-.elif ${USE_GCC4:L} == "yes"
+.elif ${COMPILER_VERSION:L} == "gcc4"
sed -e 's/@GNUC@//' -e 's/@dollaropt@//' ${.CURDIR}/cpp.sh >$@
.else
sed -e 's/@GNUC@/-D__GNUC__/' -e 's/@dollaropt@/-$$/' ${.CURDIR}/cpp.sh >$@