/trunk/Examples/test-suite/chicken/Makefile.in
Autoconf | 99 lines | 65 code | 21 blank | 13 comment | 4 complexity | f11cf7089f8065b03126b9652b4e000d MD5 | raw file
1####################################################################### 2# Makefile for chicken test-suite 3####################################################################### 4 5LANGUAGE = chicken 6VARIANT = 7SCRIPTSUFFIX = _runme.ss 8PROXYSUFFIX = _runme_proxy.ss 9srcdir = @srcdir@ 10top_srcdir = @top_srcdir@ 11top_builddir = @top_builddir@ 12CHICKEN_CSI = @CHICKEN_CSI@ -quiet -batch -no-init 13SO = @SO@ 14 15#C_TEST_CASES = long_long list_vector pointer_in_out multivalue 16 17# Skip the STD cases for now, except for li_std_string.i 18SKIP_CPP_STD_CASES = Yes 19 20CPP_TEST_CASES += li_std_string 21 22EXTRA_TEST_CASES += chicken_ext_test.externaltest 23 24include $(srcdir)/../common.mk 25 26# Overridden variables here 27SWIGOPT += -nounit 28 29# Custom tests - tests with additional commandline options 30# If there exists a PROXYSUFFIX runme file, we also generate the wrapper 31# with the -proxy argument 32%.cppproxy: SWIGOPT += -proxy 33%.cppproxy: SCRIPTSUFFIX = $(PROXYSUFFIX) 34 35%.cproxy: SWIGOPT += -proxy 36%.cproxy: SCRIPTSUFFIX = $(PROXYSUFFIX) 37 38%.multiproxy: SWIGOPT += -proxy -noclosuses 39%.multiproxy: SCRIPTSUFFIX = $(PROXYSUFFIX) 40 41# Rules for the different types of tests 42%.cpptest: 43 $(setup) 44 +$(swig_and_compile_cpp) 45 $(run_testcase) 46 if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \ 47 $(MAKE) $*.cppproxy; \ 48 fi 49 50%.ctest: 51 $(setup) 52 +$(swig_and_compile_c) 53 $(run_testcase) 54 if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \ 55 $(MAKE) $*.cproxy; \ 56 fi 57 58%.multicpptest: 59 $(setup) 60 +$(swig_and_compile_multi_cpp) 61 $(run_testcase) 62 if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \ 63 $(MAKE) $*.multiproxy; \ 64 fi 65 66%.externaltest: 67 $(setup) 68 +$(swig_and_compile_external) 69 $(run_testcase) 70 71%.cppproxy: 72 echo "$(ACTION)ing testcase $* (with run test) under chicken with -proxy" 73 +$(swig_and_compile_cpp) 74 $(run_testcase) 75 76%.cproxy: 77 echo "$(ACTION)ing testcase $* (with run test) under chicken with -proxy" 78 +$(swig_and_compile_c) 79 $(run_testcase) 80 81%.multiproxy: 82 echo "$(ACTION)ing testcase $* (with run test) under chicken with -proxy" 83 +$(swig_and_compile_multi_cpp) 84 $(run_testcase) 85 86# Runs the testcase. A testcase is only run if 87# a file is found which has _runme.scm appended after the testcase name. 88run_testcase = \ 89 if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \ 90 env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(CHICKEN_CSI) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \ 91 fi 92 93# Clean 94%.clean: 95 96 97clean: 98 $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile chicken_clean 99 rm -f *.scm