summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2009-07-03 23:16:08 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2009-07-03 23:16:08 +0000
commit4851213163835e382409e6052d4116616b940427 (patch)
tree110da4ab0c13be899bc0f4f3f15cbe1b9e63b353
parent144944dd8bf17f2f8386779faba6d5136dece9fb (diff)
downloadswig-4851213163835e382409e6052d4116616b940427.tar.gz
Improved way of overriding commandline options for the multicpptests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11358 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r--Examples/test-suite/guile/Makefile.in22
-rw-r--r--Examples/test-suite/guilescm/Makefile.in10
2 files changed, 8 insertions, 24 deletions
diff --git a/Examples/test-suite/guile/Makefile.in b/Examples/test-suite/guile/Makefile.in
index 1fc63a436..afea6a850 100644
--- a/Examples/test-suite/guile/Makefile.in
+++ b/Examples/test-suite/guile/Makefile.in
@@ -9,8 +9,13 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
GUILE = @GUILE@
+GUILE_RUNTIME=-runtime
+
+C_TEST_CASES = long_long \
+ list_vector \
+ multivalue \
+ pointer_in_out
-C_TEST_CASES = long_long list_vector pointer_in_out multivalue
include $(srcdir)/../common.mk
@@ -18,7 +23,7 @@ include $(srcdir)/../common.mk
# none!
# Custom tests - tests with additional commandline options
-# none!
+%.multicpptest: SWIGOPT += $(GUILE_RUNTIME)
# Rules for the different types of tests
%.cpptest:
@@ -31,19 +36,6 @@ include $(srcdir)/../common.mk
+$(swig_and_compile_c)
$(run_testcase)
-# override the default in common.mk by adding SWIGOPT +=
-swig_and_compile_multi_cpp = \
- for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
- SWIGOPT=" -runtime "; \
- export SWIGOPT; \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CXXSRCS="$(CXXSRCS)" \
- SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" LIBS='$(LIBS)' \
- INCLUDES="$(INCLUDES)" SWIGOPT="$(SWIGOPT) $$SWIGOPT" NOLINK=true \
- TARGET="$(TARGETPREFIX)$${f}$(TARGETSUFFIX)" INTERFACEDIR="$(INTERFACEDIR)" INTERFACE="$$f.i" \
- $(LANGUAGE)$(VARIANT)_cpp; \
- SWIGOPT=" -noruntime "; \
- done
-
%.multicpptest:
$(setup)
+$(swig_and_compile_multi_cpp)
diff --git a/Examples/test-suite/guilescm/Makefile.in b/Examples/test-suite/guilescm/Makefile.in
index ae7c7b96c..854b1ac7f 100644
--- a/Examples/test-suite/guilescm/Makefile.in
+++ b/Examples/test-suite/guilescm/Makefile.in
@@ -11,6 +11,7 @@ INCLUDES += -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/guilescm
VARIANT =
# Refer to the guile directory for the run scripts
SCRIPTPREFIX = ../guile/
+GUILE_RUNTIME=
# Custom tests - tests with additional commandline options
# none!
@@ -29,15 +30,6 @@ setup = \
echo "$(ACTION)ing testcase $* under $(LANGUAGE) (with SCM API)" ; \
fi;
-swig_and_compile_multi_cpp = \
- for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CXXSRCS="$(CXXSRCS)" \
- SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" LIBS='$(LIBS)' \
- INCLUDES="$(INCLUDES)" SWIGOPT="$(SWIGOPT) $$SWIGOPT" NOLINK=true \
- TARGET="$(TARGETPREFIX)$${f}$(TARGETSUFFIX)" INTERFACEDIR="$(INTERFACEDIR)" INTERFACE="$$f.i" \
- $(LANGUAGE)$(VARIANT)_cpp; \
- done
-
%.externaltest:
$(local_setup)
+$(swig_and_compile_external)