summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2014-05-13 23:30:00 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2014-05-15 23:11:07 +0100
commit2b5499a2628edda34f2deccd668001093d4a562d (patch)
treeb52c55c1568c8780fe71ddd419bd26644107669b
parentf574a34155e4ede49b1b023494e0a1637ab89f8f (diff)
downloadswig-2b5499a2628edda34f2deccd668001093d4a562d.tar.gz
Slight simplification of test-suite build for new out-of-source changes
Provide default SRCDIR and SCRIPTDIR variables in common.mk and override only where needed.
-rw-r--r--Examples/Makefile.in4
-rw-r--r--Examples/test-suite/allegrocl/Makefile.in5
-rw-r--r--Examples/test-suite/cffi/Makefile.in5
-rw-r--r--Examples/test-suite/chicken/Makefile.in5
-rw-r--r--Examples/test-suite/clisp/Makefile.in5
-rw-r--r--Examples/test-suite/common.mk2
-rw-r--r--Examples/test-suite/csharp/Makefile.in7
-rw-r--r--Examples/test-suite/d/Makefile.in5
-rw-r--r--Examples/test-suite/errors/Makefile.in5
-rw-r--r--Examples/test-suite/go/Makefile.in6
-rw-r--r--Examples/test-suite/guile/Makefile.in6
-rw-r--r--Examples/test-suite/java/Makefile.in7
-rw-r--r--Examples/test-suite/javascript/Makefile.in5
-rw-r--r--Examples/test-suite/lua/Makefile.in6
-rw-r--r--Examples/test-suite/mzscheme/Makefile.in5
-rw-r--r--Examples/test-suite/ocaml/Makefile.in5
-rw-r--r--Examples/test-suite/octave/Makefile.in6
-rw-r--r--Examples/test-suite/perl5/Makefile.in6
-rw-r--r--Examples/test-suite/php/Makefile.in6
-rw-r--r--Examples/test-suite/pike/Makefile.in5
-rw-r--r--Examples/test-suite/python/Makefile.in15
-rw-r--r--Examples/test-suite/r/Makefile.in5
-rw-r--r--Examples/test-suite/ruby/Makefile.in6
-rw-r--r--Examples/test-suite/tcl/Makefile.in6
-rw-r--r--Examples/test-suite/uffi/Makefile.in5
25 files changed, 9 insertions, 134 deletions
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index dcfbd83b9..d22a85abc 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -26,8 +26,8 @@ Makefile: @srcdir@/Makefile.in ../config.status
cd .. && $(SHELL) ./config.status Examples/Makefile
# SRCDIR is the relative path to the current source directory
-# - For in-source-tree builds, SRCDIR with be either '',
-# or '../' for some of the test suites (e.g. C#, Java)
+# - For in-source-tree builds, SRCDIR with be either '' or './', but
+# '../' for the test suites that build in a subdir (e.g. C#, Java)
# - For out-of-source-tree builds, SRCDIR will be a relative
# path ending with a '/'
diff --git a/Examples/test-suite/allegrocl/Makefile.in b/Examples/test-suite/allegrocl/Makefile.in
index 2803b7012..7c21e18cd 100644
--- a/Examples/test-suite/allegrocl/Makefile.in
+++ b/Examples/test-suite/allegrocl/Makefile.in
@@ -9,11 +9,6 @@ SCRIPTSUFFIX = _runme.lisp
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
# these cpp tests generate warnings/errors when compiling
diff --git a/Examples/test-suite/cffi/Makefile.in b/Examples/test-suite/cffi/Makefile.in
index a530e2243..164538e2b 100644
--- a/Examples/test-suite/cffi/Makefile.in
+++ b/Examples/test-suite/cffi/Makefile.in
@@ -9,11 +9,6 @@ SCRIPTSUFFIX = _runme.lisp
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
include $(srcdir)/../common.mk
diff --git a/Examples/test-suite/chicken/Makefile.in b/Examples/test-suite/chicken/Makefile.in
index ac02dad83..bdda02b7e 100644
--- a/Examples/test-suite/chicken/Makefile.in
+++ b/Examples/test-suite/chicken/Makefile.in
@@ -10,11 +10,6 @@ PROXYSUFFIX = _runme_proxy.ss
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
CHICKEN_CSI = @CHICKEN_CSI@ -quiet -batch -no-init
SO = @SO@
diff --git a/Examples/test-suite/clisp/Makefile.in b/Examples/test-suite/clisp/Makefile.in
index 9db84c561..525605254 100644
--- a/Examples/test-suite/clisp/Makefile.in
+++ b/Examples/test-suite/clisp/Makefile.in
@@ -9,11 +9,6 @@ SCRIPTSUFFIX = _runme.lisp
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
include $(srcdir)/../common.mk
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index 37d660989..d93d788c9 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -70,6 +70,8 @@ LIBS = -L.
LIBPREFIX = lib
ACTION = check
INTERFACEDIR = ../
+SRCDIR = $(srcdir)/
+SCRIPTDIR = $(srcdir)
# Regenerate Makefile if Makefile.in or config.status have changed.
ifeq (,$(TEST_SUITE_SUBDIR))
diff --git a/Examples/test-suite/csharp/Makefile.in b/Examples/test-suite/csharp/Makefile.in
index a2a0828fd..7bec108eb 100644
--- a/Examples/test-suite/csharp/Makefile.in
+++ b/Examples/test-suite/csharp/Makefile.in
@@ -3,7 +3,6 @@
#######################################################################
LANGUAGE = csharp
-SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.cs
CSHARPCILINTERPRETER = @CSHARPCILINTERPRETER@
CSHARPCILINTERPRETER_FLAGS = @CSHARPCILINTERPRETER_FLAGS@
@@ -13,11 +12,6 @@ CSHARPCYGPATH_W = @CSHARPCYGPATH_W@
srcdir = @srcdir@
top_srcdir = ../@top_srcdir@
top_builddir = ../@top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR = ../
-else
-SRCDIR = ../$(srcdir)/
-endif
CPP_TEST_CASES = \
csharp_attributes \
@@ -37,6 +31,7 @@ CPP_TEST_CASES = \
include $(srcdir)/../common.mk
# Overridden variables here
+SRCDIR = ../$(srcdir)/
SWIGOPT += -namespace $*Namespace
CSHARPFLAGSSPECIAL =
diff --git a/Examples/test-suite/d/Makefile.in b/Examples/test-suite/d/Makefile.in
index 0542bbad0..42fac00bc 100644
--- a/Examples/test-suite/d/Makefile.in
+++ b/Examples/test-suite/d/Makefile.in
@@ -7,11 +7,6 @@ LANGUAGE = d
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
ifeq (2,$(D_VERSION))
VERSIONSUFFIX = .2
diff --git a/Examples/test-suite/errors/Makefile.in b/Examples/test-suite/errors/Makefile.in
index c74e9c65b..9ca6f6ecd 100644
--- a/Examples/test-suite/errors/Makefile.in
+++ b/Examples/test-suite/errors/Makefile.in
@@ -22,11 +22,6 @@ TODOS = tr -d '\r'
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
# strip source directory from output, so that diffs compare
srcdir_regexp = $(shell echo $(srcdir)/ | sed 's/\./[.]/g')
diff --git a/Examples/test-suite/go/Makefile.in b/Examples/test-suite/go/Makefile.in
index 03f6f151e..204cf8a12 100644
--- a/Examples/test-suite/go/Makefile.in
+++ b/Examples/test-suite/go/Makefile.in
@@ -9,7 +9,6 @@ GO1 = @GO1@
GO12 = @GO12@
GO13 = @GO13@
GOC = @GOC@
-SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.go
GOCOMPILEARG = `if $(GOGCC) ; then echo -c -g; elif $(GO1) ; then echo tool $(GOC:c=g) ; fi`
@@ -24,11 +23,6 @@ SO = @SO@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
include $(srcdir)/../common.mk
diff --git a/Examples/test-suite/guile/Makefile.in b/Examples/test-suite/guile/Makefile.in
index 5ac3de685..6cbf3b9b1 100644
--- a/Examples/test-suite/guile/Makefile.in
+++ b/Examples/test-suite/guile/Makefile.in
@@ -6,17 +6,11 @@ EXTRA_TEST_CASES += guile_ext_test.externaltest
LANGUAGE = guile
VARIANT =
-SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.scm
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
GUILE = @GUILE@
GUILE_RUNTIME=
diff --git a/Examples/test-suite/java/Makefile.in b/Examples/test-suite/java/Makefile.in
index a61452ed2..dd6c74a51 100644
--- a/Examples/test-suite/java/Makefile.in
+++ b/Examples/test-suite/java/Makefile.in
@@ -6,17 +6,11 @@ LANGUAGE = java
JAVA = @JAVA@
JAVAC = @JAVAC@
JAVAFLAGS = -Xcheck:jni
-SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.java
srcdir = @srcdir@
top_srcdir = ../@top_srcdir@
top_builddir = ../@top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR = ../
-else
-SRCDIR = ../$(srcdir)/
-endif
C_TEST_CASES = \
java_lib_arrays \
@@ -49,6 +43,7 @@ CPP_TEST_CASES = \
include $(srcdir)/../common.mk
# Overridden variables here
+SRCDIR = ../$(srcdir)/
JAVA_PACKAGE = $*
JAVA_PACKAGEOPT = -package $(JAVA_PACKAGE)
SWIGOPT += $(JAVA_PACKAGEOPT)
diff --git a/Examples/test-suite/javascript/Makefile.in b/Examples/test-suite/javascript/Makefile.in
index 6126bde74..211310e86 100644
--- a/Examples/test-suite/javascript/Makefile.in
+++ b/Examples/test-suite/javascript/Makefile.in
@@ -10,11 +10,6 @@ SCRIPTSUFFIX = _runme.js
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
SWIG = $(top_builddir)/preinst_swig
diff --git a/Examples/test-suite/lua/Makefile.in b/Examples/test-suite/lua/Makefile.in
index b35cc15ad..00f940825 100644
--- a/Examples/test-suite/lua/Makefile.in
+++ b/Examples/test-suite/lua/Makefile.in
@@ -4,17 +4,11 @@
LANGUAGE = lua
LUA = @LUABIN@
-SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.lua
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
# sorry, currently very few test cases work/have been written
diff --git a/Examples/test-suite/mzscheme/Makefile.in b/Examples/test-suite/mzscheme/Makefile.in
index 39fb1acbc..1c2466efc 100644
--- a/Examples/test-suite/mzscheme/Makefile.in
+++ b/Examples/test-suite/mzscheme/Makefile.in
@@ -9,11 +9,6 @@ SCRIPTSUFFIX = _runme.scm
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
include $(srcdir)/../common.mk
diff --git a/Examples/test-suite/ocaml/Makefile.in b/Examples/test-suite/ocaml/Makefile.in
index 5081e203e..c9c4bb603 100644
--- a/Examples/test-suite/ocaml/Makefile.in
+++ b/Examples/test-suite/ocaml/Makefile.in
@@ -10,11 +10,6 @@ SCRIPTSUFFIX = _runme.ml
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
C_TEST_CASES =
diff --git a/Examples/test-suite/octave/Makefile.in b/Examples/test-suite/octave/Makefile.in
index 11cb7c076..4f78371f4 100644
--- a/Examples/test-suite/octave/Makefile.in
+++ b/Examples/test-suite/octave/Makefile.in
@@ -4,17 +4,11 @@
LANGUAGE = octave
OCTAVE = @OCTAVE@
-SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.m
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
CPP_TEST_CASES += \
li_std_pair_extra \
diff --git a/Examples/test-suite/perl5/Makefile.in b/Examples/test-suite/perl5/Makefile.in
index 6778f714e..9d9d460d8 100644
--- a/Examples/test-suite/perl5/Makefile.in
+++ b/Examples/test-suite/perl5/Makefile.in
@@ -4,18 +4,12 @@
LANGUAGE = perl5
PERL = @PERL@
-SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.pl
TEST_RUNNER = $(srcdir)/run-perl-test.pl
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
CPP_TEST_CASES += \
primitive_types \
diff --git a/Examples/test-suite/php/Makefile.in b/Examples/test-suite/php/Makefile.in
index b6e4fff1a..5f56760ea 100644
--- a/Examples/test-suite/php/Makefile.in
+++ b/Examples/test-suite/php/Makefile.in
@@ -3,17 +3,11 @@
#######################################################################
LANGUAGE = php
-SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.php
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
CPP_TEST_CASES += \
php_namewarn_rename \
diff --git a/Examples/test-suite/pike/Makefile.in b/Examples/test-suite/pike/Makefile.in
index 36a34352a..414fa1159 100644
--- a/Examples/test-suite/pike/Makefile.in
+++ b/Examples/test-suite/pike/Makefile.in
@@ -9,11 +9,6 @@ SCRIPTSUFFIX = _runme.pike
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
include $(srcdir)/../common.mk
diff --git a/Examples/test-suite/python/Makefile.in b/Examples/test-suite/python/Makefile.in
index 719e7d1a4..492396d15 100644
--- a/Examples/test-suite/python/Makefile.in
+++ b/Examples/test-suite/python/Makefile.in
@@ -14,6 +14,7 @@ PYTHON = $(PYBIN)
#*_runme.py for Python 2.x, *_runme3.py for Python 3.x
PY2SCRIPTSUFFIX = _runme.py
PY3SCRIPTSUFFIX = _runme3.py
+PY2TO3 = 2to3 -x import
ifeq (,$(PY3))
SCRIPTSUFFIX = $(PY2SCRIPTSUFFIX)
@@ -21,20 +22,9 @@ else
SCRIPTSUFFIX = $(PY3SCRIPTSUFFIX)
endif
-SCRIPTDIR = .
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
-
-
-PY2TO3 = 2to3 -x import
-
CPP_TEST_CASES += \
argcargvtest \
@@ -109,7 +99,8 @@ BUILTIN_NOT_BROKEN = $(filter-out $(BUILTIN_BROKEN),$(NOT_BROKEN_TEST_CASES))
builtin-check : $(BUILTIN_NOT_BROKEN)
# Overridden variables here
-LIBS = -L.
+SCRIPTDIR = .
+LIBS = -L.
VALGRIND_OPT += --suppressions=pythonswig.supp
# Custom tests - tests with additional commandline options
diff --git a/Examples/test-suite/r/Makefile.in b/Examples/test-suite/r/Makefile.in
index 9f0de1c5f..8bf537d8c 100644
--- a/Examples/test-suite/r/Makefile.in
+++ b/Examples/test-suite/r/Makefile.in
@@ -10,11 +10,6 @@ RUNR = R CMD BATCH --no-save --no-restore
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
C_TEST_CASES += \
r_copy_struct \
diff --git a/Examples/test-suite/ruby/Makefile.in b/Examples/test-suite/ruby/Makefile.in
index d0c65929a..206617ecd 100644
--- a/Examples/test-suite/ruby/Makefile.in
+++ b/Examples/test-suite/ruby/Makefile.in
@@ -4,17 +4,11 @@
LANGUAGE = ruby
RUBY = @RUBY@
-SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.rb
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
CPP_TEST_CASES = \
kwargs_feature \
diff --git a/Examples/test-suite/tcl/Makefile.in b/Examples/test-suite/tcl/Makefile.in
index f8a196e26..32454b09c 100644
--- a/Examples/test-suite/tcl/Makefile.in
+++ b/Examples/test-suite/tcl/Makefile.in
@@ -4,17 +4,11 @@
LANGUAGE = tcl
TCLSH = tclsh
-SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.tcl
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
CPP_TEST_CASES += \
primitive_types \
diff --git a/Examples/test-suite/uffi/Makefile.in b/Examples/test-suite/uffi/Makefile.in
index 9f3546da6..7184af40f 100644
--- a/Examples/test-suite/uffi/Makefile.in
+++ b/Examples/test-suite/uffi/Makefile.in
@@ -9,11 +9,6 @@ SCRIPTSUFFIX = _runme.lisp
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq (.,$(srcdir))
-SRCDIR =
-else
-SRCDIR = $(srcdir)/
-endif
include $(srcdir)/../common.mk