# makefile for regression tests, Time-stamp: <2006-09-29 09:52:17 feeley> # Copyright (C) 1994-2006 by Marc Feeley, All Rights Reserved. herefromroot = tests rootfromhere = .. escrootfromhere = ".." SUBDIRS = PACKAGE_SHORTNAME = gambc PACKAGE_NAME = Gambit-C PACKAGE_VERSION = 4.0b20 PACKAGE_STRING = Gambit-C 4.0b20 PACKAGE_BUGREPORT = gambit@iro.umontreal.ca PACKAGE_TARNAME = gambc-4.0b20 PACKAGE_SUBDIR = /4.0b20 srcdir = . srcdirpfx = C_COMPILER = arm-eabi-gcc C_PREPROC = arm-eabi-gcc -E FLAGS_OBJ = -DNDS -DUSE_DSWIFI -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fexpensive-optimizations -fforce-addr -fpeephole2 -falign-jumps -falign-functions -fno-function-cse -ftree-copyrename -ftree-fre -ftree-dce -fregmove -fgcse-las -freorder-functions -fcaller-saves -fno-if-conversion2 -foptimize-sibling-calls -fcse-skip-blocks -funit-at-a-time -finline-functions -fmodulo-sched -freschedule-modulo-scheduled-loops -fomit-frame-pointer -fPIC -fno-common FLAGS_DYN = -specs=ds_arm7.specs -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fexpensive-optimizations -fforce-addr -fpeephole2 -falign-jumps -falign-functions -fno-function-cse -ftree-copyrename -ftree-fre -ftree-dce -fregmove -fgcse-las -freorder-functions -fcaller-saves -fno-if-conversion2 -foptimize-sibling-calls -fcse-skip-blocks -funit-at-a-time -finline-functions -fmodulo-sched -freschedule-modulo-scheduled-loops -fomit-frame-pointer -fPIC -fno-common -rdynamic FLAGS_LIB = -specs=ds_arm7.specs -rdynamic FLAGS_EXE = -specs=ds_arm7.specs -rdynamic DEFS = -DHAVE_CONFIG_H LIBS = -lm -lc -lsysbase GAMBCLIB = libgambc.a INSTALL = $(rootfromhere)/install-sh -c INSTALL_DATA = $(rootfromhere)/install-sh -c -m 644 INSTALL_LIB = $(rootfromhere)/install-sh -c -m 644 INSTALL_PROGRAM = $(rootfromhere)/install-sh -c -m 755 prefix = /usr/local/Gambit-DS exec_prefix = /usr/local/Gambit-DS includedir = $(prefix)$(PACKAGE_SUBDIR)/include libdir = $(prefix)$(PACKAGE_SUBDIR)/lib bindir = $(prefix)$(PACKAGE_SUBDIR)/bin docdir = $(prefix)$(PACKAGE_SUBDIR)/doc infodir = $(prefix)$(PACKAGE_SUBDIR)/info emacsdir = $(prefix)$(PACKAGE_SUBDIR)/share/emacs/site-lisp INCLUDES = -I$(srcdirpfx)$(rootfromhere)/include -I$(srcdir) .SUFFIXES: DISTFILES = 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 input all: all-recursive all-local all-local: @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 @echo "============ ALL TESTS SUCCESSFUL" rm -f mem.c mem_.c mem.o mem.o1 mem_.o mem \ mix.c mix_.c mix.o mix_.o mix \ server.c server_.c server.o server_.o client.o \ client so_locations *.out tmp* test1: @echo "------------ TEST 1 (debugging support)" $(rootfromhere)/gsi/gsi -f debug.scm > test1.out diff $(srcdirpfx)test1.ok test1.out && rm -f test1.out test2: @echo "------------ TEST 2 (error handling)" $(rootfromhere)/gsi/gsi -:h4000 -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)" $(rootfromhere)/gsi/gsi -:s -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.o $(rootfromhere)/gsi/gsi -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 $(rootfromhere)/gsc/gsc -:=$(srcdirpfx)$(escrootfromhere) -f -c mix.scm diff $(srcdirpfx)test5.ok mix.c test6: @echo "------------ TEST 6 (link and execute the code generated)" rm -f mix_.c mix.o mix_.o mix $(rootfromhere)/gsc/gsc -:=$(srcdirpfx)$(escrootfromhere) -f -link mix.c $(C_COMPILER) $(INCLUDES) $(FLAGS_OBJ) -c mix.c $(C_COMPILER) $(INCLUDES) $(FLAGS_OBJ) -c mix_.c $(MAKE) link EXECUTABLE="mix" \ OBJECTS="mix.o mix_.o" \ OBJECTS_PLUS="+mix.o +mix_.o" \ OBJECTS_COMMA="mix.o,mix_.o" ./mix > test6.out diff $(srcdirpfx)test6.ok test6.out && \ rm -f test6.out mix.c mix_.c mix.o mix_.o mix test7: @echo "------------ TEST 7 (memory management and C-interface)" rm -f mem.c mem_.c mem.o mem_.o mem $(rootfromhere)/gsc/gsc -:=$(srcdirpfx)$(escrootfromhere) -f -link mem.scm $(C_COMPILER) $(INCLUDES) $(FLAGS_OBJ) -c mem.c $(C_COMPILER) $(INCLUDES) $(FLAGS_OBJ) -c mem_.c $(MAKE) link EXECUTABLE="mem" \ OBJECTS="mem.o mem_.o" \ OBJECTS_PLUS="+mem.o +mem_.o" \ OBJECTS_COMMA="mem.o,mem_.o" ./mem -:h4000 > test7.out diff $(srcdirpfx)test7.ok test7.out && \ rm -f test7.out mem.c mem_.c mem.o mem_.o mem test8: @echo "------------ TEST 8 (use C-interface to implement a Scheme server)" rm -f server.c server_.c server.o server_.o \ client.o client $(rootfromhere)/gsc/gsc -:=$(srcdirpfx)$(escrootfromhere) -f -link server.scm $(C_COMPILER) $(INCLUDES) $(FLAGS_OBJ) -c client.c $(C_COMPILER) $(INCLUDES) $(FLAGS_OBJ) -D___LIBRARY -c server.c $(C_COMPILER) $(INCLUDES) $(FLAGS_OBJ) -D___LIBRARY -c server_.c $(MAKE) link EXECUTABLE="client" \ OBJECTS="client.o server.o server_.o" \ OBJECTS_PLUS="+client.o +server.o +server_.o" \ OBJECTS_COMMA="client.o,server.o,server_.o" ./client > test8.out diff -w $(srcdirpfx)test8.ok test8.out && \ rm -f test8.out server.c server_.c server.o server_.o \ client.o client test9: @echo "------------ TEST 9 (dynamic compilation and loading of a module)" rm -f mem.o mem.o* $(rootfromhere)/gsc/gsc -:=$(srcdirpfx)$(escrootfromhere) -f -dynamic mem.scm $(rootfromhere)/gsi/gsi -:h4000 -f mem.o1 > test9.out diff $(srcdirpfx)test9.ok test9.out && rm -f test9.out mem.o mem.o1 link: $(C_COMPILER) $(FLAGS_EXE) $(OBJECTS) $(rootfromhere)/lib/$(GAMBCLIB) $(LIBS) -o $(EXECUTABLE) install-local: all uninstall-local: mostlyclean-local: rm -f mem.c mem_.c mem.o mem.o1 mem_.o mem mem.exe \ mix.c mix_.c mix.o mix_.o mix mix.exe \ server.c server_.c server.o server_.o client.o client \ client.exe gambit.h so_locations *.out tmp* clean-local: mostlyclean-local 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 distclean-local: clean-local rm -f makefile realclean-local: distclean-local all-recursive install-recursive uninstall-recursive mostlyclean-recursive clean-recursive distclean-recursive realclean-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 install: install-recursive install-local uninstall: uninstall-recursive uninstall-local mostlyclean: mostlyclean-recursive mostlyclean-local clean: clean-recursive clean-local distclean: distclean-recursive distclean-local realclean: realclean-recursive realclean-local dist: @if test -n "$(SUBDIRS)"; then \ for subdir in ""$(SUBDIRS); do \ echo making $@ in $$subdir; \ mkdir $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot)/$$subdir; \ chmod 777 $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot)/$$subdir; \ (cd $$subdir && $(MAKE) $(MDEFINES) $@) || exit 1; \ done \ fi @echo "Copying distribution files" @for file in $(DISTFILES); do \ ln $(srcdirpfx)$$file $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot) 2> /dev/null \ || cp -p $(srcdirpfx)$$file $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot); \ done 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: