diff options
author | Brendan Fabeny <bf@FreeBSD.org> | 2011-08-20 00:19:37 +0000 |
---|---|---|
committer | Brendan Fabeny <bf@FreeBSD.org> | 2011-08-20 00:19:37 +0000 |
commit | 779a20adf23e4990e15c7186d4dfb23989fba85f (patch) | |
tree | 35f9160dca12b74e93d59ff230d642a20bb68a50 /math/testu01 | |
parent | a459b71ddd8d7b8681d2e5faf7f80f64d2a48ef3 (diff) | |
download | ports-779a20adf23e4990e15c7186d4dfb23989fba85f.tar.gz ports-779a20adf23e4990e15c7186d4dfb23989fba85f.zip |
add a regression-test target and fix the clang build
Notes
Notes:
svn path=/head/; revision=280042
Diffstat (limited to 'math/testu01')
-rw-r--r-- | math/testu01/Makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/math/testu01/Makefile b/math/testu01/Makefile index 59edb51be747..b19576fc87c9 100644 --- a/math/testu01/Makefile +++ b/math/testu01/Makefile @@ -33,6 +33,7 @@ PLIST_SUB= PORTNAME="${PORTNAME}" post-patch: @${REINPLACE_CMD} -e 's|echo aout|echo elf|' ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|return|& (0)|' ${WRKSRC}/testu01/fftc.c .ifdef(NOPORTDOCS) @${REINPLACE_CMD} -e '/^SUBDIRS \=/s/ doc / /' ${WRKSRC}/Makefile.in @${FIND} -X ${WRKSRC} -name 'Makefile.in' | ${XARGS} ${REINPLACE_CMD} \ @@ -47,4 +48,25 @@ post-install: @${INSTALL_DATA} ${DISTDIR}/testu01.pdf ${DOCSDIR} .endif +check regression-test test: build + @cd ${WRKSRC}/examples ; \ + for f in [mx]*.c ; do \ + ${CC} ${CFLAGS} -c $${f} -I. -I../include ; \ + done ; \ + for t in [befs]*.c; do \ + case $${t} in \ + ex3.c) x="my16807.o" ;; \ + ex7.c) x="mrg32k3a.o xorshift.o" ;; \ + scat.c) continue ;; \ + *) x="" ;; \ + esac ; \ + ${CC} ${CFLAGS} ${LDFLAGS} -o $${t%.c} $${t} -I. -I../include \ + -Wl,--as-needed $${x} ../testu01/.libs/libtestu01.so \ + ../probdist/.libs/libprobdist.so ../mylib/.libs/libmylib.so -lm ; \ + ${ECHO_CMD} "Running $${t%.c}..." ; \ + ${SETENV} \ + LD_LIBRARY_PATH=../testu01/.libs:../probdist/.libs:../mylib/.libs \ + ./$${t%.c} ; \ + done + .include <bsd.port.mk> |