diff options
author | bf <bf@FreeBSD.org> | 2011-08-20 08:19:37 +0800 |
---|---|---|
committer | bf <bf@FreeBSD.org> | 2011-08-20 08:19:37 +0800 |
commit | 60ee5e2fa337a8124850edf8c0697566bf4dba79 (patch) | |
tree | c95e9a2d50e47d41804b0dbd9f58ade20388c14d /math | |
parent | 40e5d84b88b7f40b8c018dab26914ae5ad94a47d (diff) | |
download | freebsd-ports-gnome-60ee5e2fa337a8124850edf8c0697566bf4dba79.tar.gz freebsd-ports-gnome-60ee5e2fa337a8124850edf8c0697566bf4dba79.tar.zst freebsd-ports-gnome-60ee5e2fa337a8124850edf8c0697566bf4dba79.zip |
add a regression-test target and fix the clang build
Diffstat (limited to 'math')
-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> |