aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorbf <bf@FreeBSD.org>2011-08-20 08:19:37 +0800
committerbf <bf@FreeBSD.org>2011-08-20 08:19:37 +0800
commit60ee5e2fa337a8124850edf8c0697566bf4dba79 (patch)
treec95e9a2d50e47d41804b0dbd9f58ade20388c14d /math
parent40e5d84b88b7f40b8c018dab26914ae5ad94a47d (diff)
downloadfreebsd-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/Makefile22
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>