diff --git a/Makefile b/Makefile index 877c0c32..9884ef78 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,9 @@ ifndef PLATFORM ifeq ($(shell uname),Darwin) PLATFORM=macosx else +ifeq ($(shell uname),FreeBSD) +PLATFORM=FreeBSD +else ifeq ($(shell uname -o),Msys) PLATFORM=mingw SOLIBDIR = $(BINDIR) @@ -50,6 +53,7 @@ endif endif endif endif +endif ifeq ($(PLATFORM),macosx) SO = .dylib @@ -79,6 +83,10 @@ SO = .so EXE = CLIBFLAGS = -fPIC -shared STATICFLAGS = -static -DSEXP_USE_DL=0 +ifeq ($(PLATFORM),FreeBSD) +LIBDL= +RLDFLAGS=-Wl,-R$(DESTDIR)$(LIBDIR) +endif endif endif endif @@ -207,7 +215,7 @@ test-basic: chibi-scheme$(EXE) done test-build: - ./tests/build/build-tests.sh + MAKE=$(MAKE) ./tests/build/build-tests.sh test-threads: chibi-scheme$(EXE) lib/srfi/18/threads$(SO) lib/srfi/39/param$(SO) lib/srfi/98/env$(SO) lib/chibi/ast$(SO) lib/chibi/time$(SO) $(CHIBI) tests/thread-tests.scm diff --git a/tests/build/build-tests.sh b/tests/build/build-tests.sh index 1d239629..62e41b20 100755 --- a/tests/build/build-tests.sh +++ b/tests/build/build-tests.sh @@ -11,12 +11,13 @@ BUILDDIR=tests/build FAILURES=0 +MAKE=${MAKE:-make} i=0 for opts in `cat ${BUILDDIR}/build-opts.txt`; do - make cleaner 2>&1 >/dev/null - if make $opts chibi-scheme 2>&1 >${BUILDDIR}/build${i}-make.out; then - if make test 2>&1 | tee ${BUILDDIR}/build${i}-test.out | grep -q -E 'FAIL|ERROR'; then + $MAKE cleaner 2>&1 >/dev/null + if $MAKE $opts chibi-scheme 2>&1 >${BUILDDIR}/build${i}-make.out; then + if $MAKE test 2>&1 | tee ${BUILDDIR}/build${i}-test.out | grep -q -E 'FAIL|ERROR'; then echo "[FAIL] ${i}: tests failed with $opts" FAILURES=$((FAILURES + 1)) else