summaryrefslogtreecommitdiff
path: root/usr.bin/cpp/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/cpp/Makefile')
-rw-r--r--usr.bin/cpp/Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/cpp/Makefile b/usr.bin/cpp/Makefile
index b99cc0482c2..e81a0220fa9 100644
--- a/usr.bin/cpp/Makefile
+++ b/usr.bin/cpp/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.8 2004/02/10 02:02:22 espie Exp $
+# $OpenBSD: Makefile,v 1.9 2010/05/03 18:34:01 drahn Exp $
.include <bsd.own.mk>
@@ -7,12 +7,16 @@ NOMAN=
PROG=cpp
SRCS=
INSTALL_STRIP=
+USE_GCC3?="no"
+USE_GCC4?="no"
cpp: cpp.sh
-.if ${USE_GCC3:L} == "no"
- sed -e 's/@dollaropt@/-$$/' ${.CURDIR}/cpp.sh >$@
+.if ${USE_GCC3:L} == "yes"
+ sed -e 's/@GNUC@/-D__GNUC__/' -e 's/@dollaropt@//' ${.CURDIR}/cpp.sh >$@
+.elif ${USE_GCC4:L} == "yes"
+ sed -e 's/@GNUC@//' -e 's/@dollaropt@//' ${.CURDIR}/cpp.sh >$@
.else
- sed -e 's/@dollaropt@//' ${.CURDIR}/cpp.sh >$@
+ sed -e 's/@GNUC@/-D__GNUC__/' -e 's/@dollaropt@/-$$/' ${.CURDIR}/cpp.sh >$@
.endif
.include <bsd.prog.mk>