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
This commit is contained in:
William S Fulton 2009-07-03 23:16:08 +00:00
commit 4851213163
2 changed files with 8 additions and 24 deletions

View file

@ -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)

View file

@ -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)