[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / src / usr.bin / cpp

File: [local] / src / usr.bin / cpp / Makefile (download)

Revision 1.10, Mon May 10 18:20:31 2010 UTC (14 years ago) by drahn
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.9: +3 -5 lines

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.

#	$OpenBSD: Makefile,v 1.10 2010/05/10 18:20:31 drahn Exp $

.include <bsd.own.mk>

NOMAN=

PROG=cpp
SRCS=
INSTALL_STRIP=

cpp: cpp.sh
.if ${COMPILER_VERSION:L} == "gcc3"
	sed -e 's/@GNUC@/-D__GNUC__/' -e 's/@dollaropt@//' ${.CURDIR}/cpp.sh >$@
.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 >$@
.endif

.include <bsd.prog.mk>