blob: 2d0c8a383605453b149b66632726f3009d77b619 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# $NetBSD: Makefile,v 1.3 2007/02/22 19:01:24 wiz Exp $
#
DISTNAME= compiler-1.1
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'
do-extract:
cd ${FILESDIR} && cp *.c ${WRKSRC}
do-build:
# Test whether CPP is a C preprocessor.
${SRC_CMD} | cpp -DLANG=Cplain
# Test whether CXXCPP is a C++ preprocessor.
# CXXCPP is not (yet)? defined.
#${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
.include "../../mk/bsd.pkg.mk"
|