2007-02-22 20:01:13 +01:00
|
|
|
# $NetBSD: Makefile,v 1.3 2007/02/22 19:01:24 wiz Exp $
|
2006-07-11 07:03:11 +02:00
|
|
|
#
|
|
|
|
|
2006-10-22 09:52:27 +02:00
|
|
|
DISTNAME= compiler-1.1
|
2006-07-11 07:03:11 +02:00
|
|
|
CATEGORIES= regress
|
|
|
|
MASTER_SITES= # none
|
|
|
|
DISTFILES= # none
|
|
|
|
|
|
|
|
MAINTAINER= rillig@NetBSD.org
|
|
|
|
COMMENT= Tests whether the pkgsrc compilers work as expected
|
|
|
|
|
|
|
|
NO_CHECKSUM= yes
|
|
|
|
WRKSRC= ${WRKDIR}
|
|
|
|
USE_TOOLS+= printf
|
|
|
|
|
|
|
|
SRC_CMD= ${PRINTF} '\#if defined(__cplusplus)\nLANG: Cplus\n\#else\nLANG: Cplain\n\#endif\n'
|
|
|
|
|
2006-10-22 09:52:27 +02:00
|
|
|
do-extract:
|
|
|
|
cd ${FILESDIR} && cp *.c ${WRKSRC}
|
|
|
|
|
2006-07-11 07:03:11 +02:00
|
|
|
do-build:
|
|
|
|
# Test whether CPP is a C preprocessor.
|
2006-10-22 09:52:27 +02:00
|
|
|
${SRC_CMD} | cpp -DLANG=Cplain
|
2006-07-11 07:03:11 +02:00
|
|
|
# Test whether CXXCPP is a C++ preprocessor.
|
|
|
|
# CXXCPP is not (yet)? defined.
|
2006-10-22 09:52:27 +02:00
|
|
|
#${SRC_CMD} | cxxcpp -DLANG=Cplus
|
|
|
|
# Test whether white-space is preserved in macro definitions.
|
|
|
|
cd ${WRKSRC} && cc checklen.c -o checklen -DLEN=4 -DSPACES=\"\ \ \ \ \" && ./checklen
|
|
|
|
cd ${WRKSRC} && cc checklen.c -o checklen -DLEN=4 -DSPACES=\"" \"" && ./checklen
|
|
|
|
cd ${WRKSRC} && cc checklen.c -o checklen -DLEN=4 -DSPACES='" "' && ./checklen
|
|
|
|
# Test whether backslashes are preserved in macro definitions.
|
|
|
|
cd ${WRKSRC} && cc -c checktype.c -DTYPE="unsigned long"
|
|
|
|
cd ${WRKSRC} && cc -c checktype.c -DTYPE=unsigned\ long
|
2007-02-22 20:01:13 +01:00
|
|
|
|
2006-07-11 07:03:11 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|