diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2010-05-03 18:34:02 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2010-05-03 18:34:02 +0000 |
commit | 36ee86173e1bd1cf3aa17f76b7401be27a5705ea (patch) | |
tree | 75fa9c4278c5bd71ce1b3dbc5cadd37e9302ec44 /usr.bin/cpp/Makefile | |
parent | 72a6f023642c24ed068b6564472df9d7ccec30cf (diff) |
Support gcc4 with cpp (gcc4 binary to be installed in /usr/libexec/cpp).
ok kettenis@
Diffstat (limited to 'usr.bin/cpp/Makefile')
-rw-r--r-- | usr.bin/cpp/Makefile | 12 |
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> |