Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

368 lines (268 sloc) 10.875 kB
# makefile for regression tests.
# Copyright (c) 1994-2012 by Marc Feeley, All Rights Reserved.
herefromroot = tests
rootfromhere = ..
SUBDIRS =
PACKAGE_SHORTNAME = @PACKAGE_SHORTNAME@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
srcdirpfx = @srcdirpfx@
C_COMPILER = @C_COMPILER_MF@
C_PREPROC = @C_PREPROC_MF@
FLAGS_OBJ = @FLAGS_OBJ_MF@
FLAGS_DYN = @FLAGS_DYN_MF@
FLAGS_LIB = @FLAGS_LIB_MF@
FLAGS_EXE = @FLAGS_EXE_MF@
DEFS = @DEFS@
LIBS = @LIBS@
GAMBCLIB_DEFS = @GAMBCLIB_DEFS_MF@
LIB_PREFIX = @LIB_PREFIX@
LIB_EXTENSION = @LIB_EXTENSION@
GAMBCLIB = @GAMBCLIB@
GAMBCGSCLIB = @GAMBCGSCLIB@
GAMBCGSILIB = @GAMBCGSILIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LIB = @INSTALL_LIB@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
LN_S = @LN_S@
RANLIB = @RANLIB@
RC = @RC@
GIT = @GIT@
HG = @HG@
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
libdir = @libdir@
bindir = @bindir@
docdir = @docdir@
infodir = @infodir@
emacsdir = @emacsdir@
libexecdir = @libexecdir@
datarootdir = @datarootdir@
datadir = @datadir@
htmldir = @htmldir@
dvidir = @dvidir@
pdfdir = @pdfdir@
psdir = @psdir@
localedir = @localedir@
mandir = @mandir@
.SUFFIXES:
RCFILES = makefile.in \
debug.scm error.scm r4rstest.scm mix.scm mem.scm client.c server.scm server.h \
test1.ok test2.ok test3.ok test4.ok test5.ok test6.ok test7.ok \
test8.ok test9.ok test10.scm input
GENDISTFILES =
DISTFILES = $(RCFILES) $(GENDISTFILES)
GAMBCDIR_INCLUDE = $(srcdirpfx)$(rootfromhere)/include
GAMBCDIR_LIB = $(srcdirpfx)$(rootfromhere)/lib
GAMBCDIR_LIB_GSI = $(srcdirpfx)$(rootfromhere)/gsi
GAMBCDIR_LIB_GSC = $(srcdirpfx)$(rootfromhere)/gsc
all:
all-pre:
all-post:
@if [ ! -f debug.scm ]; then \
cp $(srcdirpfx)debug.scm .; \
touch debug.rm; \
cp $(srcdirpfx)error.scm .; \
touch error.rm; \
cp $(srcdirpfx)r4rstest.scm .; \
touch r4rstest.rm; \
cp $(srcdirpfx)mix.scm .; \
touch mix.rm; \
cp $(srcdirpfx)mem.scm .; \
touch mem.rm; \
cp $(srcdirpfx)server.scm .; \
touch server.rm; \
fi
check: all test1 test2 test3 test4 test5 test6 test7 test8 test9 test10
@echo "============ ALL TESTS SUCCESSFUL"
rm -f mem.c mem_.c mem@obj@ mem.o1 mem_@obj@ mem@exe@ \
mix.c mix_.c mix@obj@ mix_@obj@ mix@exe@ \
server.c server_.c server@obj@ server_@obj@ client@obj@ \
client@exe@ so_locations *.out tmp*
test1:
@echo "------------ TEST 1 (debugging support)"
@SETDLPATH@ $(rootfromhere)/gsi/gsi -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f debug.scm > test1.out
diff $(srcdirpfx)test1.ok test1.out && rm -f test1.out
test2:
@echo "------------ TEST 2 (error handling)"
@SETDLPATH@ $(rootfromhere)/gsi/gsi -:h4000,~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f error.scm < error.scm > test2.out
diff $(srcdirpfx)test2.ok test2.out && rm -f test2.out
test3:
@echo "------------ TEST 3 (interpreter and library functions)"
@SETDLPATH@ $(rootfromhere)/gsi/gsi -:s,~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -e '(begin (load "r4rstest.scm") (test-cont) (test-sc4) (test-delay) (exit))' > test3.out
diff $(srcdirpfx)test3.ok test3.out && rm -f test3.out tmp*
test4:
@echo "------------ TEST 4 (interpreter running an application)"
rm -f mix@obj@
@SETDLPATH@ $(rootfromhere)/gsi/gsi -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f mix.scm > test4.out
diff $(srcdirpfx)test4.ok test4.out && rm -f test4.out
test5:
@echo "------------ TEST 5 (compiler generating C code)"
rm -f mix.c
@SETDLPATH@ $(rootfromhere)/gsc/gsc -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -c mix.scm
diff $(srcdirpfx)test5.ok mix.c
test6: test5
@echo "------------ TEST 6 (link and execute the code generated)"
rm -f mix_.c mix@obj@ mix_@obj@ mix@exe@
@SETDLPATH@ $(rootfromhere)/gsc/gsc -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -o mix@exe@ -exe mix.c
@SETDLPATH@ ./mix@exe@ -:m4000 > test6.out
diff $(srcdirpfx)test6.ok test6.out && \
rm -f test6.out mix.c mix_.c mix@obj@ mix_@obj@ mix@exe@
test7:
@echo "------------ TEST 7 (memory management and C-interface)"
rm -f mem.c mem_.c mem@obj@ mem_@obj@ mem@exe@
@SETDLPATH@ $(rootfromhere)/gsc/gsc -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -o mem@exe@ -exe mem.scm
@SETDLPATH@ ./mem@exe@ -:h4000 > test7.out
diff $(srcdirpfx)test7.ok test7.out && \
rm -f test7.out mem.c mem_.c mem@obj@ mem_@obj@ mem@exe@
test8:
@echo "------------ TEST 8 (use C-interface to implement a Scheme server)"
rm -f server.c server_.c server@obj@ server_@obj@ \
client@obj@ client@exe@
@SETDLPATH@ $(rootfromhere)/gsc/gsc -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -link server.scm
$(MAKE) build_obj \
BUILD_OBJ_OUTPUT_FILENAME="client@obj@" \
BUILD_OBJ_CC_OPTIONS="" \
BUILD_OBJ_INPUT_FILENAMES="client.c"
$(MAKE) build_obj_library \
BUILD_OBJ_OUTPUT_FILENAME="server@obj@" \
BUILD_OBJ_CC_OPTIONS="" \
BUILD_OBJ_INPUT_FILENAMES="server.c"
$(MAKE) build_obj_library \
BUILD_OBJ_OUTPUT_FILENAME="server_@obj@" \
BUILD_OBJ_CC_OPTIONS="" \
BUILD_OBJ_INPUT_FILENAMES="server_.c"
$(MAKE) build_exe \
BUILD_EXE_OUTPUT_FILENAME="client@exe@" \
BUILD_EXE_CC_OPTIONS="" \
BUILD_EXE_LD_OPTIONS_PRELUDE="" \
BUILD_EXE_INPUT_FILENAMES="client@obj@ server@obj@ server_@obj@" \
BUILD_EXE_LD_OPTIONS=""
@SETDLPATH@ ./client@exe@ > test8.out
diff -w $(srcdirpfx)test8.ok test8.out && \
rm -f test8.out server.c server_.c server@obj@ server_@obj@ \
client@obj@ client@exe@
test9: test7
@echo "------------ TEST 9 (dynamic compilation and loading of a module)"
rm -rf mem@obj@ mem.o*
@SETDLPATH@ $(rootfromhere)/gsc/gsc -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f mem.scm
@SETDLPATH@ $(rootfromhere)/gsi/gsi -:h4000 -f mem.o1 > test9.out
diff $(srcdirpfx)test9.ok test9.out && rm -f test9.out mem@obj@ mem.o1
test10:
@echo "------------ TEST 10 (consistency of lib/gambit#.scm)"
rm -rf mem@obj@ mem.o*
@SETDLPATH@ $(rootfromhere)/gsc/gsc -:~~bin=$(srcdirpfx)$(rootfromhere)/bin,~~lib=$(srcdirpfx)$(rootfromhere)/lib,~~include=$(srcdirpfx)$(rootfromhere)/include -f -i test10.scm
build_obj:
@BUILD_OBJ@
build_obj_library:
@BUILD_OBJ@ -D___LIBRARY
build_exe:
@BUILD_EXE@
bootstrap-pre:
bootstrap-post:
install-pre:
install-post: all
uninstall-pre:
uninstall-post:
select-gen-for-commit-pre:
select-gen-for-commit-post:
deselect-gen-for-commit-pre:
deselect-gen-for-commit-post:
mostlyclean-pre:
mostlyclean-post:
rm -f mem.c mem_.c mem@obj@ mem.o1 mem_@obj@ mem mem.exe \
mix.c mix_.c mix@obj@ mix_@obj@ mix mix.exe \
server.c server_.c server@obj@ server_@obj@ client@obj@ client \
client.exe gambit.h so_locations *.out tmp*
clean-pre: mostlyclean-pre
clean-post: mostlyclean-post
test ! -f debug.rm || rm -f debug.rm debug.scm
test ! -f error.rm || rm -f error.rm error.scm
test ! -f r4rstest.rm || rm -f r4rstest.rm r4rstest.scm
test ! -f mix.rm || rm -f mix.rm mix.scm
test ! -f mem.rm || rm -f mem.rm mem.scm
test ! -f server.rm || rm -f server.rm server.scm
rm -f *.da *.bb *.bbg *.gcov *.gcno *.gcda
distclean-pre: clean-pre
distclean-post: clean-post
bootclean-pre: distclean-pre
bootclean-post: distclean-post
realclean-pre: bootclean-pre
realclean-post: bootclean-post
rm -f makefile
rc-setup-pre:
$(RC) add $(RCFILES)
rc-setup-post:
dist-pre dist-devel-pre:
mkdir $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot)
chmod 777 $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot)
@echo " Copying distribution files:"
@for file in $(DISTFILES); do \
echo " $(herefromroot)/$$file"; \
ln $(srcdirpfx)$$file $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot) 2> /dev/null \
|| cp -p $(srcdirpfx)$$file $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot); \
done
dist-post dist-devel-post:
all-recursive bootstrap-recursive install-recursive uninstall-recursive select-gen-for-commit-recursive deselect-gen-for-commit-recursive mostlyclean-recursive clean-recursive distclean-recursive bootclean-recursive realclean-recursive rc-setup-recursive dist-recursive dist-devel-recursive:
@if test -n "$(SUBDIRS)"; then \
for subdir in ""$(SUBDIRS); do \
target=`echo $@ | sed 's/-recursive//'`; \
echo making $$target in $$subdir; \
(cd $$subdir && $(MAKE) $$target) || exit 1; \
done \
fi
all: all-post
all-post: all-recursive
all-recursive: all-pre
bootstrap: bootstrap-post
bootstrap-post: bootstrap-recursive
bootstrap-recursive: bootstrap-pre
install: install-post
install-post: install-recursive
install-recursive: install-pre
uninstall: uninstall-post
uninstall-post: uninstall-recursive
uninstall-recursive: uninstall-pre
select-gen-for-commit: select-gen-for-commit-post
select-gen-for-commit-post: select-gen-for-commit-recursive
select-gen-for-commit-recursive: select-gen-for-commit-pre
deselect-gen-for-commit: deselect-gen-for-commit-post
deselect-gen-for-commit-post: deselect-gen-for-commit-recursive
deselect-gen-for-commit-recursive: deselect-gen-for-commit-pre
mostlyclean: mostlyclean-post
mostlyclean-post: mostlyclean-recursive
mostlyclean-recursive: mostlyclean-pre
clean: clean-post
clean-post: clean-recursive
clean-recursive: clean-pre
distclean: distclean-post
distclean-post: distclean-recursive
distclean-recursive: distclean-pre
bootclean: bootclean-post
bootclean-post: bootclean-recursive
bootclean-recursive: bootclean-pre
realclean: realclean-post
realclean-post: realclean-recursive
realclean-recursive: realclean-pre
rc-setup: rc-setup-post
rc-setup-post: rc-setup-recursive
rc-setup-recursive: rc-setup-pre
dist: dist-post
dist-post: dist-recursive
dist-recursive: dist-pre
dist-devel: dist-devel-post
dist-devel-post: dist-devel-recursive
dist-devel-recursive: dist-devel-pre
makefile: makefile.in $(rootfromhere)/config.status
cd $(rootfromhere) && CONFIG_FILES=$(herefromroot)/$@ CONFIG_HEADERS= ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Jump to Line
Something went wrong with that request. Please try again.