Working
@@ -4508,7 +4508,7 @@ irb(main):005:0> c.getX()
5.0
-37.9.3 Specifying Mixin Modules
+38.9.3 Specifying Mixin Modules
The Ruby language doesn't support multiple inheritance, but
@@ -4575,7 +4575,7 @@ matching rules used for other kinds of features apply (see the chapter
on "Customization
Features") for more details).
-37.10 Memory Management
+38.10 Memory Management
One of the most common issues in generating SWIG bindings for
@@ -4598,7 +4598,7 @@ to C++ (or vice versa) depending on what function or methods are
invoked. Clearly, developing a SWIG wrapper requires a thorough
understanding of how the underlying library manages memory.
-37.10.1 Mark and Sweep Garbage Collector
+38.10.1 Mark and Sweep Garbage Collector
Ruby uses a mark and sweep garbage collector. When the garbage
@@ -4630,7 +4630,7 @@ any memory has been allocated in creating the underlying C struct or
C++ struct, then a "free" function must be defined that deallocates
this memory.
-37.10.2 Object Ownership
+38.10.2 Object Ownership
As described above, memory management depends on clearly
@@ -4775,7 +4775,7 @@ public:
This code can be seen in swig/examples/ruby/tracking.
-37.10.3 Object Tracking
+38.10.3 Object Tracking
The remaining parts of this section will use the class library
@@ -5000,7 +5000,7 @@ However, if you implement your own free functions (see below) you may
also have to call the SWIG_RubyRemoveTracking and RubyUnlinkObjects
methods.
-37.10.4 Mark Functions
+38.10.4 Mark Functions
With a bit more testing, we see that our class library still
@@ -5129,7 +5129,7 @@ irb(main):016:0>
This code can be seen in swig/examples/ruby/mark_function.
-37.10.5 Free Functions
+38.10.5 Free Functions
By default, SWIG creates a "free" function that is called when
@@ -5296,7 +5296,7 @@ been freed, and thus raises a runtime exception.
This code can be seen in swig/examples/ruby/free_function.
-37.10.6 Embedded Ruby and the C++ Stack
+38.10.6 Embedded Ruby and the C++ Stack
As has been said, the Ruby GC runs and marks objects before
diff --git a/Doc/Manual/Tcl.html b/Doc/Manual/Tcl.html
index 45eebbf5e..c12701ac9 100644
--- a/Doc/Manual/Tcl.html
+++ b/Doc/Manual/Tcl.html
@@ -6,7 +6,7 @@
-38 SWIG and Tcl
+39 SWIG and Tcl
@@ -83,7 +83,7 @@ Tcl 8.0 or a later release. Earlier releases of SWIG supported Tcl 7.x, but
this is no longer supported.
-38.1 Preliminaries
+39.1 Preliminaries
@@ -109,7 +109,7 @@ build a Tcl extension module. To finish building the module, you
need to compile this file and link it with the rest of your program.
-38.1.1 Getting the right header files
+39.1.1 Getting the right header files
@@ -127,7 +127,7 @@ this is the case, you should probably make a symbolic link so that tcl.h
-
38.1.2 Compiling a dynamic module
+39.1.2 Compiling a dynamic module
@@ -163,7 +163,7 @@ The name of the module is specified using the %module directive or the
-module command line option.
-38.1.3 Static linking
+39.1.3 Static linking
@@ -229,7 +229,7 @@ minimal in most situations (and quite frankly not worth the extra
hassle in the opinion of this author).
-38.1.4 Using your module
+39.1.4 Using your module
@@ -357,7 +357,7 @@ to the default system configuration (this requires root access and you will need
the man pages).
-38.1.5 Compilation of C++ extensions
+39.1.5 Compilation of C++ extensions
@@ -440,7 +440,7 @@ erratic program behavior. If working with lots of software components, you
might want to investigate using a more formal standard such as COM.
-38.1.6 Compiling for 64-bit platforms
+39.1.6 Compiling for 64-bit platforms
@@ -467,7 +467,7 @@ also introduce problems on platforms that support more than one
linking standard (e.g., -o32 and -n32 on Irix).
-38.1.7 Setting a package prefix
+39.1.7 Setting a package prefix
@@ -486,7 +486,7 @@ option will append the prefix to the name when creating a command and
call it "Foo_bar".
-38.1.8 Using namespaces
+39.1.8 Using namespaces
@@ -508,7 +508,7 @@ When the -namespace option is used, objects in the module
are always accessed with the namespace name such as Foo::bar.
-38.2 Building Tcl/Tk Extensions under Windows 95/NT
+39.2 Building Tcl/Tk Extensions under Windows 95/NT
@@ -519,7 +519,7 @@ covers the process of using SWIG with Microsoft Visual C++.
although the procedure may be similar with other compilers.
-38.2.1 Running SWIG from Developer Studio
+39.2.1 Running SWIG from Developer Studio
@@ -577,7 +577,7 @@ MSDOS > tclsh80
%
-38.2.2 Using NMAKE
+39.2.2 Using NMAKE
@@ -640,7 +640,7 @@ to get you started. With a little practice, you'll be making lots of
Tcl extensions.
-38.3 A tour of basic C/C++ wrapping
+39.3 A tour of basic C/C++ wrapping
@@ -651,7 +651,7 @@ classes. This section briefly covers the essential aspects of this
wrapping.
-38.3.1 Modules
+39.3.1 Modules
@@ -685,7 +685,7 @@ To fix this, supply an extra argument to load like this:
-
38.3.2 Functions
+39.3.2 Functions
@@ -710,7 +710,7 @@ like you think it does:
%
-
38.3.3 Global variables
+39.3.3 Global variables
@@ -790,7 +790,7 @@ extern char *path; // Read-only (due to %immutable)
-
38.3.4 Constants and enums
+39.3.4 Constants and enums
@@ -874,7 +874,7 @@ When an identifier name is given, it is used to perform an implicit hash-table l
conversion. This allows the global statement to be omitted.
-38.3.5 Pointers
+39.3.5 Pointers
@@ -970,7 +970,7 @@ C-style cast may return a bogus result whereas as the C++-style cast will return
None if the conversion can't be performed.
-38.3.6 Structures
+39.3.6 Structures
@@ -1252,7 +1252,7 @@ Note: Tcl only destroys the underlying object if it has ownership. See the
memory management section that appears shortly.
-38.3.7 C++ classes
+39.3.7 C++ classes
@@ -1319,7 +1319,7 @@ In Tcl, the static member is accessed as follows:
-
38.3.8 C++ inheritance
+39.3.8 C++ inheritance
@@ -1368,7 +1368,7 @@ For instance:
It is safe to use multiple inheritance with SWIG.
-38.3.9 Pointers, references, values, and arrays
+39.3.9 Pointers, references, values, and arrays
@@ -1422,7 +1422,7 @@ to hold the result and a pointer is returned (Tcl will release this memory
when the return value is garbage collected).
-38.3.10 C++ overloaded functions
+39.3.10 C++ overloaded functions
@@ -1545,7 +1545,7 @@ first declaration takes precedence.
Please refer to the "SWIG and C++" chapter for more information about overloading.
-38.3.11 C++ operators
+39.3.11 C++ operators
@@ -1647,7 +1647,7 @@ There are ways to make this operator appear as part of the class using the %
Keep reading.
-38.3.12 C++ namespaces
+39.3.12 C++ namespaces
@@ -1711,7 +1711,7 @@ utilizes thousands of small deeply nested namespaces each with
identical symbol names, well, then you get what you deserve.
-38.3.13 C++ templates
+39.3.13 C++ templates
@@ -1763,7 +1763,7 @@ More details can be found in the SWIG and C++
examples will appear later.
-38.3.14 C++ Smart Pointers
+39.3.14 C++ Smart Pointers
@@ -1847,7 +1847,7 @@ simply use the __deref__() method. For example:
-
38.4 Further details on the Tcl class interface
+39.4 Further details on the Tcl class interface
@@ -1860,7 +1860,7 @@ of low-level details were omitted. This section provides a brief overview
of how the proxy classes work.
-38.4.1 Proxy classes
+39.4.1 Proxy classes
@@ -1925,7 +1925,7 @@ function. This allows objects to be encapsulated objects that look a lot like
as shown in the last section.
-38.4.2 Memory management
+39.4.2 Memory management
@@ -2113,7 +2113,7 @@ typemaps--an advanced topic discussed later.
-38.5 Input and output parameters
+39.5 Input and output parameters
@@ -2301,7 +2301,7 @@ set c [lindex $dim 1]
-
38.6 Exception handling
+39.6 Exception handling
@@ -2435,7 +2435,7 @@ Since SWIG's exception handling is user-definable, you are not limited to C++ ex
See the chapter on "Customization Features" for more examples.
-38.7 Typemaps
+39.7 Typemaps
@@ -2452,7 +2452,7 @@ Typemaps are only used if you want to change some aspect of the primitive
C-Tcl interface.
-38.7.1 What is a typemap?
+39.7.1 What is a typemap?
@@ -2569,7 +2569,7 @@ parameter is omitted):
-
38.7.2 Tcl typemaps
+39.7.2 Tcl typemaps
@@ -2707,7 +2707,7 @@ Initialize an argument to a value before any conversions occur.
Examples of these methods will appear shortly.
-38.7.3 Typemap variables
+39.7.3 Typemap variables
@@ -2778,7 +2778,7 @@ properly assigned.
The Tcl name of the wrapper function being created.
-
38.7.4 Converting a Tcl list to a char **
+39.7.4 Converting a Tcl list to a char **
@@ -2840,7 +2840,7 @@ argv[2] = Larry
3
-
38.7.5 Returning values in arguments
+39.7.5 Returning values in arguments
@@ -2882,7 +2882,7 @@ result, a Tcl function using these typemaps will work like this :
%
-
38.7.6 Useful functions
+39.7.6 Useful functions
@@ -2959,7 +2959,7 @@ int Tcl_IsShared(Tcl_Obj *obj);
-
38.7.7 Standard typemaps
+39.7.7 Standard typemaps
@@ -3043,7 +3043,7 @@ work)
-
38.7.8 Pointer handling
+39.7.8 Pointer handling
@@ -3119,7 +3119,7 @@ For example:
-
38.8 Turning a SWIG module into a Tcl Package.
+39.8 Turning a SWIG module into a Tcl Package.
@@ -3191,7 +3191,7 @@ As a final note, most SWIG examples do not yet use the
to use the load command instead.
-38.9 Building new kinds of Tcl interfaces (in Tcl)
+39.9 Building new kinds of Tcl interfaces (in Tcl)
@@ -3290,7 +3290,7 @@ danger of blowing something up (although it is easily accomplished
with an out of bounds array access).
-38.9.1 Proxy classes
+39.9.1 Proxy classes
@@ -3411,7 +3411,7 @@ short, but clever Tcl script can be combined with SWIG to do many
interesting things.
-38.10 Tcl/Tk Stubs
+39.10 Tcl/Tk Stubs
From a6d71e6c57dedcdf520f1d62026fe35a43fbb549 Mon Sep 17 00:00:00 2001
From: Karl Wette
Date: Fri, 2 May 2014 00:04:23 +0200
Subject: [PATCH 005/152] configure.ac: fix to Javascript configuration
- setting SKIP_JAVASCRIPT assumes that JSCENABLED/JSV8ENABLED
are empty when jsc/v8 are not available
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6d70f1da8..46c7479d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1203,7 +1203,7 @@ else
if test -z "$JSCORELIB"; then
AC_MSG_RESULT(not found)
- JSCENABLED=0
+ JSCENABLED=
else
JSCOREDYNAMICLINKING="$JSCORELIB"
JSCENABLED=1
@@ -1270,7 +1270,7 @@ else
if test "$JSV8LIB" = "" ; then
AC_MSG_RESULT(not found)
- JSV8ENABLED=0
+ JSV8ENABLED=
else
AC_MSG_RESULT($JSV8LIBDIR)
JSV8ENABLED=1
From 00a02a3d9c84c531087a072979681e00f93e3f2a Mon Sep 17 00:00:00 2001
From: xantares
Date: Sat, 10 May 2014 12:09:52 +0200
Subject: [PATCH 006/152] Fix duplicate entry
---
Examples/test-suite/common.mk | 1 -
1 file changed, 1 deletion(-)
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index 2a4591524..c8789cb99 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -409,7 +409,6 @@ CPP_TEST_CASES += \
template_partial_specialization \
template_partial_specialization_typedef \
template_qualifier \
- template_qualifier \
template_ref_type \
template_rename \
template_retvalue \
From 55bda53145d2898bd4642926b25209c12738e558 Mon Sep 17 00:00:00 2001
From: Vladimir Kalinin
Date: Sat, 10 May 2014 22:16:26 +0400
Subject: [PATCH 007/152] C nested classes symbol table should be in global
space
---
Source/CParse/parser.y | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y
index 7e7e5633f..26af7be2d 100644
--- a/Source/CParse/parser.y
+++ b/Source/CParse/parser.y
@@ -3515,6 +3515,9 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
} else {
cplus_mode = CPLUS_PUBLIC;
}
+ if (!cparse_cplusplus) {
+ set_scope_to_global();
+ }
Swig_symbol_newscope();
Swig_symbol_setscopename($3);
Swig_inherit_base_symbols(bases);
From 4fe6622f64fe05eb14ff397c903970898b78c87a Mon Sep 17 00:00:00 2001
From: Karl Wette
Date: Fri, 2 May 2014 00:41:43 +0200
Subject: [PATCH 008/152] configure.ac: print configured languages at end of
configuration
---
configure.ac | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/configure.ac b/configure.ac
index 46c7479d0..eeabd11b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2678,4 +2678,40 @@ AC_CONFIG_FILES([preinst-swig], [chmod +x preinst-swig])
AC_CONFIG_FILES([CCache/ccache_swig_config.h])
AC_OUTPUT
+
+langs=""
+test -n "$SKIP_ALLEGROCL" || langs="$langs allegrocl"
+test -n "$SKIP_CFFI" || langs="$langs cffi"
+test -n "$SKIP_CHICKEN" || langs="$langs chicken"
+test -n "$SKIP_CLISP" || langs="$langs clisp"
+test -n "$SKIP_CSHARP" || langs="$langs csharp"
+test -n "$SKIP_D" || langs="$langs d"
+test -n "$SKIP_GO" || langs="$langs go"
+test -n "$SKIP_GUILE" || langs="$langs guile"
+test -n "$SKIP_JAVA" || langs="$langs java"
+test -n "$SKIP_JAVASCRIPT" || langs="$langs javascript"
+test -n "$SKIP_LUA" || langs="$langs lua"
+test -n "$SKIP_MODULA3" || langs="$langs modula3"
+test -n "$SKIP_MZSCHEME" || langs="$langs mzscheme"
+test -n "$SKIP_OCAML" || langs="$langs ocaml"
+test -n "$SKIP_OCTAVE" || langs="$langs octave"
+test -n "$SKIP_PERL5" || langs="$langs perl5"
+test -n "$SKIP_PHP" || langs="$langs php"
+test -n "$SKIP_PIKE" || langs="$langs pike"
+test -n "$SKIP_PYTHON" || langs="$langs python"
+test -n "$SKIP_R" || langs="$langs r"
+test -n "$SKIP_RUBY" || langs="$langs ruby"
+test -n "$SKIP_TCL" || langs="$langs tcl"
+test -n "$SKIP_UFFI" || langs="$langs uffi"
+
+echo "
+========================================================
+
+SWIG is configured for use with the following languages:
+
+$langs
+
+========================================================
+"
+
dnl configure.ac ends here
From 6fc07c5dc9a05669174b2c03881619bcb492ec5b Mon Sep 17 00:00:00 2001
From: Karl Wette
Date: Fri, 2 May 2014 01:28:15 +0200
Subject: [PATCH 009/152] Fix segmentation fault in some Javascript examples
- memory allocated with malloc() was then being freed with delete[],
which is overridden by Javascript libraries (jsc), leading to segfault
- replacing malloc with %new_array seems to work though
---
Lib/javascript/jsc/javascriptstrings.swg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/javascript/jsc/javascriptstrings.swg b/Lib/javascript/jsc/javascriptstrings.swg
index 0581c1920..10a0e252a 100644
--- a/Lib/javascript/jsc/javascriptstrings.swg
+++ b/Lib/javascript/jsc/javascriptstrings.swg
@@ -8,7 +8,7 @@ SWIG_JSC_AsCharPtrAndSize(JSContextRef context, JSValueRef valRef, char** cptr,
if(JSValueIsString(context, valRef)) {
JSStringRef js_str = JSValueToStringCopy(context, valRef, NULL);
size_t len = JSStringGetMaximumUTF8CStringSize(js_str);
- char* cstr = (char*) malloc(len * sizeof(char));
+ char* cstr = (char*) %new_array(len, char);
/* JSStringGetUTF8CString returns the length including 0-terminator */
len = JSStringGetUTF8CString(js_str, cstr, len);
From 96153c7c0a9200f39d0dc66ffbea2426cd2a4d95 Mon Sep 17 00:00:00 2001
From: Karl Wette
Date: Fri, 25 Apr 2014 17:01:14 +0200
Subject: [PATCH 010/152] Regenerate configured Makefile if Makefile.in or
config.status have changed
---
CCache/Makefile.in | 4 ++++
Examples/Makefile.in | 4 ++++
Examples/test-suite/common.mk | 7 +++++++
Examples/test-suite/errors/Makefile.in | 3 +++
Makefile.in | 5 +++++
Tools/javascript/Makefile.in | 16 ++++++++++++----
6 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/CCache/Makefile.in b/CCache/Makefile.in
index abe78c277..3513222ca 100644
--- a/CCache/Makefile.in
+++ b/CCache/Makefile.in
@@ -27,6 +27,10 @@ HEADERS = ccache.h mdfour.h
all: $(PACKAGE_NAME)$(EXEEXT)
+# Regenerate Makefile if Makefile.in or config.status have changed.
+Makefile: $(srcdir)/Makefile.in ./config.status
+ $(SHELL) ./config.status
+
# Note that HTML documentation is actually generated and used from the main SWIG documentation Makefile
docs: $(PACKAGE_NAME).1 web/ccache-man.html
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index 326f678c7..a0acd0fb8 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -21,6 +21,10 @@
# 'method' describes what is being built.
#---------------------------------------------------------------
+# Regenerate Makefile if Makefile.in or config.status have changed.
+Makefile: @srcdir@/Makefile.in ../config.status
+ cd .. && $(SHELL) ./config.status Examples/Makefile
+
TARGET =
CC = @CC@
CXX = @CXX@
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index c8789cb99..bdd1cd471 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -71,6 +71,13 @@ LIBPREFIX = lib
ACTION = check
INTERFACEDIR = $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/
+# Regenerate Makefile if Makefile.in or config.status have changed.
+ifeq (,$(TEST_SUITE_SUBDIR))
+TEST_SUITE_SUBDIR = $(LANGUAGE)
+endif
+Makefile: $(srcdir)/Makefile.in ../../../config.status
+ cd ../../../ && $(SHELL) ./config.status $(EXAMPLES)/$(TEST_SUITE)/$(TEST_SUITE_SUBDIR)/Makefile
+
#
# Please keep test cases in alphabetical order.
# Note that any whitespace after the last entry in each list will break make
diff --git a/Examples/test-suite/errors/Makefile.in b/Examples/test-suite/errors/Makefile.in
index e4ba7b751..843283e7c 100644
--- a/Examples/test-suite/errors/Makefile.in
+++ b/Examples/test-suite/errors/Makefile.in
@@ -31,6 +31,9 @@ C_ERROR_TEST_CASES := $(filter-out $(CPP_ERROR_TEST_CASES), $(ALL_ERROR_TEST_CAS
ERROR_TEST_CASES := $(CPP_ERROR_TEST_CASES:=.cpptest) \
$(C_ERROR_TEST_CASES:=.ctest)
+# For rebuilding Makefile from Makefile.in in common.mk
+TEST_SUITE_SUBDIR = errors
+
include $(srcdir)/../common.mk
diff --git a/Makefile.in b/Makefile.in
index 06e4724c7..53ac47de5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -243,11 +243,13 @@ check-%-examples :
# individual example
%.actionexample:
+ @cd Examples && $(MAKE) Makefile
@echo $(ACTION)ing Examples/$(LANGUAGE)/$*
@(cd Examples/$(LANGUAGE)/$* && $(MAKE) $(FLAGS) $(chk-set-env) $(ACTION) RUNPIPE=$(RUNPIPE))
# gcj individual example
java.actionexample:
+ @cd Examples && $(MAKE) Makefile
@if $(skip-gcj); then \
echo "skipping Examples/$(LANGUAGE)/java $(ACTION) (gcj test)"; \
else \
@@ -283,6 +285,9 @@ check-test-suite: \
check-javascript-test-suite
check-%-test-suite:
+ @if test -d Examples/test-suite/$*; then \
+ cd Examples/test-suite/$* && $(MAKE) Makefile; \
+ fi
@if test -z "$(skip-$*)"; then \
echo $* unknown; \
exit 1; \
diff --git a/Tools/javascript/Makefile.in b/Tools/javascript/Makefile.in
index 373c5d952..6fbca2384 100644
--- a/Tools/javascript/Makefile.in
+++ b/Tools/javascript/Makefile.in
@@ -11,6 +11,8 @@
# interpreter (see 'Tools/javascript').
#
# ----------------------------------------------------------------
+all: javascript
+
CC = @CC@
# HACK: under OSX a g++ compiled interpreter is seg-faulting when loading module libraries
# with 'c++' it works... probably some missing flags?
@@ -29,15 +31,21 @@ JSCXXSHARED = @JSCXXSHARED@
JSV8ENABLED = @JSV8ENABLED@
JSCENABLED = @JSCENABLED@
+srcdir = @srcdir@
+
+# Regenerate Makefile if Makefile.in or config.status have changed.
+Makefile: $(srcdir)/Makefile.in ../../config.status
+ cd ../.. && $(SHELL) ./config.status Tools/javascript/Makefile
+
# These settings are provided by 'configure' (see '/configure.in')
ifeq (1, $(JSV8ENABLED))
- JS_INTERPRETER_SRC_V8 = v8_shell.cxx
- JS_INTERPRETER_ENABLE_V8 = -DENABLE_V8
+JS_INTERPRETER_SRC_V8 = v8_shell.cxx
+JS_INTERPRETER_ENABLE_V8 = -DENABLE_V8
endif
ifeq (1, $(JSCENABLED))
- JS_INTERPRETER_SRC_JSC = jsc_shell.cxx
- JS_INTERPRETER_ENABLE_JSC = -DENABLE_JSC
+JS_INTERPRETER_SRC_JSC = jsc_shell.cxx
+JS_INTERPRETER_ENABLE_JSC = -DENABLE_JSC
endif
JS_INTERPRETER_DEFINES = $(JS_INTERPRETER_ENABLE_JSC) $(JS_INTERPRETER_ENABLE_V8)
From e0b987b32faf68075890f7b6579661245247fd01 Mon Sep 17 00:00:00 2001
From: Karl Wette
Date: Sat, 29 Mar 2014 16:31:32 +0100
Subject: [PATCH 011/152] CCache/Makefile.in: fix to allow out of source tree
check/install
---
CCache/Makefile.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CCache/Makefile.in b/CCache/Makefile.in
index 3513222ca..ae77ae745 100644
--- a/CCache/Makefile.in
+++ b/CCache/Makefile.in
@@ -14,7 +14,7 @@ NOSOFTLINKSTEST=
CC=@CC@
CFLAGS=@CFLAGS@ -I.
SWIG=swig
-SWIG_LIB=../../Lib
+SWIG_LIB=../$(srcdir)/../Lib
EXEEXT=@EXEEXT@
# Use standard autoconf approach to transform executable name using --program-prefix and --program-suffix
@@ -38,7 +38,7 @@ $(PACKAGE_NAME)$(EXEEXT): $(OBJS) $(HEADERS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
$(PACKAGE_NAME).1: ccache.yo
- -yodl2man -o $(PACKAGE_NAME).1 ccache.yo
+ -yodl2man -o $(PACKAGE_NAME).1 $(srcdir)/ccache.yo
web/ccache-man.html: ccache.yo
yodl2html -o web/ccache-man.html ccache.yo
@@ -50,7 +50,7 @@ install: $(PACKAGE_NAME)$(EXEEXT) $(PACKAGE_NAME).1
${INSTALLCMD} -m 755 $(PACKAGE_NAME)$(EXEEXT) $(DESTDIR)${bindir}/`echo $(PACKAGE_NAME) | sed '$(transform)'`$(EXEEXT)
@echo "Installing $(DESTDIR)${mandir}/man1/`echo $(PACKAGE_NAME) | sed '$(transform)'`.1"
${INSTALLCMD} -d $(DESTDIR)${mandir}/man1
- ${INSTALLCMD} -m 644 ${srcdir}/$(PACKAGE_NAME).1 $(DESTDIR)${mandir}/man1/`echo $(PACKAGE_NAME) | sed '$(transform)'`.1
+ ${INSTALLCMD} -m 644 $(PACKAGE_NAME).1 $(DESTDIR)${mandir}/man1/`echo $(PACKAGE_NAME) | sed '$(transform)'`.1
uninstall: $(PACKAGE_NAME)$(EXEEXT) $(PACKAGE_NAME).1
rm -f $(DESTDIR)${bindir}/`echo $(PACKAGE_NAME) | sed '$(transform)'`$(EXEEXT)
@@ -62,7 +62,7 @@ clean:
check : test
test: test.sh
- SWIG_LIB='$(SWIG_LIB)' PATH=../..:$$PATH SWIG='$(SWIG)' CC='$(CC)' NOSOFTLINKSTEST='$(NOSOFTLINKSTEST)' ./test.sh
+ SWIG_LIB='$(SWIG_LIB)' PATH=../..:$$PATH SWIG='$(SWIG)' CC='$(CC)' NOSOFTLINKSTEST='$(NOSOFTLINKSTEST)' $(srcdir)/test.sh
check: test
From 72e6b5349e62c44b42de448fab6c9b005811d025 Mon Sep 17 00:00:00 2001
From: Karl Wette
Date: Fri, 2 May 2014 17:43:06 +0200
Subject: [PATCH 012/152] Add "make maintainer-clean" to Travis CI build
---
.travis.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml
index 890382c40..26cb18910 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -77,6 +77,7 @@ script:
- if test -n "$SWIGLANG"; then make -s check-$SWIGLANG-version; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-examples; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-test-suite; fi
+ - make maintainer-clean
branches:
only:
- master
From f574a34155e4ede49b1b023494e0a1637ab89f8f Mon Sep 17 00:00:00 2001
From: Karl Wette
Date: Sun, 11 May 2014 23:21:10 +0200
Subject: [PATCH 013/152] Allow examples and test-suite to be built out of
source tree
- Examples/Makefile.in rules use SRCDIR as the relative source directory
- ./config.status replicates Examples/ source directory tree in build
directory, and copies each Makefile to build directory, prefixed with
a header which sets SRCDIR to source directory
- Examples/test-suite/.../Makefile.in set SRCDIR from Autoconf-set srcdir
- Examples/test-suite/errors/Makefile.in needs to filter out source
directory from SWIG error messages
- Lua: embedded interpreters are passed location of run-time test
- Python: copy run-time scripts to build directory because of 2to3
conversion; import_packages example copies __init__.py from source
directory; test-suite sets SCRIPTDIR to location of run-time tests
- Javascript: binding.gyp renamed to binding.gyp.in so that $srcdir
can be substituted with SRCDIR; removed './' from require() statements
so that NODE_PATH can be used to point Node.js to build directory
---
.gitignore | 3 +
Examples/Makefile.in | 524 ++++++++++--------
Examples/android/class/Makefile | 6 +-
Examples/android/extend/Makefile | 6 +-
Examples/android/simple/Makefile | 6 +-
Examples/chicken/class/Makefile | 10 +-
Examples/chicken/constants/Makefile | 6 +-
Examples/chicken/multimap/Makefile | 6 +-
Examples/chicken/overload/Makefile | 6 +-
Examples/chicken/simple/Makefile | 6 +-
Examples/csharp/arrays/Makefile | 8 +-
Examples/csharp/callback/Makefile | 8 +-
Examples/csharp/class/Makefile | 8 +-
Examples/csharp/enum/Makefile | 8 +-
Examples/csharp/extend/Makefile | 8 +-
Examples/csharp/funcptr/Makefile | 8 +-
Examples/csharp/nested/Makefile | 8 +-
Examples/csharp/reference/Makefile | 8 +-
Examples/csharp/simple/Makefile | 8 +-
Examples/csharp/template/Makefile | 8 +-
Examples/csharp/variables/Makefile | 8 +-
Examples/d/callback/Makefile | 8 +-
Examples/d/class/Makefile | 8 +-
Examples/d/constants/Makefile | 8 +-
Examples/d/enum/Makefile | 8 +-
Examples/d/extend/Makefile | 8 +-
Examples/d/funcptr/Makefile | 8 +-
Examples/d/simple/Makefile | 8 +-
Examples/d/variables/Makefile | 8 +-
Examples/go/callback/Makefile | 6 +-
Examples/go/class/Makefile | 6 +-
Examples/go/constants/Makefile | 6 +-
Examples/go/enum/Makefile | 6 +-
Examples/go/extend/Makefile | 6 +-
Examples/go/funcptr/Makefile | 6 +-
Examples/go/multimap/Makefile | 6 +-
Examples/go/pointer/Makefile | 6 +-
Examples/go/reference/Makefile | 6 +-
Examples/go/simple/Makefile | 6 +-
Examples/go/template/Makefile | 6 +-
Examples/go/variables/Makefile | 6 +-
Examples/guile/class/Makefile | 8 +-
Examples/guile/constants/Makefile | 6 +-
Examples/guile/matrix/Makefile | 6 +-
Examples/guile/multimap/Makefile | 8 +-
Examples/guile/multivalue/Makefile | 8 +-
Examples/guile/port/Makefile | 6 +-
Examples/guile/simple/Makefile | 6 +-
Examples/guile/std_vector/Makefile | 8 +-
Examples/java/callback/Makefile | 8 +-
Examples/java/class/Makefile | 8 +-
Examples/java/constants/Makefile | 8 +-
Examples/java/enum/Makefile | 8 +-
Examples/java/extend/Makefile | 8 +-
Examples/java/funcptr/Makefile | 8 +-
Examples/java/multimap/Makefile | 8 +-
Examples/java/native/Makefile | 8 +-
Examples/java/nested/Makefile | 8 +-
Examples/java/pointer/Makefile | 8 +-
Examples/java/reference/Makefile | 8 +-
Examples/java/simple/Makefile | 8 +-
Examples/java/template/Makefile | 8 +-
Examples/java/typemap/Makefile | 8 +-
Examples/java/variables/Makefile | 8 +-
Examples/javascript/class/Makefile | 2 +-
Examples/javascript/class/binding.gyp | 8 -
Examples/javascript/class/binding.gyp.in | 9 +
Examples/javascript/class/example.js | 2 +-
Examples/javascript/class/runme.js | 2 +-
Examples/javascript/constant/Makefile | 2 +-
Examples/javascript/constant/binding.gyp | 8 -
Examples/javascript/constant/binding.gyp.in | 9 +
Examples/javascript/constant/example.js | 2 +-
Examples/javascript/constant/runme.js | 2 +-
Examples/javascript/enum/Makefile | 2 +-
Examples/javascript/enum/binding.gyp | 8 -
Examples/javascript/enum/binding.gyp.in | 9 +
Examples/javascript/enum/example.js | 2 +-
Examples/javascript/enum/runme.js | 2 +-
Examples/javascript/example.mk | 8 +-
Examples/javascript/exception/Makefile | 2 +-
.../exception/{binding.gyp => binding.gyp.in} | 3 +-
Examples/javascript/exception/example.js | 2 +-
Examples/javascript/exception/runme.js | 2 +-
Examples/javascript/functor/Makefile | 2 +-
Examples/javascript/functor/binding.gyp | 8 -
Examples/javascript/functor/binding.gyp.in | 9 +
Examples/javascript/functor/example.js | 2 +-
Examples/javascript/functor/runme.js | 2 +-
Examples/javascript/nspace/Makefile | 2 +-
Examples/javascript/nspace/binding.gyp | 8 -
Examples/javascript/nspace/binding.gyp.in | 9 +
Examples/javascript/nspace/example.js | 2 +-
Examples/javascript/nspace/runme.js | 2 +-
Examples/javascript/operator/Makefile | 2 +-
Examples/javascript/operator/binding.gyp | 8 -
Examples/javascript/operator/binding.gyp.in | 9 +
Examples/javascript/operator/example.js | 2 +-
Examples/javascript/operator/runme.js | 2 +-
Examples/javascript/overload/Makefile | 2 +-
Examples/javascript/overload/binding.gyp | 8 -
Examples/javascript/overload/binding.gyp.in | 9 +
Examples/javascript/overload/example.js | 2 +-
Examples/javascript/overload/runme.js | 2 +-
Examples/javascript/pointer/Makefile | 2 +-
Examples/javascript/pointer/binding.gyp | 8 -
Examples/javascript/pointer/binding.gyp.in | 9 +
Examples/javascript/pointer/example.js | 2 +-
Examples/javascript/pointer/runme.js | 2 +-
Examples/javascript/reference/Makefile | 2 +-
Examples/javascript/reference/binding.gyp | 8 -
Examples/javascript/reference/binding.gyp.in | 9 +
Examples/javascript/reference/example.js | 2 +-
Examples/javascript/reference/runme.js | 2 +-
Examples/javascript/simple/Makefile | 2 +-
Examples/javascript/simple/binding.gyp | 8 -
Examples/javascript/simple/binding.gyp.in | 9 +
Examples/javascript/simple/example.js | 2 +-
Examples/javascript/simple/runme.js | 2 +-
Examples/javascript/template/Makefile | 2 +-
Examples/javascript/template/binding.gyp | 8 -
Examples/javascript/template/binding.gyp.in | 9 +
Examples/javascript/template/example.js | 2 +-
Examples/javascript/template/runme.js | 2 +-
Examples/javascript/variables/Makefile | 2 +-
Examples/javascript/variables/binding.gyp | 8 -
Examples/javascript/variables/binding.gyp.in | 9 +
Examples/javascript/variables/example.js | 2 +-
Examples/javascript/variables/runme.js | 2 +-
Examples/lua/arrays/Makefile | 8 +-
Examples/lua/class/Makefile | 8 +-
Examples/lua/constants/Makefile | 8 +-
Examples/lua/dual/Makefile | 10 +-
Examples/lua/embed/Makefile | 6 +-
Examples/lua/embed/embed.c | 9 +-
Examples/lua/embed2/Makefile | 6 +-
Examples/lua/embed2/embed2.c | 9 +-
Examples/lua/embed3/Makefile | 6 +-
Examples/lua/embed3/embed3.cpp | 10 +-
Examples/lua/exception/Makefile | 8 +-
Examples/lua/funcptr3/Makefile | 8 +-
Examples/lua/functest/Makefile | 8 +-
Examples/lua/functor/Makefile | 8 +-
Examples/lua/import/Makefile | 12 +-
Examples/lua/nspace/Makefile | 8 +-
Examples/lua/owner/Makefile | 8 +-
Examples/lua/pointer/Makefile | 8 +-
Examples/lua/simple/Makefile | 8 +-
Examples/lua/variables/Makefile | 8 +-
Examples/modula3/class/Makefile | 6 +-
Examples/modula3/enum/Makefile | 6 +-
Examples/modula3/exception/Makefile | 8 +-
Examples/modula3/reference/Makefile | 6 +-
Examples/modula3/simple/Makefile | 6 +-
Examples/modula3/typemap/Makefile | 6 +-
Examples/mzscheme/multimap/Makefile | 6 +-
Examples/mzscheme/simple/Makefile | 6 +-
Examples/mzscheme/std_vector/Makefile | 4 +-
Examples/ocaml/argout_ref/Makefile | 8 +-
Examples/ocaml/contract/Makefile | 10 +-
Examples/ocaml/scoped_enum/Makefile | 10 +-
Examples/ocaml/shapes/Makefile | 10 +-
Examples/ocaml/simple/Makefile | 10 +-
Examples/ocaml/std_string/Makefile | 8 +-
Examples/ocaml/std_vector/Makefile | 8 +-
Examples/ocaml/stl/Makefile | 12 +-
Examples/ocaml/string_from_ptr/Makefile | 10 +-
Examples/ocaml/strings_test/Makefile | 10 +-
Examples/octave/callback/Makefile | 6 +-
Examples/octave/class/Makefile | 6 +-
Examples/octave/constants/Makefile | 6 +-
Examples/octave/contract/Makefile | 6 +-
Examples/octave/enum/Makefile | 6 +-
Examples/octave/extend/Makefile | 6 +-
Examples/octave/funcptr/Makefile | 6 +-
Examples/octave/funcptr2/Makefile | 6 +-
Examples/octave/functor/Makefile | 6 +-
Examples/octave/module_load/Makefile | 8 +-
Examples/octave/operator/Makefile | 6 +-
Examples/octave/pointer/Makefile | 6 +-
Examples/octave/reference/Makefile | 6 +-
Examples/octave/simple/Makefile | 6 +-
Examples/octave/template/Makefile | 6 +-
Examples/octave/variables/Makefile | 6 +-
Examples/perl5/callback/Makefile | 8 +-
Examples/perl5/class/Makefile | 8 +-
Examples/perl5/constants/Makefile | 8 +-
Examples/perl5/constants2/Makefile | 8 +-
Examples/perl5/extend/Makefile | 8 +-
Examples/perl5/funcptr/Makefile | 8 +-
Examples/perl5/import/Makefile | 12 +-
Examples/perl5/inline/Makefile | 4 +-
Examples/perl5/java/Makefile | 10 +-
Examples/perl5/multimap/Makefile | 8 +-
Examples/perl5/multiple_inheritance/Makefile | 8 +-
Examples/perl5/pointer/Makefile | 8 +-
Examples/perl5/reference/Makefile | 8 +-
Examples/perl5/simple/Makefile | 8 +-
Examples/perl5/value/Makefile | 8 +-
Examples/perl5/variables/Makefile | 8 +-
Examples/perl5/xmlstring/Makefile | 8 +-
Examples/php/callback/Makefile | 8 +-
Examples/php/class/Makefile | 8 +-
Examples/php/constants/Makefile | 8 +-
Examples/php/cpointer/Makefile | 8 +-
Examples/php/disown/Makefile | 8 +-
Examples/php/enum/Makefile | 8 +-
Examples/php/extend/Makefile | 8 +-
Examples/php/funcptr/Makefile | 8 +-
Examples/php/overloading/Makefile | 8 +-
Examples/php/pointer/Makefile | 8 +-
Examples/php/pragmas/Makefile | 8 +-
Examples/php/proxy/Makefile | 8 +-
Examples/php/reference/Makefile | 8 +-
Examples/php/simple/Makefile | 8 +-
Examples/php/sync/Makefile | 8 +-
Examples/php/value/Makefile | 8 +-
Examples/php/variables/Makefile | 8 +-
Examples/pike/class/Makefile | 8 +-
Examples/pike/constants/Makefile | 8 +-
Examples/pike/enum/Makefile | 8 +-
Examples/pike/overload/Makefile | 8 +-
Examples/pike/simple/Makefile | 8 +-
Examples/pike/template/Makefile | 8 +-
Examples/python/callback/Makefile | 8 +-
Examples/python/class/Makefile | 8 +-
Examples/python/constants/Makefile | 8 +-
Examples/python/contract/Makefile | 8 +-
Examples/python/docstrings/Makefile | 8 +-
Examples/python/enum/Makefile | 8 +-
Examples/python/exception/Makefile | 8 +-
Examples/python/exceptproxy/Makefile | 8 +-
Examples/python/extend/Makefile | 8 +-
Examples/python/funcptr/Makefile | 8 +-
Examples/python/funcptr2/Makefile | 8 +-
Examples/python/functor/Makefile | 8 +-
Examples/python/import/Makefile | 12 +-
Examples/python/import_packages/Makefile | 11 +-
.../import_packages/from_init1/Makefile | 4 +-
.../import_packages/from_init1/py2/Makefile | 2 +-
.../from_init1/py2/pkg2/Makefile | 12 +-
.../import_packages/from_init1/py3/Makefile | 2 +-
.../from_init1/py3/pkg2/Makefile | 12 +-
.../import_packages/from_init2/Makefile | 4 +-
.../import_packages/from_init2/py2/Makefile | 2 +-
.../from_init2/py2/pkg2/Makefile | 6 +-
.../from_init2/py2/pkg2/pkg3/Makefile | 6 +-
.../import_packages/from_init2/py3/Makefile | 2 +-
.../from_init2/py3/pkg2/Makefile | 6 +-
.../from_init2/py3/pkg2/pkg3/Makefile | 6 +-
.../import_packages/from_init3/Makefile | 4 +-
.../import_packages/from_init3/py2/Makefile | 2 +-
.../from_init3/py2/pkg2/Makefile | 6 +-
.../from_init3/py2/pkg2/pkg3/Makefile | 2 +-
.../from_init3/py2/pkg2/pkg3/pkg4/Makefile | 6 +-
.../import_packages/from_init3/py3/Makefile | 2 +-
.../from_init3/py3/pkg2/Makefile | 6 +-
.../from_init3/py3/pkg2/pkg3/Makefile | 2 +-
.../from_init3/py3/pkg2/pkg3/pkg4/Makefile | 6 +-
.../import_packages/relativeimport1/Makefile | 4 +-
.../relativeimport1/py2/Makefile | 2 +-
.../relativeimport1/py2/pkg2/Makefile | 6 +-
.../relativeimport1/py2/pkg2/pkg3/Makefile | 6 +-
.../relativeimport1/py3/Makefile | 2 +-
.../relativeimport1/py3/pkg2/Makefile | 6 +-
.../relativeimport1/py3/pkg2/pkg3/Makefile | 6 +-
.../import_packages/relativeimport2/Makefile | 4 +-
.../relativeimport2/py2/Makefile | 2 +-
.../relativeimport2/py2/pkg2/Makefile | 6 +-
.../relativeimport2/py2/pkg2/pkg3/Makefile | 2 +-
.../py2/pkg2/pkg3/pkg4/Makefile | 6 +-
.../relativeimport2/py3/Makefile | 2 +-
.../relativeimport2/py3/pkg2/Makefile | 6 +-
.../relativeimport2/py3/pkg2/pkg3/Makefile | 2 +-
.../py3/pkg2/pkg3/pkg4/Makefile | 6 +-
.../import_packages/same_modnames1/Makefile | 4 +-
.../same_modnames1/pkg1/Makefile | 6 +-
.../same_modnames1/pkg2/Makefile | 6 +-
.../import_packages/same_modnames2/Makefile | 4 +-
.../same_modnames2/pkg1/Makefile | 6 +-
.../same_modnames2/pkg1/pkg2/Makefile | 6 +-
Examples/python/import_template/Makefile | 12 +-
Examples/python/java/Makefile | 10 +-
Examples/python/libffi/Makefile | 8 +-
Examples/python/multimap/Makefile | 8 +-
Examples/python/operator/Makefile | 8 +-
.../python/performance/constructor/Makefile | 10 +-
Examples/python/performance/func/Makefile | 10 +-
.../python/performance/hierarchy/Makefile | 10 +-
.../performance/hierarchy_operator/Makefile | 10 +-
Examples/python/performance/operator/Makefile | 10 +-
Examples/python/pointer/Makefile | 8 +-
Examples/python/reference/Makefile | 8 +-
Examples/python/simple/Makefile | 8 +-
Examples/python/smartptr/Makefile | 8 +-
Examples/python/std_map/Makefile | 8 +-
Examples/python/std_vector/Makefile | 8 +-
Examples/python/swigrun/Makefile | 8 +-
Examples/python/template/Makefile | 8 +-
Examples/python/varargs/Makefile | 8 +-
Examples/python/variables/Makefile | 8 +-
Examples/r/class/Makefile | 6 +-
Examples/r/simple/Makefile | 6 +-
Examples/ruby/class/Makefile | 8 +-
Examples/ruby/constants/Makefile | 8 +-
Examples/ruby/enum/Makefile | 8 +-
Examples/ruby/exception_class/Makefile | 8 +-
Examples/ruby/free_function/Makefile | 8 +-
Examples/ruby/funcptr/Makefile | 8 +-
Examples/ruby/funcptr2/Makefile | 8 +-
Examples/ruby/functor/Makefile | 8 +-
Examples/ruby/hashargs/Makefile | 8 +-
Examples/ruby/import/Makefile | 12 +-
Examples/ruby/import_template/Makefile | 12 +-
Examples/ruby/java/Makefile | 10 +-
Examples/ruby/mark_function/Makefile | 8 +-
Examples/ruby/multimap/Makefile | 8 +-
Examples/ruby/operator/Makefile | 8 +-
Examples/ruby/overloading/Makefile | 8 +-
Examples/ruby/pointer/Makefile | 8 +-
Examples/ruby/reference/Makefile | 8 +-
Examples/ruby/simple/Makefile | 8 +-
Examples/ruby/std_vector/Makefile | 8 +-
Examples/ruby/template/Makefile | 8 +-
Examples/ruby/value/Makefile | 8 +-
Examples/ruby/variables/Makefile | 8 +-
Examples/tcl/class/Makefile | 8 +-
Examples/tcl/constants/Makefile | 8 +-
Examples/tcl/contract/Makefile | 8 +-
Examples/tcl/enum/Makefile | 8 +-
Examples/tcl/funcptr/Makefile | 8 +-
Examples/tcl/import/Makefile | 12 +-
Examples/tcl/java/Makefile | 10 +-
Examples/tcl/multimap/Makefile | 8 +-
Examples/tcl/operator/Makefile | 8 +-
Examples/tcl/pointer/Makefile | 8 +-
Examples/tcl/reference/Makefile | 8 +-
Examples/tcl/simple/Makefile | 8 +-
Examples/tcl/std_vector/Makefile | 8 +-
Examples/tcl/value/Makefile | 8 +-
Examples/tcl/variables/Makefile | 8 +-
Examples/test-suite/allegrocl/Makefile.in | 6 +
Examples/test-suite/cffi/Makefile.in | 6 +
Examples/test-suite/chicken/Makefile.in | 7 +
Examples/test-suite/clisp/Makefile.in | 6 +
Examples/test-suite/common.mk | 14 +-
Examples/test-suite/csharp/Makefile.in | 13 +-
Examples/test-suite/d/Makefile.in | 10 +-
Examples/test-suite/errors/Makefile.in | 19 +-
Examples/test-suite/go/Makefile.in | 20 +-
Examples/test-suite/guile/Makefile.in | 12 +-
Examples/test-suite/java/Makefile.in | 13 +-
Examples/test-suite/javascript/Makefile.in | 27 +-
.../javascript/abstract_access_runme.js | 2 +-
.../javascript/abstract_inherit_runme.js | 2 +-
.../javascript/abstract_typedef2_runme.js | 2 +-
.../javascript/abstract_typedef_runme.js | 2 +-
.../javascript/abstract_virtual_runme.js | 2 +-
.../javascript/array_member_runme.js | 2 +-
.../javascript/arrays_global_runme.js | 2 +-
.../test-suite/javascript/callback_runme.js | 2 +-
.../javascript/char_binary_runme.js | 2 +-
.../javascript/char_strings_runme.js | 2 +-
.../javascript/class_ignore_runme.js | 2 +-
.../javascript/class_scope_weird_runme.js | 2 +-
.../javascript/complextest_runme.js | 2 +-
.../test-suite/javascript/constover_runme.js | 2 +-
.../javascript/constructor_copy_runme.js | 2 +-
.../test-suite/javascript/cpp_enum_runme.js | 2 +-
.../javascript/cpp_namespace_runme.js | 2 +-
.../test-suite/javascript/cpp_static_runme.js | 2 +-
.../javascript/director_alternating_runme.js | 2 +-
.../test-suite/javascript/disown_runme.js | 2 +-
.../javascript/dynamic_cast_runme.js | 2 +-
Examples/test-suite/javascript/empty_runme.js | 2 +-
.../javascript/enum_template_runme.js | 2 +-
.../test-suite/javascript/infinity_runme.js | 2 +-
.../namespace_virtual_method_runme.js | 2 +-
.../javascript/node_template/binding.gyp.in | 2 +-
.../javascript/nspace_extend_runme.js | 2 +-
.../test-suite/javascript/nspace_runme.js | 2 +-
.../javascript/overload_copy_runme.js | 2 +-
.../javascript/preproc_include_runme.js | 2 +-
.../test-suite/javascript/preproc_runme.js | 2 +-
.../test-suite/javascript/rename1_runme.js | 2 +-
.../test-suite/javascript/rename2_runme.js | 2 +-
.../test-suite/javascript/rename3_runme.js | 2 +-
.../test-suite/javascript/rename4_runme.js | 2 +-
.../javascript/rename_scope_runme.js | 2 +-
.../javascript/rename_simple_runme.js | 2 +-
.../javascript/ret_by_value_runme.js | 2 +-
Examples/test-suite/javascript/setup_test.sh | 6 -
.../javascript/string_simple_runme.js | 2 +-
.../javascript/struct_value_runme.js | 2 +-
.../javascript/template_static_runme.js | 2 +-
.../javascript/typedef_class_runme.js | 2 +-
.../javascript/typedef_inherit_runme.js | 2 +-
.../javascript/typedef_scope_runme.js | 2 +-
.../javascript/typemap_arrays_runme.js | 2 +-
.../javascript/typemap_delete_runme.js | 2 +-
.../javascript/typemap_namespace_runme.js | 2 +-
.../javascript/typemap_ns_using_runme.js | 2 +-
.../test-suite/javascript/using1_runme.js | 2 +-
.../test-suite/javascript/using2_runme.js | 2 +-
.../test-suite/javascript/varargs_runme.js | 2 +-
Examples/test-suite/lua/Makefile.in | 11 +-
Examples/test-suite/mzscheme/Makefile.in | 6 +
Examples/test-suite/ocaml/Makefile.in | 6 +
Examples/test-suite/octave/Makefile.in | 13 +-
Examples/test-suite/perl5/Makefile.in | 13 +-
Examples/test-suite/php/Makefile.in | 15 +-
Examples/test-suite/pike/Makefile.in | 6 +
Examples/test-suite/python/Makefile.in | 43 +-
Examples/test-suite/r/Makefile.in | 6 +
Examples/test-suite/ruby/Makefile.in | 11 +-
Examples/test-suite/tcl/Makefile.in | 11 +-
Examples/test-suite/uffi/Makefile.in | 6 +
Makefile.in | 4 +-
Tools/javascript/Makefile.in | 2 +-
configure.ac | 35 ++
420 files changed, 1772 insertions(+), 1510 deletions(-)
delete mode 100644 Examples/javascript/class/binding.gyp
create mode 100644 Examples/javascript/class/binding.gyp.in
delete mode 100644 Examples/javascript/constant/binding.gyp
create mode 100644 Examples/javascript/constant/binding.gyp.in
delete mode 100644 Examples/javascript/enum/binding.gyp
create mode 100644 Examples/javascript/enum/binding.gyp.in
rename Examples/javascript/exception/{binding.gyp => binding.gyp.in} (89%)
delete mode 100644 Examples/javascript/functor/binding.gyp
create mode 100644 Examples/javascript/functor/binding.gyp.in
delete mode 100644 Examples/javascript/nspace/binding.gyp
create mode 100644 Examples/javascript/nspace/binding.gyp.in
delete mode 100644 Examples/javascript/operator/binding.gyp
create mode 100644 Examples/javascript/operator/binding.gyp.in
delete mode 100644 Examples/javascript/overload/binding.gyp
create mode 100644 Examples/javascript/overload/binding.gyp.in
delete mode 100644 Examples/javascript/pointer/binding.gyp
create mode 100644 Examples/javascript/pointer/binding.gyp.in
delete mode 100644 Examples/javascript/reference/binding.gyp
create mode 100644 Examples/javascript/reference/binding.gyp.in
delete mode 100644 Examples/javascript/simple/binding.gyp
create mode 100644 Examples/javascript/simple/binding.gyp.in
delete mode 100644 Examples/javascript/template/binding.gyp
create mode 100644 Examples/javascript/template/binding.gyp.in
delete mode 100644 Examples/javascript/variables/binding.gyp
create mode 100644 Examples/javascript/variables/binding.gyp.in
delete mode 100644 Examples/test-suite/javascript/setup_test.sh
diff --git a/.gitignore b/.gitignore
index d4d70b010..ce6a3c4b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -136,3 +136,6 @@ Examples/test-suite/uffi/*/
# Scratch directories
Examples/scratch
+
+# Out of source tree build directories
+_build*/
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index a0acd0fb8..dcfbd83b9 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -25,11 +25,28 @@
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 out-of-source-tree builds, SRCDIR will be a relative
+# path ending with a '/'
+
+# SRCDIR_SRCS, etc. are $(SRCS), etc. with $(SRCDIR) prepended
+SRCDIR_SRCS = $(addprefix $(SRCDIR),$(SRCS))
+SRCDIR_CSRCS = $(addprefix $(SRCDIR),$(CSRCS))
+SRCDIR_CXXSRCS = $(addprefix $(SRCDIR),$(CXXSRCS))
+
+ifeq (,$(SRCDIR))
+SRCDIR_INCLUDE = -I.
+else
+SRCDIR_INCLUDE = -I. -I$(SRCDIR)
+endif
+
TARGET =
CC = @CC@
CXX = @CXX@
-CFLAGS = @PLATCFLAGS@
-CXXFLAGS = @BOOST_CPPFLAGS@ @PLATCXXFLAGS@
+CFLAGS = $(SRCDIR_INCLUDE) @PLATCFLAGS@
+CXXFLAGS = $(SRCDIR_INCLUDE) @BOOST_CPPFLAGS@ @PLATCXXFLAGS@
prefix = @prefix@
exec_prefix= @exec_prefix@
SRCS =
@@ -37,7 +54,7 @@ INCLUDES =
LIBS =
INTERFACE =
INTERFACEDIR =
-INTERFACEPATH = $(INTERFACEDIR)$(INTERFACE)
+INTERFACEPATH = $(SRCDIR)$(INTERFACEDIR)$(INTERFACE)
SWIGOPT =
SWIG = swig
@@ -130,38 +147,38 @@ TCL_DLNK = @TCLDYNAMICLINKING@
TCL_SO = @TCL_SO@
TCLLDSHARED = @TCLLDSHARED@
TCLCXXSHARED = @TCLCXXSHARED@
-TCL_SCRIPT = $(RUNME).tcl
+TCL_SCRIPT = $(SRCDIR)$(RUNME).tcl
# -----------------------------------------------------------
# Build a new version of the tclsh shell
# -----------------------------------------------------------
-tclsh: $(SRCS)
- $(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) \
+tclsh: $(SRCDIR_SRCS)
+ $(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) \
$(TCL_LIB) $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET)
-tclsh_cpp: $(SRCS)
- $(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) \
+tclsh_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) \
$(TCL_LIB) $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET)
# -----------------------------------------------------------
# Build a Tcl dynamic loadable module (you might need to tweak this)
# -----------------------------------------------------------
-tcl: $(SRCS)
- $(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE)
+tcl: $(SRCDIR_SRCS)
+ $(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE)
$(TCLLDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(TCL_SO)
# -----------------------------------------------------------
# Build a Tcl7.5 dynamic loadable module for C++
# -----------------------------------------------------------
-tcl_cpp: $(SRCS)
- $(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE)
+tcl_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE)
$(TCLCXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(TCL_SO)
# -----------------------------------------------------------------
@@ -205,44 +222,44 @@ PERL5_CCCDLFLAGS = @PERL5CCCDLFLAGS@
PERL5_LDFLAGS = @PERL5LDFLAGS@
PERL = @PERL@
PERL5_LIB = -L$(PERL5_INCLUDE) -l@PERL5LIB@ @LIBS@ $(SYSLIBS)
-PERL5_SCRIPT = $(RUNME).pl
+PERL5_SCRIPT = $(SRCDIR)$(RUNME).pl
# ----------------------------------------------------------------
# Build a Perl5 dynamically loadable module (C)
# ----------------------------------------------------------------
-perl5: $(SRCS)
- $(SWIG) -perl5 $(SWIGOPT) $(INTERFACEPATH)
- $(CC) -c -Dbool=char $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(PERL5_CCFLAGS) $(PERL5_CCCDLFLAGS) -I$(PERL5_INCLUDE)
+perl5: $(SRCDIR_SRCS)
+ $(SWIG) -perl5 $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) -c -Dbool=char $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(PERL5_CCFLAGS) $(PERL5_CCCDLFLAGS) -I$(PERL5_INCLUDE)
$(LDSHARED) $(CFLAGS) $(PERL5_CCDLFLAGS) $(OBJS) $(IOBJS) $(PERL5_LDFLAGS) $(PERL5_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# ----------------------------------------------------------------
# Build a Perl5 dynamically loadable module (C++)
# ----------------------------------------------------------------
-perl5_cpp: $(SRCS)
- $(SWIG) -perl5 -c++ $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PERL5_CCFLAGS) $(PERL5_CCCDLFLAGS) -I$(PERL5_INCLUDE)
+perl5_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -perl5 -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PERL5_CCFLAGS) $(PERL5_CCCDLFLAGS) -I$(PERL5_INCLUDE)
$(CXXSHARED) $(CXXFLAGS) $(PERL5_CCDLFLAGS) $(OBJS) $(IOBJS) $(PERL5_LDFLAGS) $(PERL5_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# ----------------------------------------------------------------
# Build a module from existing XS C source code. (ie. from xsubpp).
# ----------------------------------------------------------------
-perl5_xs: $(SRCS)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(INCLUDES) -I$(PERL5_INCLUDE)
+perl5_xs: $(SRCDIR_SRCS)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(INCLUDES) -I$(PERL5_INCLUDE)
$(LDSHARED) $(CFLAGS) $(OBJS) $(LIBS) -o $(TARGET)$(SO)
# ----------------------------------------------------------------
# Build a statically linked Perl5 executable
# ----------------------------------------------------------------
-perl5_static: $(SRCS)
- $(SWIG) -perl5 -static -lperlmain.i $(SWIGOPT) $(INTERFACEPATH)
- $(CC) $(CFLAGS) -Dbool=char $(SRCS) $(ISRCS) $(INCLUDES) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
+perl5_static: $(SRCDIR_SRCS)
+ $(SWIG) -perl5 -static -lperlmain.i $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) $(CFLAGS) -Dbool=char $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
-perl5_static_cpp: $(SRCS)
- $(SWIG) -perl5 -c++ -static -lperlmain.i $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
+perl5_static_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -perl5 -c++ -static -lperlmain.i $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
# -----------------------------------------------------------------
# Running a Perl5 example
@@ -271,15 +288,17 @@ perl5_clean:
##### PYTHON ######
##################################################################
+PYTHON_FLAGS =
+
# Make sure these locate your Python installation
ifeq (,$(PY3))
PYTHON_INCLUDE= $(DEFS) @PYINCLUDE@
PYTHON_LIB = @PYLIB@
- PYTHON = @PYTHON@
+ PYTHON = @PYTHON@ $(PYTHON_FLAGS)
else
PYTHON_INCLUDE= $(DEFS) @PY3INCLUDE@
PYTHON_LIB = @PY3LIB@
- PYTHON = @PYTHON3@
+ PYTHON = @PYTHON3@ $(PYTHON_FLAGS)
endif
# Extra Python specific linking options
@@ -303,18 +322,18 @@ endif
# Build a C dynamically loadable module
# ----------------------------------------------------------------
-python: $(SRCS)
- $(SWIGPYTHON) $(SWIGOPT) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(PYTHON_INCLUDE)
+python: $(SRCDIR_SRCS)
+ $(SWIGPYTHON) $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(PYTHON_INCLUDE)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) -o $(LIBPREFIX)_$(TARGET)$(PYTHON_SO)
# -----------------------------------------------------------------
# Build a C++ dynamically loadable module
# -----------------------------------------------------------------
-python_cpp: $(SRCS)
- $(SWIGPYTHON) -c++ $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(PYTHON_INCLUDE)
+python_cpp: $(SRCDIR_SRCS)
+ $(SWIGPYTHON) -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(PYTHON_INCLUDE)
$(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)_$(TARGET)$(PYTHON_SO)
# -----------------------------------------------------------------
@@ -328,14 +347,14 @@ python_cpp: $(SRCS)
TKINTER =
PYTHON_LIBOPTS = $(PYTHON_LINK) @LIBS@ $(TKINTER) $(SYSLIBS)
-python_static: $(SRCS)
- $(SWIGPYTHON) -lembed.i $(SWIGOPT) $(INTERFACEPATH)
- $(CC) $(CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCS) $(INCLUDES) \
+python_static: $(SRCDIR_SRCS)
+ $(SWIGPYTHON) -lembed.i $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) $(CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
$(PYTHON_INCLUDE) $(LIBS) -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET)
-python_static_cpp: $(SRCS)
- $(SWIGPYTHON) -c++ -lembed.i $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) \
+python_static_cpp: $(SRCDIR_SRCS)
+ $(SWIGPYTHON) -c++ -lembed.i $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
$(PYTHON_INCLUDE) $(LIBS) -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET)
# -----------------------------------------------------------------
@@ -351,9 +370,15 @@ endif
PY2TO3 = 2to3 `2to3 -l | grep -v -E "Available|import$$" | awk '{print "-f "$$0}'`
python_run: $(PYSCRIPT)
+ export PYTHONPATH=".:$$PYTHONPATH"; \
$(RUNTOOL) $(PYTHON) $(PYSCRIPT) $(RUNPIPE)
-$(RUNME)3.py: $(RUNME).py
+ifneq (,$(SRCDIR))
+$(RUNME).py: $(SRCDIR)$(RUNME).py
+ cp $< $@
+endif
+
+$(RUNME)3.py: $(SRCDIR)$(RUNME).py
cp $< $@
$(PY2TO3) -w $@ >/dev/null 2>&1
@@ -389,26 +414,26 @@ OCTAVE_CXX = $(DEFS) @OCTAVE_CPPFLAGS@ @OCTAVE_CXXFLAGS@
OCTAVE_DLNK = @OCTAVE_LDFLAGS@
OCTAVE_SO = @OCTAVE_SO@
-OCTAVE_SCRIPT = $(RUNME).m
+OCTAVE_SCRIPT = $(SRCDIR)$(RUNME).m
# ----------------------------------------------------------------
# Build a C dynamically loadable module
# Note: Octave requires C++ compiler when compiling C wrappers
# ----------------------------------------------------------------
-octave: $(SRCS)
- $(SWIG) -octave $(SWIGOPT) $(INTERFACEPATH)
+octave: $(SRCDIR_SRCS)
+ $(SWIG) -octave $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
$(CXX) -g -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(INCLUDES) $(OCTAVE_CXX)
- $(CC) -g -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CSRCS) $(INCLUDES)
+ $(CC) -g -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CSRCS) $(INCLUDES)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(OCTAVE_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(OCTAVE_SO)
# -----------------------------------------------------------------
# Build a C++ dynamically loadable module
# -----------------------------------------------------------------
-octave_cpp: $(SRCS)
- $(SWIG) -c++ -octave $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -g -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(OCTAVE_CXX)
+octave_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -c++ -octave $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -g -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(OCTAVE_CXX)
$(CXXSHARED) -g $(CXXFLAGS) $(OBJS) $(IOBJS) $(OCTAVE_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(OCTAVE_SO)
# -----------------------------------------------------------------
@@ -446,20 +471,20 @@ GUILE_SO = @GUILE_SO@
GUILE_LIBS = @GUILE_LIBS@
GUILE_LIBOPTS = @LIBS@ $(SYSLIBS)
GUILE_LIBPREFIX = lib
-GUILE_SCRIPT = $(RUNME).scm
+GUILE_SCRIPT = $(SRCDIR)$(RUNME).scm
#------------------------------------------------------------------
# Build a dynamically loaded module with passive linkage
#------------------------------------------------------------------
-guile: $(SRCS)
- $(SWIG) -guile -Linkage passive $(SWIGOPT) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(GUILE_CFLAGS) $(ISRCS) $(SRCS)
+guile: $(SRCDIR_SRCS)
+ $(SWIG) -guile -Linkage passive $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(GUILE_CFLAGS) $(ISRCS) $(SRCDIR_SRCS)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(GUILE_LIBS) $(LIBS) -o $(GUILE_LIBPREFIX)$(TARGET)$(GUILE_SO)
guile_cpp: $(GUILE_LIBPREFIX)$(TARGET)$(GUILE_SO)
-$(GUILE_LIBPREFIX)$(TARGET)$(GUILE_SO): $(SRCS)
- $(SWIG) -c++ -guile -Linkage passive $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(INCLUDES) $(GUILE_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS)
+$(GUILE_LIBPREFIX)$(TARGET)$(GUILE_SO): $(SRCDIR_SRCS)
+ $(SWIG) -c++ -guile -Linkage passive $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(INCLUDES) $(GUILE_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS)
$(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(GUILE_LIBS) $(LIBS) $(CPP_DLLIBS) -o $@
guile_externalhdr:
@@ -469,34 +494,34 @@ guile_externalhdr:
# Build Guile interpreter augmented with extra functions
# -----------------------------------------------------------------
-guile_augmented:
- $(SWIG) -guile $(SWIGOPT) $(INTERFACE)
- $(CC) $(CXXFLAGS) $(SRCS) $(ISRCS) $(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) -o $(TARGET)
+guile_augmented: $(SRCDIR_SRCS)
+ $(SWIG) -guile $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) $(CXXFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) -o $(TARGET)
# -----------------------------------------------------------------
# Build statically linked Guile interpreter
# -----------------------------------------------------------------
-guile_static: $(SRCS)
- $(SWIG) -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) \
+guile_static: $(SRCDIR_SRCS)
+ $(SWIG) -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
-DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \
$(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) $(GUILE_LIBOPTS) -o $(TARGET)-guile
-guile_static_cpp: $(SRCS)
- $(SWIG) -c++ -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) \
+guile_static_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -c++ -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
-DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \
$(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) $(GUILE_LIBOPTS) -o $(TARGET)-guile
-guile_simple: $(SRCS)
- $(SWIG) -guile -lguilemain.i -Linkage simple $(SWIGOPT) $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) \
+guile_simple: $(SRCDIR_SRCS)
+ $(SWIG) -guile -lguilemain.i -Linkage simple $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
$(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) $(GUILE_LIBOPTS) -o $(TARGET)-guile
-guile_simple_cpp: $(SRCS)
- $(SWIG) -c++ -guile -lguilemain.i -Linkage simple $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) \
+guile_simple_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -c++ -guile -lguilemain.i -Linkage simple $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
$(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) $(GUILE_LIBOPTS) -o $(TARGET)-guile
# -----------------------------------------------------------------
@@ -542,39 +567,39 @@ JAVALDSHARED = @JAVALDSHARED@
JAVACXXSHARED = @JAVACXXSHARED@
JAVACFLAGS = @JAVACFLAGS@
JAVA = @JAVA@
-JAVAC = @JAVAC@
+JAVAC = @JAVAC@ -d .
# ----------------------------------------------------------------
# Build a java dynamically loadable module (C)
# ----------------------------------------------------------------
-java: $(SRCS)
- $(SWIG) -java $(SWIGOPT) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(JAVACFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(JAVA_INCLUDE)
+java: $(SRCDIR_SRCS)
+ $(SWIG) -java $(SWIGOPT) -o $(ISRCS) $(realpath $(INTERFACEPATH))
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(JAVACFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(JAVA_INCLUDE)
$(JAVALDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) -o $(JAVA_LIBPREFIX)$(TARGET)$(JAVASO)
# ----------------------------------------------------------------
# Build a java dynamically loadable module (C++)
# ----------------------------------------------------------------
-java_cpp: $(SRCS)
- $(SWIG) -java -c++ $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(JAVACFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(JAVA_INCLUDE)
+java_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -java -c++ $(SWIGOPT) -o $(ICXXSRCS) $(realpath $(INTERFACEPATH))
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(JAVACFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(JAVA_INCLUDE)
$(JAVACXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(JAVA_LIBPREFIX)$(TARGET)$(JAVASO)
# ----------------------------------------------------------------
# Compile java files
# ----------------------------------------------------------------
-java_compile: $(SRCS)
- $(COMPILETOOL) $(JAVAC) $(JAVACFLAGS) $(JAVASRCS)
+java_compile: $(SRCDIR_SRCS)
+ $(COMPILETOOL) $(JAVAC) $(JAVACFLAGS) $(addprefix $(SRCDIR),$(JAVASRCS))
# -----------------------------------------------------------------
# Run java example
# -----------------------------------------------------------------
java_run:
- env LD_LIBRARY_PATH=. $(RUNTOOL) $(JAVA) $(RUNME) $(RUNPIPE)
+ env LD_LIBRARY_PATH=$$PWD $(RUNTOOL) $(JAVA) $(RUNME) $(RUNPIPE)
# -----------------------------------------------------------------
# Version display
@@ -617,37 +642,38 @@ NODEGYP = @NODEGYP@
javascript_wrapper:
$(SWIG) -javascript $(SWIGOPT) -o $(INTERFACEDIR)$(TARGET)_wrap.c $(INTERFACEPATH)
-javascript_wrapper_cpp: $(SRCS)
+javascript_wrapper_cpp: $(SRCDIR_SRCS)
$(SWIG) -javascript -c++ $(SWIGOPT) -o $(INTERFACEDIR)$(TARGET)_wrap.cxx $(INTERFACEPATH)
-javascript_build: $(SRCS)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(JSINCLUDES)
+javascript_build: $(SRCDIR_SRCS)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(JSINCLUDES)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
-javascript_build_cpp: $(SRCS)
+javascript_build_cpp: $(SRCDIR_SRCS)
ifeq (node,$(JSENGINE))
+ sed -e 's|$$srcdir|./$(SRCDIR)|g' $(SRCDIR)binding.gyp.in > binding.gyp
$(NODEGYP) --loglevel=silent configure build 1>>/dev/null
else
- $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(JSINCLUDES)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
$(CXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
endif
# These targets are used by the test-suite:
-javascript: $(SRCS) javascript_custom_interpreter
+javascript: $(SRCDIR_SRCS) javascript_custom_interpreter
$(SWIG) -javascript $(SWIGOPT) $(INTERFACEPATH)
ifeq (jsc, $(ENGINE))
- $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(JSINCLUDES)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(JSINCLUDES)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
else # (v8 | node) # v8 and node must be compiled as c++
- $(CXX) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(JSINCLUDES)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
$(CXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
endif
-javascript_cpp: $(SRCS) javascript_custom_interpreter
+javascript_cpp: $(SRCDIR_SRCS) javascript_custom_interpreter
$(SWIG) -javascript -c++ $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(JSINCLUDES)
+ $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
$(CXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
@@ -659,10 +685,10 @@ javascript_custom_interpreter:
ifeq (node,$(JSENGINE))
javascript_run:
- $(RUNTOOL) $(NODEJS) $(RUNME).js $(RUNPIPE)
+ env NODE_PATH=$$PWD:$(SRCDIR) $(RUNTOOL) $(NODEJS) $(SRCDIR)$(RUNME).js $(RUNPIPE)
else
javascript_run: javascript_custom_interpreter
- $(RUNTOOL) $(ROOT_DIR)/Tools/javascript/javascript -$(JSENGINE) -L $(TARGET) $(RUNME).js $(RUNPIPE)
+ $(RUNTOOL) $(ROOT_DIR)/Tools/javascript/javascript -$(JSENGINE) -L $(TARGET) $(SRCDIR)$(RUNME).js $(RUNPIPE)
endif
# -----------------------------------------------------------------
@@ -718,7 +744,7 @@ TARGETID = 1
# Build an Android dynamically loadable module (C)
# ----------------------------------------------------------------
-android: $(SRCS)
+android: $(SRCDIR_SRCS)
$(ANDROID) $(SILENT_OPTION) update project --target $(TARGETID) --name $(PROJECTNAME) --path .
$(SWIG) -java $(SWIGOPT) -o $(INTERFACEDIR)$(TARGET)_wrap.c $(INTERFACEPATH)
+$(ANDROID_NDK_BUILD) $(SILENT_PIPE)
@@ -728,7 +754,7 @@ android: $(SRCS)
# Build an Android dynamically loadable module (C++)
# ----------------------------------------------------------------
-android_cpp: $(SRCS)
+android_cpp: $(SRCDIR_SRCS)
$(ANDROID) $(SILENT_OPTION) update project --target $(TARGETID) --name $(PROJECTNAME) --path .
$(SWIG) -java -c++ $(SWIGOPT) -o $(INTERFACEDIR)$(TARGET)_wrap.cpp $(INTERFACEPATH)
+$(ANDROID_NDK_BUILD) $(SILENT_PIPE)
@@ -769,13 +795,13 @@ MODULA3_INCLUDE= @MODULA3INC@
# Build a modula3 dynamically loadable module (C)
# ----------------------------------------------------------------
-modula3: $(SRCS)
- $(SWIG) -modula3 $(SWIGOPT) $(INTERFACEPATH)
-# $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) \
+modula3: $(SRCDIR_SRCS)
+ $(SWIG) -modula3 $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+# $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) \
# $(OBJS) $(IOBJS) $(LIBS)
-modula3_cpp: $(SRCS)
- $(SWIG) -modula3 -c++ $(SWIGOPT) $(INTERFACEPATH)
+modula3_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -modula3 -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
# -----------------------------------------------------------------
# Run modula3 example
@@ -814,14 +840,14 @@ MZSCHEME_SCRIPT = $(RUNME).scm
# Build a C/C++ dynamically loadable module
# ----------------------------------------------------------------
-mzscheme: $(SRCS)
- $(SWIG) -mzscheme $(SWIGOPT) $(INTERFACEPATH)
- $(COMPILETOOL) $(MZC) `echo $(INCLUDES) | sed 's/-I/++ccf -I/g'` --cc $(ISRCS) $(SRCS)
+mzscheme: $(SRCDIR_SRCS)
+ $(SWIG) -mzscheme $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(COMPILETOOL) $(MZC) `echo $(INCLUDES) | sed 's/-I/++ccf -I/g'` --cc $(ISRCS) $(SRCDIR_SRCS)
$(COMPILETOOL) $(MZC) --ld $(TARGET)$(MZSCHEME_SO) $(OBJS) $(IOBJS)
-mzscheme_cpp: $(SRCS)
- $(SWIG) -mzscheme -c++ $(SWIGOPT) $(INTERFACEPATH)
- $(COMPILETOOL) $(MZC) `echo $(INCLUDES) | sed 's/-I/++ccf -I/g'` --cc $(ICXXSRCS) $(SRCS) $(CXXSRCS)
+mzscheme_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -mzscheme -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(COMPILETOOL) $(MZC) `echo $(INCLUDES) | sed 's/-I/++ccf -I/g'` --cc $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS)
$(CXXSHARED) $(CXXFLAGS) -o $(LIBPREFIX)$(TARGET)$(MZSCHEME_SO) $(OBJS) $(IOBJS) $(MZDYNOBJ) $(CPP_DLLIBS)
# -----------------------------------------------------------------
@@ -829,7 +855,7 @@ mzscheme_cpp: $(SRCS)
# -----------------------------------------------------------------
mzscheme_run:
- env LD_LIBRARY_PATH=. $(RUNTOOL) $(MZSCHEME) -r $(MZSCHEME_SCRIPT) $(RUNPIPE)
+ env LD_LIBRARY_PATH=$$PWD $(RUNTOOL) $(MZSCHEME) -r $(MZSCHEME_SCRIPT) $(RUNPIPE)
# -----------------------------------------------------------------
# Version display
@@ -869,10 +895,10 @@ OCAMLCORE=\
$(OCC) -I $(OCAMLP4WHERE) -pp "camlp4o pa_extend.cmo q_MLast.cmo" \
-c swigp4.ml
-ocaml_static: $(SRCS)
+ocaml_static: $(SRCDIR_SRCS)
$(OCAMLCORE)
- $(SWIG) -ocaml $(SWIGOPT) $(INTERFACEPATH)
- $(OCC) -g -c -ccopt -g -ccopt "$(INCLUDES)" $(ISRCS) $(SRCS)
+ $(SWIG) -ocaml $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(OCC) -g -c -ccopt -g -ccopt "$(INCLUDES)" $(ISRCS) $(SRCDIR_SRCS)
$(OCC) -g -c $(INTERFACE:%.i=%.mli)
$(OCC) -g -c $(INTERFACE:%.i=%.ml)
test -z "$(PROGFILE)" || test -f "$(PROGFILE)" && \
@@ -883,10 +909,10 @@ ocaml_static: $(SRCS)
$(PROGFILE:%.ml=%.cmo) \
$(INTERFACE:%.i=%_wrap.@OBJEXT@) $(OBJS) -cclib "$(LIBS)"
-ocaml_dynamic: $(SRCS)
+ocaml_dynamic: $(SRCDIR_SRCS)
$(OCAMLCORE)
- $(SWIG) -ocaml $(SWIGOPT) $(INTERFACEPATH)
- $(OCC) -g -c -ccopt -g -ccopt "$(INCLUDES)" $(ISRCS) $(SRCS)
+ $(SWIG) -ocaml $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(OCC) -g -c -ccopt -g -ccopt "$(INCLUDES)" $(ISRCS) $(SRCDIR_SRCS)
$(CXXSHARED) $(CXXFLAGS) $(CCSHARED) $(CFLAGS) -o $(INTERFACE:%.i=%@SO@) \
$(INTERFACE:%.i=%_wrap.@OBJEXT@) $(OBJS) $(LIBS)
$(OCAMLDLGEN) $(INTERFACE:%.i=%.ml) $(INTERFACE:%.i=%@SO@) > \
@@ -902,10 +928,10 @@ ocaml_dynamic: $(SRCS)
-package dl -linkpkg \
$(INTERFACE:%.i=%.cmo) $(PROGFILE:%.ml=%.cmo)
-ocaml_static_toplevel: $(SRCS)
+ocaml_static_toplevel: $(SRCDIR_SRCS)
$(OCAMLCORE)
- $(SWIG) -ocaml $(SWIGOPT) $(INTERFACEPATH)
- $(OCC) -g -c -ccopt -g -ccopt "$(INCLUDES)" $(ISRCS) $(SRCS)
+ $(SWIG) -ocaml $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(OCC) -g -c -ccopt -g -ccopt "$(INCLUDES)" $(ISRCS) $(SRCDIR_SRCS)
$(OCC) -g -c $(INTERFACE:%.i=%.mli)
$(OCC) -g -c $(INTERFACE:%.i=%.ml)
test -z "$(PROGFILE)" || test -f "$(PROGFILE)" && \
@@ -917,12 +943,12 @@ ocaml_static_toplevel: $(SRCS)
$(INTERFACE:%.i=%.cmo) \
$(INTERFACE:%.i=%_wrap.@OBJEXT@) $(OBJS) -cclib "$(LIBS)"
-ocaml_static_cpp: $(SRCS)
+ocaml_static_cpp: $(SRCDIR_SRCS)
$(OCAMLCORE)
- $(SWIG) -ocaml -c++ $(SWIGOPT) $(INTERFACEPATH)
+ $(SWIG) -ocaml -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
cp $(ICXXSRCS) $(ICXXSRCS:%.cxx=%.c)
$(OCC) -cc '$(CXX) -Wno-write-strings' -g -c -ccopt -g -ccopt "-xc++ $(INCLUDES)" \
- $(ICXXSRCS:%.cxx=%.c) $(SRCS) $(CXXSRCS)
+ $(ICXXSRCS:%.cxx=%.c) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS)
$(OCC) -g -c $(INTERFACE:%.i=%.mli)
$(OCC) -g -c $(INTERFACE:%.i=%.ml)
test -z "$(PROGFILE)" || test -f "$(PROGFILE)" && \
@@ -934,12 +960,12 @@ ocaml_static_cpp: $(SRCS)
$(INTERFACE:%.i=%_wrap.@OBJEXT@) $(OBJS) \
-cclib "$(LIBS)" -cc '$(CXX) -Wno-write-strings'
-ocaml_static_cpp_toplevel: $(SRCS)
+ocaml_static_cpp_toplevel: $(SRCDIR_SRCS)
$(OCAMLCORE)
- $(SWIG) -ocaml -c++ $(SWIGOPT) $(INTERFACEPATH)
+ $(SWIG) -ocaml -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
cp $(ICXXSRCS) $(ICXXSRCS:%.cxx=%.c)
$(OCC) -cc '$(CXX) -Wno-write-strings' -g -c -ccopt -g -ccopt "-xc++ $(INCLUDES)" \
- $(ICXXSRCS:%.cxx=%.c) $(SRCS) $(CXXSRCS)
+ $(ICXXSRCS:%.cxx=%.c) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS)
$(OCC) -g -c $(INTERFACE:%.i=%.mli)
$(OCC) -g -c $(INTERFACE:%.i=%.ml)
test -z "$(PROGFILE)" || test -f "$(PROGFILE)" && \
@@ -952,12 +978,12 @@ ocaml_static_cpp_toplevel: $(SRCS)
$(INTERFACE:%.i=%_wrap.@OBJEXT@) $(OBJS) \
-cclib "$(LIBS)" -cc '$(CXX) -Wno-write-strings'
-ocaml_dynamic_cpp: $(SRCS)
+ocaml_dynamic_cpp: $(SRCDIR_SRCS)
$(OCAMLCORE)
- $(SWIG) -ocaml -c++ $(SWIGOPT) $(INTERFACEPATH)
+ $(SWIG) -ocaml -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
cp $(ICXXSRCS) $(ICXXSRCS:%.cxx=%.c)
$(OCC) -cc '$(CXX) -Wno-write-strings' -g -c -ccopt -g -ccopt "-xc++ $(INCLUDES)" \
- $(ICXXSRCS:%.cxx=%.c) $(SRCS) $(CXXSRCS) -ccopt -fPIC
+ $(ICXXSRCS:%.cxx=%.c) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) -ccopt -fPIC
$(CXXSHARED) $(CXXFLAGS) -o $(INTERFACE:%.i=%@SO@) \
$(INTERFACE:%.i=%_wrap.@OBJEXT@) $(OBJS) \
$(CPP_DLLIBS) $(LIBS)
@@ -1010,25 +1036,25 @@ RUBY_DLNK = @RUBYDYNAMICLINKING@
RUBY_LIBOPTS = @RUBYLINK@ @LIBS@ $(SYSLIBS)
RUBY_SO = @RUBYSO@
RUBY = @RUBY@
-RUBY_SCRIPT = $(RUNME).rb
+RUBY_SCRIPT = $(SRCDIR)$(RUNME).rb
# ----------------------------------------------------------------
# Build a C dynamically loadable module
# ----------------------------------------------------------------
-ruby: $(SRCS)
- $(SWIG) -ruby $(SWIGOPT) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(RUBY_INCLUDE)
+ruby: $(SRCDIR_SRCS)
+ $(SWIG) -ruby $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(RUBY_INCLUDE)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(RUBY_SO)
# -----------------------------------------------------------------
# Build a C++ dynamically loadable module
# -----------------------------------------------------------------
-ruby_cpp: $(SRCS)
- $(SWIG) -c++ -ruby $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(RUBY_INCLUDE)
+ruby_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -c++ -ruby $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(RUBY_INCLUDE)
$(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(RUBY_SO)
# -----------------------------------------------------------------
@@ -1038,14 +1064,14 @@ ruby_cpp: $(SRCS)
# library file
# -----------------------------------------------------------------
-ruby_static: $(SRCS)
- $(SWIG) -ruby -lembed.i $(SWIGOPT) $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(RUBY_CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCS) $(INCLUDES) \
+ruby_static: $(SRCDIR_SRCS)
+ $(SWIG) -ruby -lembed.i $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) $(CFLAGS) $(RUBY_CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
$(RUBY_INCLUDE) $(LIBS) -L$(RUBY_LIB) $(RUBY_LIBOPTS) -o $(TARGET)
-ruby_cpp_static: $(SRCS)
- $(SWIG) -c++ -ruby -lembed.i $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) \
+ruby_cpp_static: $(SRCDIR_SRCS)
+ $(SWIG) -c++ -ruby -lembed.i $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) $(CXXFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
$(RUBY_INCLUDE) $(LIBS) -L$(RUBY_LIB) $(RUBY_LIBOPTS) -o $(TARGET)
# -----------------------------------------------------------------
@@ -1078,24 +1104,24 @@ ruby_clean:
PHP = @PHP@
PHP_INCLUDE = @PHPINC@
PHP_SO = @PHP_SO@
-PHP_SCRIPT = $(RUNME).php
+PHP_SCRIPT = $(SRCDIR)$(RUNME).php
# -------------------------------------------------------------------
# Build a PHP dynamically loadable module (C)
# -------------------------------------------------------------------
-php: $(SRCS)
- $(SWIG) -php $(SWIGOPT) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(PHP_INCLUDE)
+php: $(SRCDIR_SRCS)
+ $(SWIG) -php $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(PHP_INCLUDE)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO)
# --------------------------------------------------------------------
# Build a PHP dynamically loadable module (C++)
# --------------------------------------------------------------------
-php_cpp: $(SRCS)
- $(SWIG) -php -cppext cxx -c++ $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PHP_INCLUDE)
+php_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -php -cppext cxx -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PHP_INCLUDE)
$(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO)
# -----------------------------------------------------------------
@@ -1138,18 +1164,18 @@ PIKE_SCRIPT = $(RUNME).pike
# Build a C dynamically loadable module
# ----------------------------------------------------------------
-pike: $(SRCS)
- $(SWIG) -pike $(SWIGOPT) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(PIKE_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(PIKE_INCLUDE)
+pike: $(SRCDIR_SRCS)
+ $(SWIG) -pike $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(PIKE_CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(PIKE_INCLUDE)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(PIKE_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
# Build a C++ dynamically loadable module
# -----------------------------------------------------------------
-pike_cpp: $(SRCS)
- $(SWIG) -c++ -pike $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(PIKE_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(PIKE_INCLUDE)
+pike_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -c++ -pike $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(PIKE_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(PIKE_INCLUDE)
$(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(PIKE_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
@@ -1159,14 +1185,14 @@ pike_cpp: $(SRCS)
# library file
# -----------------------------------------------------------------
-pike_static: $(SRCS)
- $(SWIG) -pike -lembed.i $(SWIGOPT) $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(PIKE_CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCS) $(INCLUDES) \
+pike_static: $(SRCDIR_SRCS)
+ $(SWIG) -pike -lembed.i $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) $(CFLAGS) $(PIKE_CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
$(PIKE_INCLUDE) $(LIBS) -L$(PIKE_LIB) $(PIKE_LIBOPTS) -o $(TARGET)
-pike_cpp_static: $(SRCS)
- $(SWIG) -c++ -pike -lembed.i $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(PIKE_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) \
+pike_cpp_static: $(SRCDIR_SRCS)
+ $(SWIG) -c++ -pike -lembed.i $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) $(CXXFLAGS) $(PIKE_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
$(PIKE_INCLUDE) $(LIBS) -L$(PIKE_LIB) $(PIKE_LIBOPTS) -o $(TARGET)
# -----------------------------------------------------------------
@@ -1222,23 +1248,23 @@ CHICKEN_COMPILED_MAIN_OBJECT = $(CHICKEN_COMPILED_MAIN:.c=.@OBJEXT@)
# -----------------------------------------------------------------
# This is the old way to build chicken, but it does not work correctly with exceptions
-chicken_direct: $(SRCS)
+chicken_direct: $(SRCDIR_SRCS)
$(SWIG) -chicken $(SWIGOPT) $(INCLUDE) $(INTERFACEPATH)
$(CHICKEN) $(CHICKEN_GENERATED_SCHEME) $(CHICKENOPTS) \
-dynamic -feature chicken-compile-shared \
-output-file $(CHICKEN_COMPILED_SCHEME)
$(CC) -c $(CCSHARED) $(CFLAGS) $(CHICKEN_CFLAGS) \
- $(INCLUDES) $(CHICKEN_INCLUDE) $(ISRCS) $(SRCS) $(CHICKEN_COMPILED_SCHEME)
+ $(INCLUDES) $(CHICKEN_INCLUDE) $(ISRCS) $(SRCDIR_SRCS) $(CHICKEN_COMPILED_SCHEME)
$(LDSHARED) $(CFLAGS) $(CHICKEN_COMPILED_OBJECT) $(OBJS) $(IOBJS) \
$(LIBS) $(CHICKEN_SHAREDLIBOPTS) -o $(LIBPREFIX)$(TARGET)$(SO)
-chicken_direct_cpp: $(CXXSRCS) $(CHICKSRCS)
+chicken_direct_cpp: $(SRCDIR_CXXSRCS) $(CHICKSRCS)
$(SWIG) -c++ -chicken $(SWIGOPT) $(INCLUDE) $(INTERFACEPATH)
$(CHICKEN) $(CHICKEN_GENERATED_SCHEME) $(CHICKENOPTS) \
-dynamic -feature chicken-compile-shared \
-output-file $(CHICKEN_COMPILED_SCHEME)
$(CXX) -c $(CCSHARED) $(CXXFLAGS) $(CHICKEN_CFLAGS) \
- $(INCLUDES) $(CHICKEN_INCLUDE) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(CHICKEN_COMPILED_SCHEME)
+ $(INCLUDES) $(CHICKEN_INCLUDE) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(CHICKEN_COMPILED_SCHEME)
$(CXXSHARED) $(CXXFLAGS) $(CHICKEN_COMPILED_OBJECT) $(OBJS) $(IOBJS) \
$(LIBS) $(CPP_DLLIBS) $(CHICKEN_SHAREDLIBOPTS) -o $(LIBPREFIX)$(TARGET)$(SO)
@@ -1247,26 +1273,26 @@ chicken_direct_cpp: $(CXXSRCS) $(CHICKSRCS)
# -----------------------------------------------------------------
# The following two targets are also used by the test suite
-chicken_static: $(SRCS) $(CHICKSRCS)
+chicken_static: $(SRCDIR_SRCS) $(CHICKSRCS)
$(SWIG) -chicken $(SWIGOPT) $(INCLUDE) $(INTERFACEPATH)
$(CHICKEN) $(CHICKEN_GENERATED_SCHEME) $(CHICKENOPTS) \
-output-file $(CHICKEN_COMPILED_SCHEME)
$(CHICKEN) $(CHICKEN_MAIN) $(CHICKENOPTS) \
-output-file $(CHICKEN_MAIN:.scm=_chicken.c)
$(CC) -c $(CCSHARED) $(CFLAGS) $(CHICKEN_CFLAGS) \
- $(INCLUDES) $(CHICKEN_INCLUDE) $(ISRCS) $(SRCS) \
+ $(INCLUDES) $(CHICKEN_INCLUDE) $(ISRCS) $(SRCDIR_SRCS) \
$(CHICKEN_COMPILED_SCHEME) $(CHICKEN_COMPILED_MAIN)
$(CC) $(CHICKEN_COMPILED_OBJECT) $(CHICKEN_COMPILED_MAIN_OBJECT) \
$(OBJS) $(IOBJS) $(LIBS) $(CHICKEN_SHAREDLIBOPTS) -o $(TARGET)
-chicken_static_cpp: $(CXXSRCS) $(CHICKSRCS)
+chicken_static_cpp: $(SRCDIR_CXXSRCS) $(CHICKSRCS)
$(SWIG) -c++ -chicken $(SWIGOPT) $(INCLUDE) $(INTERFACEPATH)
$(CHICKEN) $(CHICKEN_GENERATED_SCHEME) $(CHICKENOPTS) \
-output-file $(CHICKEN_COMPILED_SCHEME)
$(CHICKEN) $(CHICKEN_MAIN) $(CHICKENOPTS) \
-output-file $(CHICKEN_MAIN:.scm=_chicken.c)
$(CXX) -c $(CCSHARED) $(CXXFLAGS) $(CHICKEN_CFLAGS) \
- $(INCLUDES) $(CHICKEN_INCLUDE) $(ICXXSRCS) $(SRCS) $(CXXSRCS) \
+ $(INCLUDES) $(CHICKEN_INCLUDE) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) \
$(CHICKEN_COMPILED_SCHEME) $(CHICKEN_COMPILED_MAIN)
$(CXX) $(CHICKEN_COMPILED_OBJECT) $(CHICKEN_COMPILED_MAIN_OBJECT) \
$(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) $(CHICKEN_SHAREDLIBOPTS) -o $(TARGET)
@@ -1277,11 +1303,11 @@ chicken_static_cpp: $(CXXSRCS) $(CHICKSRCS)
chicken:
$(SWIG) -chicken $(SWIGOPT) $(INCLUDE) $(INTERFACEPATH)
- $(COMPILETOOL) $(CHICKEN_CSC) -s `echo $(INCLUDES) | sed 's/-I/-C -I/g'` $(CHICKEN_GENERATED_SCHEME) $(SRCS) $(ISRCS) -o $(TARGET)$(SO)
+ $(COMPILETOOL) $(CHICKEN_CSC) -s `echo $(INCLUDES) | sed 's/-I/-C -I/g'` $(CHICKEN_GENERATED_SCHEME) $(SRCDIR_SRCS) $(ISRCS) -o $(TARGET)$(SO)
chicken_cpp:
$(SWIG) -c++ -chicken $(SWIGOPT) $(INCLUDE) $(INTERFACEPATH)
- $(COMPILETOOL) $(CHICKEN_CSC) -s `echo $(INCLUDES) | sed 's/-I/-C -I/g'` $(CHICKEN_GENERATED_SCHEME) $(SRCS) $(ICXXSRCS) $(CXXSRCS) -o $(TARGET)$(SO)
+ $(COMPILETOOL) $(CHICKEN_CSC) -s `echo $(INCLUDES) | sed 's/-I/-C -I/g'` $(CHICKEN_GENERATED_SCHEME) $(SRCDIR_SRCS) $(ICXXSRCS) $(SRCDIR_CXXSRCS) -o $(TARGET)$(SO)
chicken_externalhdr:
$(SWIG) -chicken -external-runtime $(TARGET)
@@ -1291,7 +1317,7 @@ chicken_externalhdr:
# -----------------------------------------------------------------
chicken_run:
- env LD_LIBRARY_PATH=. $(RUNTOOL) $(CHICKEN_CSI) $(CHICKEN_SCRIPT) $(RUNPIPE)
+ env LD_LIBRARY_PATH=$$PWD $(RUNTOOL) $(CHICKEN_CSI) $(CHICKEN_SCRIPT) $(RUNPIPE)
# -----------------------------------------------------------------
# Version display
@@ -1327,33 +1353,39 @@ CSHARP_RUNME = $(CSHARPCILINTERPRETER) $(CSHARPCILINTERPRETER_FLAGS) ./$(RUNME).
# Build a CSharp dynamically loadable module (C)
# ----------------------------------------------------------------
-csharp: $(SRCS)
- $(SWIG) -csharp $(SWIGOPT) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(CSHARPCFLAGS) $(SRCS) $(ISRCS) $(INCLUDES)
+csharp: $(SRCDIR_SRCS)
+ $(SWIG) -csharp $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(CSHARPCFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(CSHARP_DLNK) $(LIBS) -o $(CSHARP_LIBPREFIX)$(TARGET)$(CSHARPSO)
# ----------------------------------------------------------------
# Build a CSharp dynamically loadable module (C++)
# ----------------------------------------------------------------
-csharp_cpp: $(SRCS)
- $(SWIG) -csharp -c++ $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(CSHARPCFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES)
+csharp_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -csharp -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(CSHARPCFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES)
$(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(CSHARP_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(CSHARP_LIBPREFIX)$(TARGET)$(CSHARPSO)
# ----------------------------------------------------------------
# Compile CSharp files
# ----------------------------------------------------------------
-csharp_compile: $(SRCS)
- $(COMPILETOOL) $(CSHARPCOMPILER) $(CSHARPFLAGS) $(CSHARPSRCS)
+ifneq (,$(SRCDIR))
+SRCDIR_CSHARPSRCS = $(wildcard $(addprefix $(SRCDIR),$(CSHARPSRCS)))
+else
+SRCDIR_CSHARPSRCS =
+endif
+
+csharp_compile: $(SRCDIR_SRCS)
+ $(COMPILETOOL) $(CSHARPCOMPILER) $(CSHARPFLAGS) $(CSHARPSRCS) $(SRCDIR_CSHARPSRCS)
# -----------------------------------------------------------------
# Run CSharp example
# -----------------------------------------------------------------
csharp_run:
- env LD_LIBRARY_PATH=. $(RUNTOOL) $(CSHARP_RUNME) $(RUNPIPE)
+ env LD_LIBRARY_PATH=$$PWD $(RUNTOOL) $(CSHARP_RUNME) $(RUNPIPE)
# -----------------------------------------------------------------
# Version display
@@ -1385,7 +1417,7 @@ LUA_DLNK = @LUADYNAMICLINKING@
LUA_SO = @LUA_SO@
LUA = @LUABIN@
-LUA_SCRIPT = $(RUNME).lua
+LUA_SCRIPT = $(SRCDIR)$(RUNME).lua
# Extra code for lua static link
LUA_INTERP = ../lua.c
@@ -1394,32 +1426,32 @@ LUA_INTERP = ../lua.c
# Build a C dynamically loadable module
# ----------------------------------------------------------------
-lua: $(SRCS)
- $(SWIG) -lua $(SWIGOPT) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(LUA_INCLUDE)
+lua: $(SRCDIR_SRCS)
+ $(SWIG) -lua $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(LUA_INCLUDE)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(LUA_LIB) -o $(LIBPREFIX)$(TARGET)$(LUA_SO)
# -----------------------------------------------------------------
# Build a C++ dynamically loadable module
# -----------------------------------------------------------------
-lua_cpp: $(SRCS)
- $(SWIG) -c++ -lua $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(LUA_INCLUDE)
+lua_cpp: $(SRCDIR_SRCS) $(GENCXXSRCS)
+ $(SWIG) -c++ -lua $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(GENCXXSRCS) $(INCLUDES) $(LUA_INCLUDE)
$(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(LUA_LIB) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(LUA_SO)
# -----------------------------------------------------------------
# Build statically linked Lua interpreter
# -----------------------------------------------------------------
-lua_static: $(SRCS)
- $(SWIG) -lua -module example $(SWIGOPT) $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(ISRCS) $(SRCS) $(LUA_INTERP) $(INCLUDES) \
+lua_static: $(SRCDIR_SRCS)
+ $(SWIG) -lua -module example $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(SRCDIR)$(LUA_INTERP) $(INCLUDES) \
$(LUA_INCLUDE) $(LIBS) $(LUA_LIB) -o $(TARGET)
-lua_static_cpp: $(SRCS)
- $(SWIG) -c++ -lua -module example $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(LUA_INTERP) $(INCLUDES) \
+lua_static_cpp: $(SRCDIR_SRCS) $(GENCXXSRCS)
+ $(SWIG) -c++ -lua -module example $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(GENCXXSRCS) $(SRCDIR)$(LUA_INTERP) $(INCLUDES) \
$(LUA_INCLUDE) $(LIBS) $(LUA_LIB) -o $(TARGET)
# -----------------------------------------------------------------
@@ -1430,7 +1462,7 @@ lua_run:
$(RUNTOOL) $(LUA) $(LUA_SCRIPT) $(RUNPIPE)
lua_embed_run:
- $(RUNTOOL) ./$(TARGET) $(RUNPIPE)
+ $(RUNTOOL) ./$(TARGET) $(LUA_SCRIPT) $(RUNPIPE)
# -----------------------------------------------------------------
# Version display
@@ -1455,14 +1487,14 @@ lua_clean:
ALLEGROCL = @ALLEGROCLBIN@
ALLEGROCL_SCRIPT=$(RUNME).lisp
-allegrocl: $(SRCS)
- $(SWIG) -allegrocl -cwrap $(SWIGOPT) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCS)
+allegrocl: $(SRCDIR_SRCS)
+ $(SWIG) -allegrocl -cwrap $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCDIR_SRCS)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
-allegrocl_cpp: $(SRCS)
- $(SWIG) -c++ -allegrocl $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES)
+allegrocl_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -c++ -allegrocl $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES)
$(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
@@ -1495,11 +1527,11 @@ allegrocl_clean:
CLISP = @CLISPBIN@
CLISP_SCRIPT=$(RUNME).lisp
-clisp: $(SRCS)
- $(SWIG) -clisp $(SWIGOPT) $(INTERFACEPATH)
+clisp: $(SRCDIR_SRCS)
+ $(SWIG) -clisp $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
-clisp_cpp: $(SRCS)
- $(SWIG) -c++ -clisp $(SWIGOPT) $(INTERFACEPATH)
+clisp_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -c++ -clisp $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
# -----------------------------------------------------------------
# Run CLISP example
@@ -1531,14 +1563,14 @@ clisp_clean:
CFFI = @CFFIBIN@
CFFI_SCRIPT=$(RUNME).lisp
-cffi: $(SRCS)
- $(SWIG) -cffi $(SWIGOPT) $(INTERFACEPATH)
-# $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCS)
+cffi: $(SRCDIR_SRCS)
+ $(SWIG) -cffi $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+# $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCDIR_SRCS)
# $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
-cffi_cpp: $(SRCS)
- $(SWIG) -c++ -cffi $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES)
+cffi_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -c++ -cffi $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES)
$(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
@@ -1571,14 +1603,14 @@ cffi_clean:
UFFI = @UFFIBIN@
UFFI_SCRIPT=$(RUNME).lisp
-uffi: $(SRCS)
- $(SWIG) -uffi $(SWIGOPT) $(INTERFACEPATH)
-# $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCS)
+uffi: $(SRCDIR_SRCS)
+ $(SWIG) -uffi $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+# $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCDIR_SRCS)
# $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
-uffi_cpp: $(SRCS)
- $(SWIG) -c++ -uffi $(SWIGOPT) $(INTERFACEPATH)
-# $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES)
+uffi_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -c++ -uffi $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+# $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES)
# $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
@@ -1622,10 +1654,10 @@ R_SCRIPT=$(RUNME).R
# Build a R dynamically loadable module (C)
# ----------------------------------------------------------------
-r: $(SRCS)
- $(SWIG) -r $(SWIGOPT) $(INTERFACEPATH)
-ifneq ($(SRCS),)
- $(CC) -g -c $(CFLAGS) $(R_CFLAGS) $(SRCS) $(INCLUDES)
+r: $(SRCDIR_SRCS)
+ $(SWIG) -r $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ifneq ($(SRCDIR_SRCS),)
+ $(CC) -g -c $(CFLAGS) $(R_CFLAGS) $(SRCDIR_SRCS) $(INCLUDES)
endif
+( PKG_CPPFLAGS="$(INCLUDES)" $(COMPILETOOL) $(R) CMD SHLIB -o $(LIBPREFIX)$(TARGET)$(SO) $(ISRCS) $(OBJS) > /dev/null )
@@ -1633,10 +1665,10 @@ endif
# Build a R dynamically loadable module (C++)
# ----------------------------------------------------------------
-r_cpp: $(CXXSRCS)
+r_cpp: $(SRCDIR_CXXSRCS)
$(SWIG) -c++ -r $(SWIGOPT) -o $(RCXXSRCS) $(INTERFACEPATH)
-ifneq ($(CXXSRCS),)
- $(CXX) -g -c $(CXXFLAGS) $(R_CFLAGS) $(CXXSRCS) $(INCLUDES)
+ifneq ($(SRCDIR_CXXSRCS),)
+ $(CXX) -g -c $(CXXFLAGS) $(R_CFLAGS) $(SRCDIR_CXXSRCS) $(INCLUDES)
endif
+( PKG_CPPFLAGS="$(INCLUDES)" $(COMPILETOOL) $(R) CMD SHLIB -o $(LIBPREFIX)$(TARGET)$(SO) $(RCXXSRCS) $(OBJS) > /dev/null )
@@ -1697,12 +1729,12 @@ GOGCCOBJS = $(GOSRCS:.go=.@OBJEXT@)
# Build a Go module (C)
# ----------------------------------------------------------------
-go: $(SRCS)
- $(SWIG) -go $(GOOPT) $(GOSWIGARG) $(SWIGOPT) $(INTERFACEPATH)
+go: $(SRCDIR_SRCS)
+ $(SWIG) -go $(GOOPT) $(GOSWIGARG) $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
if $(GO12) || $(GO13) || $(GOGCC); then \
- $(CC) -g -c $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES); \
+ $(CC) -g -c $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES); \
else \
- $(CC) -g -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES); \
+ $(CC) -g -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES); \
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO); \
fi
$(COMPILETOOL) $(GO) $(GOCOMPILEARG) -I . $(GOSRCS)
@@ -1718,12 +1750,12 @@ go: $(SRCS)
$(COMPILETOOL) $(GOPACK) grc $(GOPACKAGE) $(GOGCOBJS) $(GOCSRCS:.c=.$(GOOBJEXT)); \
fi; \
fi
- if test -f $(RUNME).go; then \
- $(GO) $(GOCOMPILEARG) $(RUNME).go; \
+ if test -f $(SRCDIR)$(RUNME).go; then \
+ $(GO) $(GOCOMPILEARG) $(SRCDIR)$(RUNME).go; \
if $(GOGCC) ; then \
$(COMPILETOOL) $(GO) -o $(RUNME) $(RUNME).@OBJEXT@ $(GOGCCOBJS) $(OBJS) $(IOBJS); \
elif $(GO12) || $(GO13); then \
- $(COMPILETOOL) $(GOTOOL) $(GOLD) -linkmode external -extld $(CC) -extldflags "$(CFLAGS)" -o $(RUNME) $(RUNME).$(GOOBJEXT); \
+ $(COMPILETOOL) $(GOTOOL) $(GOLD) -linkmode external -extld "$(CC)" -extldflags "$(CFLAGS)" -o $(RUNME) $(RUNME).$(GOOBJEXT); \
else \
$(COMPILETOOL) $(GOTOOL) $(GOLD) -r $${GOROOT:-`go env GOROOT`}/pkg/$${GOOS:-`go env GOOS`}_$${GOARCH:-`go env GOARCH`}:. -o $(RUNME) $(RUNME).$(GOOBJEXT); \
fi; \
@@ -1733,12 +1765,12 @@ go: $(SRCS)
# Build a Go module (C++)
# ----------------------------------------------------------------
-go_cpp: $(SRCS)
- $(SWIG) -go -c++ $(GOOPT) $(GOSWIGARG) $(SWIGOPT) $(INTERFACEPATH)
+go_cpp: $(SRCDIR_SRCS)
+ $(SWIG) -go -c++ $(GOOPT) $(GOSWIGARG) $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
if $(GO12) || $(GO13) || $(GOGCC); then \
- $(CXX) -g -c $(CXXFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES); \
+ $(CXX) -g -c $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES); \
else \
- $(CXX) -g -c $(CCSHARED) $(CXXFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES); \
+ $(CXX) -g -c $(CCSHARED) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES); \
$(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO); \
fi
$(COMPILETOOL) $(GO) $(GOCOMPILEARG) -I . $(GOSRCS)
@@ -1754,12 +1786,12 @@ go_cpp: $(SRCS)
$(COMPILETOOL) $(GOPACK) grc $(GOPACKAGE) $(GOGCOBJS) $(GOCSRCS:.c=.$(GOOBJEXT)); \
fi; \
fi
- if test -f $(RUNME).go; then \
- $(GO) $(GOCOMPILEARG) $(RUNME).go; \
+ if test -f $(SRCDIR)$(RUNME).go; then \
+ $(GO) $(GOCOMPILEARG) $(SRCDIR)$(RUNME).go; \
if $(GOGCC) ; then \
$(COMPILETOOL) $(GO) -o $(RUNME) $(RUNME).@OBJEXT@ $(GOGCCOBJS) $(OBJS) $(IOBJS) -lstdc++; \
elif $(GO12) || $(GO13); then \
- $(COMPILETOOL) $(GOTOOL) $(GOLD) -linkmode external -extld $(CXX) -extldflags "$(CXXFLAGS)" -o $(RUNME) $(RUNME).$(GOOBJEXT); \
+ $(COMPILETOOL) $(GOTOOL) $(GOLD) -linkmode external -extld "$(CXX)" -extldflags "$(CXXFLAGS)" -o $(RUNME) $(RUNME).$(GOOBJEXT); \
else \
$(COMPILETOOL) $(GOTOOL) $(GOLD) -r $${GOROOT:-`go env GOROOT`}/pkg/$${GOOS:-`go env GOOS`}_$${GOARCH:-`go env GOARCH`}:. -o $(RUNME) $(RUNME).$(GOOBJEXT); \
fi; \
@@ -1770,7 +1802,7 @@ go_cpp: $(SRCS)
# -----------------------------------------------------------------
go_run:
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) ./$(RUNME) $(RUNPIPE)
+ env LD_LIBRARY_PATH=$$PWD $(RUNTOOL) ./$(RUNME) $(RUNPIPE)
# -----------------------------------------------------------------
# Version display
@@ -1812,18 +1844,18 @@ D_RUNME = ./$(RUNME)
# Build a dynamically loadable D wrapper for a C module
# ----------------------------------------------------------------
-d: $(SRCS)
- $(SWIGD) $(SWIGOPT) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(DCFLAGS) $(EXTRA_CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES)
+d: $(SRCDIR_SRCS)
+ $(SWIGD) $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
+ $(CC) -c $(CCSHARED) $(CFLAGS) $(DCFLAGS) $(EXTRA_CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES)
$(LDSHARED) $(CFLAGS) $(DCFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(DLIBPREFIX)$(TARGET)$(SO)
# ----------------------------------------------------------------
# Build a dynamically loadable D wrapper for a C++ module
# ----------------------------------------------------------------
-d_cpp: $(SRCS)
- $(SWIGD) -c++ $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(DCFLAGS) $(EXTRA_CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES)
+d_cpp: $(SRCDIR_SRCS)
+ $(SWIGD) -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
+ $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(DCFLAGS) $(EXTRA_CFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES)
$(CXXSHARED) $(CXXFLAGS) $(DCFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(DLIBPREFIX)$(TARGET)$(SO)
# ----------------------------------------------------------------
@@ -1832,7 +1864,7 @@ d_cpp: $(SRCS)
# Clear the DFLAGS environment variable for the compiler call itself
# to work around a discrepancy in argument handling between DMD and LDC.
-d_compile: $(SRCS)
+d_compile: $(SRCDIR_SRCS)
DFLAGS="" $(COMPILETOOL) $(DCOMPILER) $(DFLAGS) $(DSRCS)
# -----------------------------------------------------------------
diff --git a/Examples/android/class/Makefile b/Examples/android/class/Makefile
index cef405ece..44d33de0a 100644
--- a/Examples/android/class/Makefile
+++ b/Examples/android/class/Makefile
@@ -13,14 +13,14 @@ TARGETID = 1
check: build
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' INTERFACEDIR='$(INTERFACEDIR)' \
PROJECTNAME='$(PROJECTNAME)' TARGETID='$(TARGETID)' android_cpp
install:
- $(MAKE) -f $(TOP)/Makefile INSTALLOPTIONS='$(INSTALLOPTIONS)' PROJECTNAME='$(PROJECTNAME)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INSTALLOPTIONS='$(INSTALLOPTIONS)' PROJECTNAME='$(PROJECTNAME)' \
PACKAGEDIR='$(PACKAGEDIR)' PACKAGENAME='$(PACKAGENAME)' android_install
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' PROJECTNAME='$(PROJECTNAME)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' PROJECTNAME='$(PROJECTNAME)' \
PACKAGEDIR='$(PACKAGEDIR)' INTERFACEDIR='$(INTERFACEDIR)' android_clean
diff --git a/Examples/android/extend/Makefile b/Examples/android/extend/Makefile
index 9b796494a..3d0609a08 100644
--- a/Examples/android/extend/Makefile
+++ b/Examples/android/extend/Makefile
@@ -13,14 +13,14 @@ TARGETID = 1
check: build
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' INTERFACEDIR='$(INTERFACEDIR)' \
PROJECTNAME='$(PROJECTNAME)' TARGETID='$(TARGETID)' android_cpp
install:
- $(MAKE) -f $(TOP)/Makefile INSTALLOPTIONS='$(INSTALLOPTIONS)' PROJECTNAME='$(PROJECTNAME)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INSTALLOPTIONS='$(INSTALLOPTIONS)' PROJECTNAME='$(PROJECTNAME)' \
PACKAGEDIR='$(PACKAGEDIR)' PACKAGENAME='$(PACKAGENAME)' android_install
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' PROJECTNAME='$(PROJECTNAME)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' PROJECTNAME='$(PROJECTNAME)' \
PACKAGEDIR='$(PACKAGEDIR)' INTERFACEDIR='$(INTERFACEDIR)' android_clean
diff --git a/Examples/android/simple/Makefile b/Examples/android/simple/Makefile
index 7e7ff40e1..d71b9880c 100644
--- a/Examples/android/simple/Makefile
+++ b/Examples/android/simple/Makefile
@@ -13,14 +13,14 @@ TARGETID = 1
check: build
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' INTERFACEDIR='$(INTERFACEDIR)' \
PROJECTNAME='$(PROJECTNAME)' TARGETID='$(TARGETID)' android
install:
- $(MAKE) -f $(TOP)/Makefile INSTALLOPTIONS='$(INSTALLOPTIONS)' PROJECTNAME='$(PROJECTNAME)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INSTALLOPTIONS='$(INSTALLOPTIONS)' PROJECTNAME='$(PROJECTNAME)' \
PACKAGEDIR='$(PACKAGEDIR)' PACKAGENAME='$(PACKAGENAME)' android_install
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' PROJECTNAME='$(PROJECTNAME)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' PROJECTNAME='$(PROJECTNAME)' \
PACKAGEDIR='$(PACKAGEDIR)' INTERFACEDIR='$(INTERFACEDIR)' android_clean
diff --git a/Examples/chicken/class/Makefile b/Examples/chicken/class/Makefile
index cd445c867..5fafa5c15 100644
--- a/Examples/chicken/class/Makefile
+++ b/Examples/chicken/class/Makefile
@@ -15,24 +15,24 @@ VARIANT =
#VARIANT = _static
check: build
- $(MAKE) -f $(TOP)/Makefile CHICKEN_SCRIPT='runme-lowlevel.scm' chicken_run
- $(MAKE) -f $(TOP)/Makefile CHICKEN_SCRIPT='runme-tinyclos.scm' chicken_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CHICKEN_SCRIPT='runme-lowlevel.scm' chicken_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CHICKEN_SCRIPT='runme-tinyclos.scm' chicken_run
build: $(TARGET) $(TARGET)_proxy
$(TARGET): $(INTERFACE) $(SRCS)
- $(MAKE) -f $(TOP)/Makefile \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' \
SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' CHICKEN_MAIN='$(CHICKEN_MAIN)' \
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' \
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' CHICKENOPTS='$(CHICKENOPTS)' chicken$(VARIANT)_cpp
$(TARGET)_proxy: $(INTERFACE) $(SRCS)
- $(MAKE) -f $(TOP)/Makefile \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' \
SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' CHICKEN_MAIN='$(CHICKEN_MAIN)' \
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT) -proxy' TARGET='$(TARGET)_proxy' \
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' CHICKENOPTS='$(CHICKENOPTS)' chicken$(VARIANT)_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile chicken_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' chicken_clean
rm -f example.scm
rm -f $(TARGET)
diff --git a/Examples/chicken/constants/Makefile b/Examples/chicken/constants/Makefile
index fe396733e..a6100f757 100644
--- a/Examples/chicken/constants/Makefile
+++ b/Examples/chicken/constants/Makefile
@@ -14,17 +14,17 @@ VARIANT =
#VARIANT = _static
check: build
- $(MAKE) -f $(TOP)/Makefile chicken_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' chicken_run
build: $(TARGET)
$(TARGET): $(INTERFACE) $(SRCS)
- $(MAKE) -f $(TOP)/Makefile \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' \
SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' CHICKEN_MAIN='$(CHICKEN_MAIN)' \
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' \
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' CHICKENOPTS='$(CHICKENOPTS)' chicken$(VARIANT)
clean:
- $(MAKE) -f $(TOP)/Makefile chicken_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' chicken_clean
rm -f example.scm
rm -f $(TARGET)
diff --git a/Examples/chicken/multimap/Makefile b/Examples/chicken/multimap/Makefile
index d92cfede0..79282be17 100644
--- a/Examples/chicken/multimap/Makefile
+++ b/Examples/chicken/multimap/Makefile
@@ -14,17 +14,17 @@ VARIANT =
#VARIANT = _static
check: build
- $(MAKE) -f $(TOP)/Makefile chicken_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' chicken_run
build: $(TARGET)
$(TARGET): $(INTERFACE) $(SRCS)
- $(MAKE) -f $(TOP)/Makefile \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' \
SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' CHICKEN_MAIN='$(CHICKEN_MAIN)' \
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' \
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' CHICKENOPTS='$(CHICKENOPTS)' chicken$(VARIANT)
clean:
- $(MAKE) -f $(TOP)/Makefile chicken_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' chicken_clean
rm -f example.scm
rm -f $(TARGET)
diff --git a/Examples/chicken/overload/Makefile b/Examples/chicken/overload/Makefile
index fb190e882..717abd335 100644
--- a/Examples/chicken/overload/Makefile
+++ b/Examples/chicken/overload/Makefile
@@ -14,17 +14,17 @@ VARIANT =
#VARIANT = _static
check: build
- $(MAKE) -f $(TOP)/Makefile chicken_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' chicken_run
build: $(TARGET)
$(TARGET): $(INTERFACE) $(SRCS)
- $(MAKE) -f $(TOP)/Makefile \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' \
SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' CHICKEN_MAIN='$(CHICKEN_MAIN)' \
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' \
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' CHICKENOPTS='$(CHICKENOPTS)' chicken$(VARIANT)_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile chicken_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' chicken_clean
rm -f example.scm
rm -f $(TARGET)
diff --git a/Examples/chicken/simple/Makefile b/Examples/chicken/simple/Makefile
index d0d737484..9d1f34fa0 100644
--- a/Examples/chicken/simple/Makefile
+++ b/Examples/chicken/simple/Makefile
@@ -14,17 +14,17 @@ VARIANT =
#VARIANT = _static
check: build
- $(MAKE) -f $(TOP)/Makefile chicken_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' chicken_run
build: $(TARGET)
$(TARGET): $(INTERFACE) $(SRCS)
- $(MAKE) -f $(TOP)/Makefile \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' \
SRCS='$(SRCS)' CXXSRCS='$(CXXSRCS)' CHICKEN_MAIN='$(CHICKEN_MAIN)' \
INCLUDE='$(INCLUDE)' SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' \
SWIG='$(SWIG)' INTERFACE='$(INTERFACE)' CHICKENOPTS='$(CHICKENOPTS)' chicken$(VARIANT)
clean:
- $(MAKE) -f $(TOP)/Makefile chicken_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' chicken_clean
rm -f example.scm example-generic.scm example-clos.scm
rm -f $(TARGET)
diff --git a/Examples/csharp/arrays/Makefile b/Examples/csharp/arrays/Makefile
index 4be092d1c..e5d733d35 100644
--- a/Examples/csharp/arrays/Makefile
+++ b/Examples/csharp/arrays/Makefile
@@ -8,12 +8,12 @@ CSHARPSRCS = *.cs
CSHARPFLAGS= -nologo -debug+ -unsafe -out:runme.exe
check: build
- $(MAKE) -f $(TOP)/Makefile csharp_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' csharp
- $(MAKE) -f $(TOP)/Makefile CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
clean:
- $(MAKE) -f $(TOP)/Makefile csharp_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_clean
diff --git a/Examples/csharp/callback/Makefile b/Examples/csharp/callback/Makefile
index 6c58abd28..4f4c84b9a 100644
--- a/Examples/csharp/callback/Makefile
+++ b/Examples/csharp/callback/Makefile
@@ -8,12 +8,12 @@ CSHARPSRCS = *.cs
CSHARPFLAGS= -nologo -debug+ -out:runme.exe
check: build
- $(MAKE) -f $(TOP)/Makefile csharp_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' csharp_cpp
- $(MAKE) -f $(TOP)/Makefile CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
clean:
- $(MAKE) -f $(TOP)/Makefile csharp_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_clean
diff --git a/Examples/csharp/class/Makefile b/Examples/csharp/class/Makefile
index 6c58abd28..4f4c84b9a 100644
--- a/Examples/csharp/class/Makefile
+++ b/Examples/csharp/class/Makefile
@@ -8,12 +8,12 @@ CSHARPSRCS = *.cs
CSHARPFLAGS= -nologo -debug+ -out:runme.exe
check: build
- $(MAKE) -f $(TOP)/Makefile csharp_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' csharp_cpp
- $(MAKE) -f $(TOP)/Makefile CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
clean:
- $(MAKE) -f $(TOP)/Makefile csharp_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_clean
diff --git a/Examples/csharp/enum/Makefile b/Examples/csharp/enum/Makefile
index 6c58abd28..4f4c84b9a 100644
--- a/Examples/csharp/enum/Makefile
+++ b/Examples/csharp/enum/Makefile
@@ -8,12 +8,12 @@ CSHARPSRCS = *.cs
CSHARPFLAGS= -nologo -debug+ -out:runme.exe
check: build
- $(MAKE) -f $(TOP)/Makefile csharp_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' csharp_cpp
- $(MAKE) -f $(TOP)/Makefile CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
clean:
- $(MAKE) -f $(TOP)/Makefile csharp_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_clean
diff --git a/Examples/csharp/extend/Makefile b/Examples/csharp/extend/Makefile
index 6c58abd28..4f4c84b9a 100644
--- a/Examples/csharp/extend/Makefile
+++ b/Examples/csharp/extend/Makefile
@@ -8,12 +8,12 @@ CSHARPSRCS = *.cs
CSHARPFLAGS= -nologo -debug+ -out:runme.exe
check: build
- $(MAKE) -f $(TOP)/Makefile csharp_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' csharp_cpp
- $(MAKE) -f $(TOP)/Makefile CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
clean:
- $(MAKE) -f $(TOP)/Makefile csharp_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_clean
diff --git a/Examples/csharp/funcptr/Makefile b/Examples/csharp/funcptr/Makefile
index ed15cb28e..99cdfa38a 100644
--- a/Examples/csharp/funcptr/Makefile
+++ b/Examples/csharp/funcptr/Makefile
@@ -8,12 +8,12 @@ CSHARPSRCS = *.cs
CSHARPFLAGS= -nologo -debug+ -out:runme.exe
check: build
- $(MAKE) -f $(TOP)/Makefile csharp_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' csharp
- $(MAKE) -f $(TOP)/Makefile CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
clean:
- $(MAKE) -f $(TOP)/Makefile csharp_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_clean
diff --git a/Examples/csharp/nested/Makefile b/Examples/csharp/nested/Makefile
index 6c58abd28..4f4c84b9a 100644
--- a/Examples/csharp/nested/Makefile
+++ b/Examples/csharp/nested/Makefile
@@ -8,12 +8,12 @@ CSHARPSRCS = *.cs
CSHARPFLAGS= -nologo -debug+ -out:runme.exe
check: build
- $(MAKE) -f $(TOP)/Makefile csharp_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' csharp_cpp
- $(MAKE) -f $(TOP)/Makefile CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
clean:
- $(MAKE) -f $(TOP)/Makefile csharp_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_clean
diff --git a/Examples/csharp/reference/Makefile b/Examples/csharp/reference/Makefile
index 6c58abd28..4f4c84b9a 100644
--- a/Examples/csharp/reference/Makefile
+++ b/Examples/csharp/reference/Makefile
@@ -8,12 +8,12 @@ CSHARPSRCS = *.cs
CSHARPFLAGS= -nologo -debug+ -out:runme.exe
check: build
- $(MAKE) -f $(TOP)/Makefile csharp_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' csharp_cpp
- $(MAKE) -f $(TOP)/Makefile CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
clean:
- $(MAKE) -f $(TOP)/Makefile csharp_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_clean
diff --git a/Examples/csharp/simple/Makefile b/Examples/csharp/simple/Makefile
index ed15cb28e..99cdfa38a 100644
--- a/Examples/csharp/simple/Makefile
+++ b/Examples/csharp/simple/Makefile
@@ -8,12 +8,12 @@ CSHARPSRCS = *.cs
CSHARPFLAGS= -nologo -debug+ -out:runme.exe
check: build
- $(MAKE) -f $(TOP)/Makefile csharp_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' csharp
- $(MAKE) -f $(TOP)/Makefile CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
clean:
- $(MAKE) -f $(TOP)/Makefile csharp_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_clean
diff --git a/Examples/csharp/template/Makefile b/Examples/csharp/template/Makefile
index 23fe2eec9..2d0e07009 100644
--- a/Examples/csharp/template/Makefile
+++ b/Examples/csharp/template/Makefile
@@ -8,12 +8,12 @@ CSHARPSRCS = *.cs
CSHARPFLAGS= -nologo -debug+ -out:runme.exe
check: build
- $(MAKE) -f $(TOP)/Makefile csharp_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' csharp_cpp
- $(MAKE) -f $(TOP)/Makefile CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
clean:
- $(MAKE) -f $(TOP)/Makefile csharp_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_clean
diff --git a/Examples/csharp/variables/Makefile b/Examples/csharp/variables/Makefile
index ed15cb28e..99cdfa38a 100644
--- a/Examples/csharp/variables/Makefile
+++ b/Examples/csharp/variables/Makefile
@@ -8,12 +8,12 @@ CSHARPSRCS = *.cs
CSHARPFLAGS= -nologo -debug+ -out:runme.exe
check: build
- $(MAKE) -f $(TOP)/Makefile csharp_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' csharp
- $(MAKE) -f $(TOP)/Makefile CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CSHARPSRCS='$(CSHARPSRCS)' CSHARPFLAGS='$(CSHARPFLAGS)' csharp_compile
clean:
- $(MAKE) -f $(TOP)/Makefile csharp_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' csharp_clean
diff --git a/Examples/d/callback/Makefile b/Examples/d/callback/Makefile
index eda18f13c..72edc17a5 100644
--- a/Examples/d/callback/Makefile
+++ b/Examples/d/callback/Makefile
@@ -15,13 +15,13 @@ DFLAGS = -ofrunme
check: build
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_run
build:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d_cpp; \
- $(MAKE) -f $(TOP)/Makefile DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d_cpp; \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
clean:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_clean
diff --git a/Examples/d/class/Makefile b/Examples/d/class/Makefile
index eda18f13c..72edc17a5 100644
--- a/Examples/d/class/Makefile
+++ b/Examples/d/class/Makefile
@@ -15,13 +15,13 @@ DFLAGS = -ofrunme
check: build
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_run
build:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d_cpp; \
- $(MAKE) -f $(TOP)/Makefile DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d_cpp; \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
clean:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_clean
diff --git a/Examples/d/constants/Makefile b/Examples/d/constants/Makefile
index d537ce281..609c7f660 100644
--- a/Examples/d/constants/Makefile
+++ b/Examples/d/constants/Makefile
@@ -15,13 +15,13 @@ DFLAGS = -ofrunme
check: build
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_run
build:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d; \
- $(MAKE) -f $(TOP)/Makefile DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d; \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
clean:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_clean
diff --git a/Examples/d/enum/Makefile b/Examples/d/enum/Makefile
index eda18f13c..72edc17a5 100644
--- a/Examples/d/enum/Makefile
+++ b/Examples/d/enum/Makefile
@@ -15,13 +15,13 @@ DFLAGS = -ofrunme
check: build
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_run
build:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d_cpp; \
- $(MAKE) -f $(TOP)/Makefile DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d_cpp; \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
clean:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_clean
diff --git a/Examples/d/extend/Makefile b/Examples/d/extend/Makefile
index eda18f13c..72edc17a5 100644
--- a/Examples/d/extend/Makefile
+++ b/Examples/d/extend/Makefile
@@ -15,13 +15,13 @@ DFLAGS = -ofrunme
check: build
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_run
build:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d_cpp; \
- $(MAKE) -f $(TOP)/Makefile DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d_cpp; \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
clean:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_clean
diff --git a/Examples/d/funcptr/Makefile b/Examples/d/funcptr/Makefile
index 2ba893ca7..6554c3c73 100644
--- a/Examples/d/funcptr/Makefile
+++ b/Examples/d/funcptr/Makefile
@@ -15,13 +15,13 @@ DFLAGS = -ofrunme
check: build
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_run
build:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d; \
- $(MAKE) -f $(TOP)/Makefile DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d; \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
clean:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_clean
diff --git a/Examples/d/simple/Makefile b/Examples/d/simple/Makefile
index a8808c9c5..f5eed3210 100644
--- a/Examples/d/simple/Makefile
+++ b/Examples/d/simple/Makefile
@@ -15,13 +15,13 @@ DFLAGS = -ofrunme
check: build
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_run
build:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d; \
- $(MAKE) -f $(TOP)/Makefile DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d; \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
clean:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_clean
diff --git a/Examples/d/variables/Makefile b/Examples/d/variables/Makefile
index a8808c9c5..f5eed3210 100644
--- a/Examples/d/variables/Makefile
+++ b/Examples/d/variables/Makefile
@@ -15,13 +15,13 @@ DFLAGS = -ofrunme
check: build
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_run
build:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d; \
- $(MAKE) -f $(TOP)/Makefile DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' EXTRA_CFLAGS='$(EXTRA_CFLAGS)' EXTRA_LDFLAGS='$(EXTRA_LDFLAGS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -outcurrentdir ../example.i' TARGET='$(TARGET)' d; \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' DSRCS='$(DSRCS)' DFLAGS='$(DFLAGS)' d_compile
clean:
cd $(WORKING_DIR); \
- $(MAKE) -f $(TOP)/Makefile d_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' d_clean
diff --git a/Examples/go/callback/Makefile b/Examples/go/callback/Makefile
index 46a14b417..bf5275f14 100644
--- a/Examples/go/callback/Makefile
+++ b/Examples/go/callback/Makefile
@@ -6,11 +6,11 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/go/class/Makefile b/Examples/go/class/Makefile
index 72605caa5..de067cdd8 100644
--- a/Examples/go/class/Makefile
+++ b/Examples/go/class/Makefile
@@ -6,11 +6,11 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/go/constants/Makefile b/Examples/go/constants/Makefile
index 9fa967366..8fb07fd6b 100644
--- a/Examples/go/constants/Makefile
+++ b/Examples/go/constants/Makefile
@@ -6,11 +6,11 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/go/enum/Makefile b/Examples/go/enum/Makefile
index 1ceecc15c..2e2f1b2bd 100644
--- a/Examples/go/enum/Makefile
+++ b/Examples/go/enum/Makefile
@@ -6,11 +6,11 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/go/extend/Makefile b/Examples/go/extend/Makefile
index 67da89286..290694210 100644
--- a/Examples/go/extend/Makefile
+++ b/Examples/go/extend/Makefile
@@ -6,11 +6,11 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/go/funcptr/Makefile b/Examples/go/funcptr/Makefile
index 2c32c45fc..82031c9d5 100644
--- a/Examples/go/funcptr/Makefile
+++ b/Examples/go/funcptr/Makefile
@@ -6,11 +6,11 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/go/multimap/Makefile b/Examples/go/multimap/Makefile
index 0c5ec395f..4d739162b 100644
--- a/Examples/go/multimap/Makefile
+++ b/Examples/go/multimap/Makefile
@@ -6,11 +6,11 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/go/pointer/Makefile b/Examples/go/pointer/Makefile
index 12e94f939..9f1f3fda0 100644
--- a/Examples/go/pointer/Makefile
+++ b/Examples/go/pointer/Makefile
@@ -6,11 +6,11 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/go/reference/Makefile b/Examples/go/reference/Makefile
index 41a944239..e136f6fae 100644
--- a/Examples/go/reference/Makefile
+++ b/Examples/go/reference/Makefile
@@ -6,11 +6,11 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/go/simple/Makefile b/Examples/go/simple/Makefile
index 907da8821..5bc16549d 100644
--- a/Examples/go/simple/Makefile
+++ b/Examples/go/simple/Makefile
@@ -5,11 +5,11 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/go/template/Makefile b/Examples/go/template/Makefile
index 51cd97a80..a1d674836 100644
--- a/Examples/go/template/Makefile
+++ b/Examples/go/template/Makefile
@@ -6,11 +6,11 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/go/variables/Makefile b/Examples/go/variables/Makefile
index 1f144929c..d0da605e0 100644
--- a/Examples/go/variables/Makefile
+++ b/Examples/go/variables/Makefile
@@ -6,11 +6,11 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' go
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' go_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' go_clean
diff --git a/Examples/guile/class/Makefile b/Examples/guile/class/Makefile
index 8de4f292b..48426a8fb 100644
--- a/Examples/guile/class/Makefile
+++ b/Examples/guile/class/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile guile_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' guile_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='my-guile' INTERFACE='$(INTERFACE)' guile_static_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_clean
diff --git a/Examples/guile/constants/Makefile b/Examples/guile/constants/Makefile
index 2b6965e9e..d3f58ebdc 100644
--- a/Examples/guile/constants/Makefile
+++ b/Examples/guile/constants/Makefile
@@ -5,11 +5,11 @@ TARGET = my-guile
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_augmented_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_augmented_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile_augmented
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_clean
diff --git a/Examples/guile/matrix/Makefile b/Examples/guile/matrix/Makefile
index a32210e65..53638c867 100644
--- a/Examples/guile/matrix/Makefile
+++ b/Examples/guile/matrix/Makefile
@@ -5,11 +5,11 @@ TARGET = matrix
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' GUILE_RUNOPTIONS='-e do-test' guile_augmented_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' GUILE_RUNOPTIONS='-e do-test' guile_augmented_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' LIBS='-lm' guile_augmented
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_clean
diff --git a/Examples/guile/multimap/Makefile b/Examples/guile/multimap/Makefile
index 4ca82a3d3..b8f5e9b5a 100644
--- a/Examples/guile/multimap/Makefile
+++ b/Examples/guile/multimap/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile guile_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' guile_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='my-guile' INTERFACE='$(INTERFACE)' guile_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_clean
diff --git a/Examples/guile/multivalue/Makefile b/Examples/guile/multivalue/Makefile
index 4ca82a3d3..b8f5e9b5a 100644
--- a/Examples/guile/multivalue/Makefile
+++ b/Examples/guile/multivalue/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile guile_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' guile_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='my-guile' INTERFACE='$(INTERFACE)' guile_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_clean
diff --git a/Examples/guile/port/Makefile b/Examples/guile/port/Makefile
index d6ec0ac24..95a3a479f 100644
--- a/Examples/guile/port/Makefile
+++ b/Examples/guile/port/Makefile
@@ -5,12 +5,12 @@ TARGET = port
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_augmented_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_augmented_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile_augmented
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_clean
rm -f test.out
diff --git a/Examples/guile/simple/Makefile b/Examples/guile/simple/Makefile
index da4eb9015..517e41c64 100644
--- a/Examples/guile/simple/Makefile
+++ b/Examples/guile/simple/Makefile
@@ -5,11 +5,11 @@ TARGET = my-guile
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_augmented_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_augmented_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile_augmented
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_clean
diff --git a/Examples/guile/std_vector/Makefile b/Examples/guile/std_vector/Makefile
index fd7a8439a..d7f5de217 100644
--- a/Examples/guile/std_vector/Makefile
+++ b/Examples/guile/std_vector/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile guile_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' guile_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='my-guile' INTERFACE='$(INTERFACE)' guile_static_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' guile_clean
diff --git a/Examples/java/callback/Makefile b/Examples/java/callback/Makefile
index 8f274e7cb..13cfd1708 100644
--- a/Examples/java/callback/Makefile
+++ b/Examples/java/callback/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java_cpp
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/class/Makefile b/Examples/java/class/Makefile
index 8f274e7cb..13cfd1708 100644
--- a/Examples/java/class/Makefile
+++ b/Examples/java/class/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java_cpp
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/constants/Makefile b/Examples/java/constants/Makefile
index 4e21fc4cd..637ce0ead 100644
--- a/Examples/java/constants/Makefile
+++ b/Examples/java/constants/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java_cpp
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/enum/Makefile b/Examples/java/enum/Makefile
index 8f274e7cb..13cfd1708 100644
--- a/Examples/java/enum/Makefile
+++ b/Examples/java/enum/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java_cpp
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/extend/Makefile b/Examples/java/extend/Makefile
index 8f274e7cb..13cfd1708 100644
--- a/Examples/java/extend/Makefile
+++ b/Examples/java/extend/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java_cpp
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/funcptr/Makefile b/Examples/java/funcptr/Makefile
index e9e29f3a3..c0b1927ca 100644
--- a/Examples/java/funcptr/Makefile
+++ b/Examples/java/funcptr/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/multimap/Makefile b/Examples/java/multimap/Makefile
index e9e29f3a3..c0b1927ca 100644
--- a/Examples/java/multimap/Makefile
+++ b/Examples/java/multimap/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/native/Makefile b/Examples/java/native/Makefile
index e858cbe77..fa67e48a4 100644
--- a/Examples/java/native/Makefile
+++ b/Examples/java/native/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/nested/Makefile b/Examples/java/nested/Makefile
index 8f274e7cb..13cfd1708 100644
--- a/Examples/java/nested/Makefile
+++ b/Examples/java/nested/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java_cpp
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/pointer/Makefile b/Examples/java/pointer/Makefile
index e9e29f3a3..c0b1927ca 100644
--- a/Examples/java/pointer/Makefile
+++ b/Examples/java/pointer/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/reference/Makefile b/Examples/java/reference/Makefile
index 8f274e7cb..13cfd1708 100644
--- a/Examples/java/reference/Makefile
+++ b/Examples/java/reference/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java_cpp
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/simple/Makefile b/Examples/java/simple/Makefile
index e9e29f3a3..c0b1927ca 100644
--- a/Examples/java/simple/Makefile
+++ b/Examples/java/simple/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/template/Makefile b/Examples/java/template/Makefile
index 4e21fc4cd..637ce0ead 100644
--- a/Examples/java/template/Makefile
+++ b/Examples/java/template/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java_cpp
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/typemap/Makefile b/Examples/java/typemap/Makefile
index e858cbe77..fa67e48a4 100644
--- a/Examples/java/typemap/Makefile
+++ b/Examples/java/typemap/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/java/variables/Makefile b/Examples/java/variables/Makefile
index e9e29f3a3..c0b1927ca 100644
--- a/Examples/java/variables/Makefile
+++ b/Examples/java/variables/Makefile
@@ -7,12 +7,12 @@ SWIGOPT =
JAVASRCS = *.java
check: build
- $(MAKE) -f $(TOP)/Makefile java_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java
- $(MAKE) -f $(TOP)/Makefile JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' JAVASRCS='$(JAVASRCS)' JAVAFLAGS='$(JAVAFLAGS)' java_compile
clean:
- $(MAKE) -f $(TOP)/Makefile java_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' java_clean
diff --git a/Examples/javascript/class/Makefile b/Examples/javascript/class/Makefile
index 31846faae..54a8f7b03 100644
--- a/Examples/javascript/class/Makefile
+++ b/Examples/javascript/class/Makefile
@@ -1,3 +1,3 @@
SRCS = example.cxx
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/class/binding.gyp b/Examples/javascript/class/binding.gyp
deleted file mode 100644
index 54eebfaa0..000000000
--- a/Examples/javascript/class/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example.cxx", "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/class/binding.gyp.in b/Examples/javascript/class/binding.gyp.in
new file mode 100644
index 000000000..c56a650e9
--- /dev/null
+++ b/Examples/javascript/class/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "$srcdir/example.cxx", "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/class/example.js b/Examples/javascript/class/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/class/example.js
+++ b/Examples/javascript/class/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/class/runme.js b/Examples/javascript/class/runme.js
index e1d5d9797..6a77b8d8e 100644
--- a/Examples/javascript/class/runme.js
+++ b/Examples/javascript/class/runme.js
@@ -1,4 +1,4 @@
-var example = require("./example");
+var example = require("example");
// ----- Object creation -----
diff --git a/Examples/javascript/constant/Makefile b/Examples/javascript/constant/Makefile
index ea04c7df8..0402f8d09 100644
--- a/Examples/javascript/constant/Makefile
+++ b/Examples/javascript/constant/Makefile
@@ -1,3 +1,3 @@
SRCS =
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/constant/binding.gyp b/Examples/javascript/constant/binding.gyp
deleted file mode 100644
index 69af46b22..000000000
--- a/Examples/javascript/constant/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/constant/binding.gyp.in b/Examples/javascript/constant/binding.gyp.in
new file mode 100644
index 000000000..59779aef4
--- /dev/null
+++ b/Examples/javascript/constant/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/constant/example.js b/Examples/javascript/constant/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/constant/example.js
+++ b/Examples/javascript/constant/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/constant/runme.js b/Examples/javascript/constant/runme.js
index f4b55881e..f29d1a850 100644
--- a/Examples/javascript/constant/runme.js
+++ b/Examples/javascript/constant/runme.js
@@ -1,4 +1,4 @@
-var example = require("./example");
+var example = require("example");
console.log("ICONST = " + example.ICONST + " (should be 42)");
console.log("FCONST = " + example.FCONST + " (should be 2.1828)");
diff --git a/Examples/javascript/enum/Makefile b/Examples/javascript/enum/Makefile
index 31846faae..54a8f7b03 100644
--- a/Examples/javascript/enum/Makefile
+++ b/Examples/javascript/enum/Makefile
@@ -1,3 +1,3 @@
SRCS = example.cxx
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/enum/binding.gyp b/Examples/javascript/enum/binding.gyp
deleted file mode 100644
index 54eebfaa0..000000000
--- a/Examples/javascript/enum/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example.cxx", "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/enum/binding.gyp.in b/Examples/javascript/enum/binding.gyp.in
new file mode 100644
index 000000000..c56a650e9
--- /dev/null
+++ b/Examples/javascript/enum/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "$srcdir/example.cxx", "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/enum/example.js b/Examples/javascript/enum/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/enum/example.js
+++ b/Examples/javascript/enum/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/enum/runme.js b/Examples/javascript/enum/runme.js
index d4e89e8c8..851d43c4b 100644
--- a/Examples/javascript/enum/runme.js
+++ b/Examples/javascript/enum/runme.js
@@ -1,4 +1,4 @@
-var example = require("./example");
+var example = require("example");
// ----- Object creation -----
diff --git a/Examples/javascript/example.mk b/Examples/javascript/example.mk
index 274eff1a3..5a335bba4 100644
--- a/Examples/javascript/example.mk
+++ b/Examples/javascript/example.mk
@@ -15,13 +15,13 @@ INTERFACE = example.i
SWIGOPT=-$(JSENGINE)
check: build
- $(MAKE) -f $(EXAMPLES_TOP)/Makefile JSENGINE='$(JSENGINE)' TARGET='$(TARGET)' javascript_run
+ $(MAKE) -f $(EXAMPLES_TOP)/Makefile SRCDIR='$(SRCDIR)' JSENGINE='$(JSENGINE)' TARGET='$(TARGET)' javascript_run
build:
- $(MAKE) -f $(EXAMPLES_TOP)/Makefile CXXSRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(EXAMPLES_TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' javascript_wrapper_cpp
- $(MAKE) -f $(EXAMPLES_TOP)/Makefile CXXSRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(EXAMPLES_TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' JSENGINE='$(JSENGINE)' javascript_build_cpp
clean:
- $(MAKE) -f $(EXAMPLES_TOP)/Makefile javascript_clean
+ $(MAKE) -f $(EXAMPLES_TOP)/Makefile SRCDIR='$(SRCDIR)' javascript_clean
diff --git a/Examples/javascript/exception/Makefile b/Examples/javascript/exception/Makefile
index 31846faae..54a8f7b03 100644
--- a/Examples/javascript/exception/Makefile
+++ b/Examples/javascript/exception/Makefile
@@ -1,3 +1,3 @@
SRCS = example.cxx
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/exception/binding.gyp b/Examples/javascript/exception/binding.gyp.in
similarity index 89%
rename from Examples/javascript/exception/binding.gyp
rename to Examples/javascript/exception/binding.gyp.in
index 2be0a17a2..577a5c2e3 100644
--- a/Examples/javascript/exception/binding.gyp
+++ b/Examples/javascript/exception/binding.gyp.in
@@ -2,7 +2,8 @@
"targets": [
{
"target_name": "example",
- "sources": [ "example.cxx", "example_wrap.cxx" ],
+ "sources": [ "$srcdir/example.cxx", "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"],
'defines': [
'BUILDING_NODE_EXTENSION=1',
],
diff --git a/Examples/javascript/exception/example.js b/Examples/javascript/exception/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/exception/example.js
+++ b/Examples/javascript/exception/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/exception/runme.js b/Examples/javascript/exception/runme.js
index 977f51ebc..43ce66d6d 100644
--- a/Examples/javascript/exception/runme.js
+++ b/Examples/javascript/exception/runme.js
@@ -1,4 +1,4 @@
-var example = require("./example");
+var example = require("example");
console.log("Trying to catch some exceptions.");
t = new example.Test();
diff --git a/Examples/javascript/functor/Makefile b/Examples/javascript/functor/Makefile
index 31846faae..54a8f7b03 100644
--- a/Examples/javascript/functor/Makefile
+++ b/Examples/javascript/functor/Makefile
@@ -1,3 +1,3 @@
SRCS = example.cxx
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/functor/binding.gyp b/Examples/javascript/functor/binding.gyp
deleted file mode 100644
index 54eebfaa0..000000000
--- a/Examples/javascript/functor/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example.cxx", "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/functor/binding.gyp.in b/Examples/javascript/functor/binding.gyp.in
new file mode 100644
index 000000000..c56a650e9
--- /dev/null
+++ b/Examples/javascript/functor/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "$srcdir/example.cxx", "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/functor/example.js b/Examples/javascript/functor/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/functor/example.js
+++ b/Examples/javascript/functor/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/functor/runme.js b/Examples/javascript/functor/runme.js
index dc12470f4..28dc64320 100644
--- a/Examples/javascript/functor/runme.js
+++ b/Examples/javascript/functor/runme.js
@@ -1,4 +1,4 @@
-var example = require("./example");
+var example = require("example");
a = new example.intSum(0);
b = new example.doubleSum(100.0);
diff --git a/Examples/javascript/nspace/Makefile b/Examples/javascript/nspace/Makefile
index ea04c7df8..0402f8d09 100644
--- a/Examples/javascript/nspace/Makefile
+++ b/Examples/javascript/nspace/Makefile
@@ -1,3 +1,3 @@
SRCS =
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/nspace/binding.gyp b/Examples/javascript/nspace/binding.gyp
deleted file mode 100644
index 69af46b22..000000000
--- a/Examples/javascript/nspace/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/nspace/binding.gyp.in b/Examples/javascript/nspace/binding.gyp.in
new file mode 100644
index 000000000..59779aef4
--- /dev/null
+++ b/Examples/javascript/nspace/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/nspace/example.js b/Examples/javascript/nspace/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/nspace/example.js
+++ b/Examples/javascript/nspace/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/nspace/runme.js b/Examples/javascript/nspace/runme.js
index d6a49d8d4..fad73477d 100644
--- a/Examples/javascript/nspace/runme.js
+++ b/Examples/javascript/nspace/runme.js
@@ -3,7 +3,7 @@
// This file illustrates class C++ interface generated
// by SWIG.
-var example = require("./example");
+var example = require("example");
// Calling a module function ( aka global function )
if (example.module_function() !== 7) {
diff --git a/Examples/javascript/operator/Makefile b/Examples/javascript/operator/Makefile
index ea04c7df8..0402f8d09 100644
--- a/Examples/javascript/operator/Makefile
+++ b/Examples/javascript/operator/Makefile
@@ -1,3 +1,3 @@
SRCS =
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/operator/binding.gyp b/Examples/javascript/operator/binding.gyp
deleted file mode 100644
index 69af46b22..000000000
--- a/Examples/javascript/operator/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/operator/binding.gyp.in b/Examples/javascript/operator/binding.gyp.in
new file mode 100644
index 000000000..59779aef4
--- /dev/null
+++ b/Examples/javascript/operator/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/operator/example.js b/Examples/javascript/operator/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/operator/example.js
+++ b/Examples/javascript/operator/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/operator/runme.js b/Examples/javascript/operator/runme.js
index a700918d6..f72ca1c28 100644
--- a/Examples/javascript/operator/runme.js
+++ b/Examples/javascript/operator/runme.js
@@ -1,4 +1,4 @@
-var example = require("./example");
+var example = require("example");
a = new example.Complex(2,3);
b = new example.Complex(-5,10);
diff --git a/Examples/javascript/overload/Makefile b/Examples/javascript/overload/Makefile
index ea04c7df8..0402f8d09 100644
--- a/Examples/javascript/overload/Makefile
+++ b/Examples/javascript/overload/Makefile
@@ -1,3 +1,3 @@
SRCS =
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/overload/binding.gyp b/Examples/javascript/overload/binding.gyp
deleted file mode 100644
index 69af46b22..000000000
--- a/Examples/javascript/overload/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/overload/binding.gyp.in b/Examples/javascript/overload/binding.gyp.in
new file mode 100644
index 000000000..59779aef4
--- /dev/null
+++ b/Examples/javascript/overload/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/overload/example.js b/Examples/javascript/overload/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/overload/example.js
+++ b/Examples/javascript/overload/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/overload/runme.js b/Examples/javascript/overload/runme.js
index 1e6c861a6..1c23e3b6b 100644
--- a/Examples/javascript/overload/runme.js
+++ b/Examples/javascript/overload/runme.js
@@ -1,4 +1,4 @@
-var example = require("./example");
+var example = require("example");
example.f();
example.f(1);
diff --git a/Examples/javascript/pointer/Makefile b/Examples/javascript/pointer/Makefile
index 31846faae..54a8f7b03 100644
--- a/Examples/javascript/pointer/Makefile
+++ b/Examples/javascript/pointer/Makefile
@@ -1,3 +1,3 @@
SRCS = example.cxx
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/pointer/binding.gyp b/Examples/javascript/pointer/binding.gyp
deleted file mode 100644
index 54eebfaa0..000000000
--- a/Examples/javascript/pointer/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example.cxx", "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/pointer/binding.gyp.in b/Examples/javascript/pointer/binding.gyp.in
new file mode 100644
index 000000000..c56a650e9
--- /dev/null
+++ b/Examples/javascript/pointer/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "$srcdir/example.cxx", "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/pointer/example.js b/Examples/javascript/pointer/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/pointer/example.js
+++ b/Examples/javascript/pointer/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/pointer/runme.js b/Examples/javascript/pointer/runme.js
index fb8cf0c74..e9fa9a0bc 100644
--- a/Examples/javascript/pointer/runme.js
+++ b/Examples/javascript/pointer/runme.js
@@ -1,4 +1,4 @@
-var example = require("./example");
+var example = require("example");
// First create some objects using the pointer library.
console.log("Testing the pointer library");
diff --git a/Examples/javascript/reference/Makefile b/Examples/javascript/reference/Makefile
index 31846faae..54a8f7b03 100644
--- a/Examples/javascript/reference/Makefile
+++ b/Examples/javascript/reference/Makefile
@@ -1,3 +1,3 @@
SRCS = example.cxx
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/reference/binding.gyp b/Examples/javascript/reference/binding.gyp
deleted file mode 100644
index 54eebfaa0..000000000
--- a/Examples/javascript/reference/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example.cxx", "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/reference/binding.gyp.in b/Examples/javascript/reference/binding.gyp.in
new file mode 100644
index 000000000..c56a650e9
--- /dev/null
+++ b/Examples/javascript/reference/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "$srcdir/example.cxx", "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/reference/example.js b/Examples/javascript/reference/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/reference/example.js
+++ b/Examples/javascript/reference/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/reference/runme.js b/Examples/javascript/reference/runme.js
index 88c108314..04f732520 100644
--- a/Examples/javascript/reference/runme.js
+++ b/Examples/javascript/reference/runme.js
@@ -1,5 +1,5 @@
// This file illustrates the manipulation of C++ references in Javascript.
-var example = require("./example");
+var example = require("example");
// ----- Object creation -----
diff --git a/Examples/javascript/simple/Makefile b/Examples/javascript/simple/Makefile
index 31846faae..54a8f7b03 100644
--- a/Examples/javascript/simple/Makefile
+++ b/Examples/javascript/simple/Makefile
@@ -1,3 +1,3 @@
SRCS = example.cxx
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/simple/binding.gyp b/Examples/javascript/simple/binding.gyp
deleted file mode 100644
index 54eebfaa0..000000000
--- a/Examples/javascript/simple/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example.cxx", "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/simple/binding.gyp.in b/Examples/javascript/simple/binding.gyp.in
new file mode 100644
index 000000000..c56a650e9
--- /dev/null
+++ b/Examples/javascript/simple/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "$srcdir/example.cxx", "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/simple/example.js b/Examples/javascript/simple/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/simple/example.js
+++ b/Examples/javascript/simple/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/simple/runme.js b/Examples/javascript/simple/runme.js
index be2c18669..4abff0e2a 100644
--- a/Examples/javascript/simple/runme.js
+++ b/Examples/javascript/simple/runme.js
@@ -1,4 +1,4 @@
-var example = require("./example");
+var example = require("example");
/* Call our gcd() function */
diff --git a/Examples/javascript/template/Makefile b/Examples/javascript/template/Makefile
index ea04c7df8..0402f8d09 100644
--- a/Examples/javascript/template/Makefile
+++ b/Examples/javascript/template/Makefile
@@ -1,3 +1,3 @@
SRCS =
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/template/binding.gyp b/Examples/javascript/template/binding.gyp
deleted file mode 100644
index 69af46b22..000000000
--- a/Examples/javascript/template/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/template/binding.gyp.in b/Examples/javascript/template/binding.gyp.in
new file mode 100644
index 000000000..59779aef4
--- /dev/null
+++ b/Examples/javascript/template/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/template/example.js b/Examples/javascript/template/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/template/example.js
+++ b/Examples/javascript/template/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/template/runme.js b/Examples/javascript/template/runme.js
index 55894dfd5..af96ac7f9 100644
--- a/Examples/javascript/template/runme.js
+++ b/Examples/javascript/template/runme.js
@@ -1,4 +1,4 @@
-var example = require("./example");
+var example = require("example");
//Call some templated functions
console.log(example.maxint(3,7));
diff --git a/Examples/javascript/variables/Makefile b/Examples/javascript/variables/Makefile
index 31846faae..54a8f7b03 100644
--- a/Examples/javascript/variables/Makefile
+++ b/Examples/javascript/variables/Makefile
@@ -1,3 +1,3 @@
SRCS = example.cxx
-include ../example.mk
+include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/variables/binding.gyp b/Examples/javascript/variables/binding.gyp
deleted file mode 100644
index 54eebfaa0..000000000
--- a/Examples/javascript/variables/binding.gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "targets": [
- {
- "target_name": "example",
- "sources": [ "example.cxx", "example_wrap.cxx" ]
- }
- ]
-}
diff --git a/Examples/javascript/variables/binding.gyp.in b/Examples/javascript/variables/binding.gyp.in
new file mode 100644
index 000000000..c56a650e9
--- /dev/null
+++ b/Examples/javascript/variables/binding.gyp.in
@@ -0,0 +1,9 @@
+{
+ "targets": [
+ {
+ "target_name": "example",
+ "sources": [ "$srcdir/example.cxx", "example_wrap.cxx" ],
+ "include_dirs": ["$srcdir"]
+ }
+ ]
+}
diff --git a/Examples/javascript/variables/example.js b/Examples/javascript/variables/example.js
index 79cd3913f..2e7f83a06 100644
--- a/Examples/javascript/variables/example.js
+++ b/Examples/javascript/variables/example.js
@@ -1 +1 @@
-module.exports = require("./build/Release/example");
+module.exports = require("build/Release/example");
diff --git a/Examples/javascript/variables/runme.js b/Examples/javascript/variables/runme.js
index 537e17296..a2b5f791c 100644
--- a/Examples/javascript/variables/runme.js
+++ b/Examples/javascript/variables/runme.js
@@ -1,4 +1,4 @@
-var example = require("./example");
+var example = require("example");
// Try to set the values of some global variables
example.ivar = 42;
diff --git a/Examples/lua/arrays/Makefile b/Examples/lua/arrays/Makefile
index d398dffea..4191f7ec3 100644
--- a/Examples/lua/arrays/Makefile
+++ b/Examples/lua/arrays/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/class/Makefile b/Examples/lua/class/Makefile
index c39e8acdf..96308f0df 100644
--- a/Examples/lua/class/Makefile
+++ b/Examples/lua/class/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/constants/Makefile b/Examples/lua/constants/Makefile
index 7e36e15a1..ae33cb182 100644
--- a/Examples/lua/constants/Makefile
+++ b/Examples/lua/constants/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/dual/Makefile b/Examples/lua/dual/Makefile
index 12ee00a68..c86152a97 100644
--- a/Examples/lua/dual/Makefile
+++ b/Examples/lua/dual/Makefile
@@ -1,21 +1,21 @@
TOP = ../..
SWIG = $(TOP)/../preinst-swig
TARGET = dual
-CXXSRCS = example2_wrap.cxx
+GENCXXSRCS = example2_wrap.cxx
INTERFACE = dual.i
LUA_INTERP = dual.cpp
# This is a little different to normal as we need to static link two modules and a custom interpreter
# We need the external runtime, then swig examples2, and build the module as normal
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' lua_embed_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' lua_embed_run
build:
$(SWIG) -lua -external-runtime
- $(SWIG) -c++ -lua $(SWIGOPT) example2.i
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(SWIG) -c++ -lua $(SWIGOPT) -o $(GENCXXSRCS) $(SRCDIR)example2.i
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) GENCXXSRCS='$(GENCXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='example.i' LUA_INTERP='$(LUA_INTERP)' lua_static_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
rm -f swigluarun.h $(TARGET)
diff --git a/Examples/lua/embed/Makefile b/Examples/lua/embed/Makefile
index 57979c061..5e3a91893 100644
--- a/Examples/lua/embed/Makefile
+++ b/Examples/lua/embed/Makefile
@@ -9,12 +9,12 @@ LIBS = -lm
# this is a little different to normal as we have our own special interpreter
# which we want to static link
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' lua_embed_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' lua_embed_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' LIBS='$(LIBS)' INTERFACE='example.i' LUA_INTERP='$(LUA_INTERP)' lua_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
rm -f $(TARGET)
diff --git a/Examples/lua/embed/embed.c b/Examples/lua/embed/embed.c
index 507567489..1f10cc8e8 100644
--- a/Examples/lua/embed/embed.c
+++ b/Examples/lua/embed/embed.c
@@ -13,6 +13,7 @@ We will be using the luaL_dostring()/lua_dostring() function to call into lua
#include
#include
+#include
#include
#include
@@ -62,9 +63,13 @@ int main(int argc,char* argv[]) {
luaopen_example(L);
printf("[C] all looks ok\n");
printf("\n");
- printf("[C] let's load the file 'runme.lua'\n");
+ if (argc != 2 || argv[1] == NULL || strlen(argv[1]) == 0) {
+ printf("[C] ERROR: no lua file given on command line\n");
+ exit(3);
+ }
+ printf("[C] let's load the file '%s'\n", argv[1]);
printf("[C] any lua code in this file will be executed\n");
- if (luaL_loadfile(L, "runme.lua") || lua_pcall(L, 0, 0, 0)) {
+ if (luaL_loadfile(L, argv[1]) || lua_pcall(L, 0, 0, 0)) {
printf("[C] ERROR: cannot run lua file: %s",lua_tostring(L, -1));
exit(3);
}
diff --git a/Examples/lua/embed2/Makefile b/Examples/lua/embed2/Makefile
index ec22bdcae..d30ba0942 100644
--- a/Examples/lua/embed2/Makefile
+++ b/Examples/lua/embed2/Makefile
@@ -9,12 +9,12 @@ LIBS = -lm
# this is a little different to normal as we have our own special interpreter
# which we want to static link
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' lua_embed_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' lua_embed_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' LIBS='$(LIBS)' INTERFACE='example.i' LUA_INTERP='$(LUA_INTERP)' lua_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
rm -f $(TARGET)
diff --git a/Examples/lua/embed2/embed2.c b/Examples/lua/embed2/embed2.c
index 100a1fb33..7b2ca9b67 100644
--- a/Examples/lua/embed2/embed2.c
+++ b/Examples/lua/embed2/embed2.c
@@ -24,6 +24,7 @@ We will be using the luaL_dostring()/lua_dostring() function to call into lua
#include
#include
+#include
#include
#include
@@ -189,9 +190,13 @@ int main(int argc,char* argv[]) {
luaopen_example(L);
printf("[C] all looks ok\n");
printf("\n");
- printf("[C] let's load the file 'runme.lua'\n");
+ if (argc != 2 || argv[1] == NULL || strlen(argv[1]) == 0) {
+ printf("[C] ERROR: no lua file given on command line\n");
+ exit(3);
+ }
+ printf("[C] let's load the file '%s'\n", argv[1]);
printf("[C] any lua code in this file will be executed\n");
- if (luaL_loadfile(L, "runme.lua") || lua_pcall(L, 0, 0, 0)) {
+ if (luaL_loadfile(L, argv[1]) || lua_pcall(L, 0, 0, 0)) {
printf("[C] ERROR: cannot run lua file: %s",lua_tostring(L, -1));
exit(3);
}
diff --git a/Examples/lua/embed3/Makefile b/Examples/lua/embed3/Makefile
index 8cfa97454..fc0026122 100644
--- a/Examples/lua/embed3/Makefile
+++ b/Examples/lua/embed3/Makefile
@@ -9,13 +9,13 @@ LUA_INTERP = embed3.cpp
# which we want to static link
# we also need the external runtime, so we can get access to certain internals of SWIG
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' lua_embed_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' lua_embed_run
build:
$(SWIG) -c++ -lua $(SWIGOPT) -external-runtime swigluarun.h
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='example.i' LUA_INTERP='$(LUA_INTERP)' lua_static_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
rm -f swigluarun.h $(TARGET)
diff --git a/Examples/lua/embed3/embed3.cpp b/Examples/lua/embed3/embed3.cpp
index d559167d1..9be49add3 100644
--- a/Examples/lua/embed3/embed3.cpp
+++ b/Examples/lua/embed3/embed3.cpp
@@ -113,10 +113,14 @@ int main(int argc, char* argv[]) {
push_pointer(L,&engine,"Engine *",0);
lua_setglobal(L, "pEngine"); // set as global variable
- printf("[C++] now let's load the file 'runme.lua'\n");
+ if (argc != 2 || argv[1] == NULL || strlen(argv[1]) == 0) {
+ printf("[C++] ERROR: no lua file given on command line\n");
+ exit(3);
+ }
+ printf("[C++] now let's load the file '%s'\n", argv[1]);
printf("[C++] any lua code in this file will be executed\n");
- if (luaL_loadfile(L, "runme.lua") || lua_pcall(L, 0, 0, 0)) {
- printf("[C++] ERROR: cannot run lua file: %s", lua_tostring(L, -1));
+ if (luaL_loadfile(L, argv[1]) || lua_pcall(L, 0, 0, 0)) {
+ printf("[C++] ERROR: cannot run lua file: %s",lua_tostring(L, -1));
exit(3);
}
printf("[C++] We are now back in C++, all looks ok\n");
diff --git a/Examples/lua/exception/Makefile b/Examples/lua/exception/Makefile
index 3dbebb4e5..ac9c28b69 100644
--- a/Examples/lua/exception/Makefile
+++ b/Examples/lua/exception/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/funcptr3/Makefile b/Examples/lua/funcptr3/Makefile
index 8b51e73e8..aeeaad469 100644
--- a/Examples/lua/funcptr3/Makefile
+++ b/Examples/lua/funcptr3/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/functest/Makefile b/Examples/lua/functest/Makefile
index 8b51e73e8..aeeaad469 100644
--- a/Examples/lua/functest/Makefile
+++ b/Examples/lua/functest/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/functor/Makefile b/Examples/lua/functor/Makefile
index 4e4edbfa5..e647fb2a8 100644
--- a/Examples/lua/functor/Makefile
+++ b/Examples/lua/functor/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/import/Makefile b/Examples/lua/import/Makefile
index 0a9aebd57..8d64a21c6 100644
--- a/Examples/lua/import/Makefile
+++ b/Examples/lua/import/Makefile
@@ -4,17 +4,17 @@ SWIGOPT =
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='base' INTERFACE='base.i' lua_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' lua_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' lua_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='spam' INTERFACE='spam.i' lua_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/nspace/Makefile b/Examples/lua/nspace/Makefile
index 57875ec49..17757c2ec 100644
--- a/Examples/lua/nspace/Makefile
+++ b/Examples/lua/nspace/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/owner/Makefile b/Examples/lua/owner/Makefile
index c39e8acdf..96308f0df 100644
--- a/Examples/lua/owner/Makefile
+++ b/Examples/lua/owner/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/pointer/Makefile b/Examples/lua/pointer/Makefile
index 8b51e73e8..aeeaad469 100644
--- a/Examples/lua/pointer/Makefile
+++ b/Examples/lua/pointer/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/simple/Makefile b/Examples/lua/simple/Makefile
index d398dffea..4191f7ec3 100644
--- a/Examples/lua/simple/Makefile
+++ b/Examples/lua/simple/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/lua/variables/Makefile b/Examples/lua/variables/Makefile
index d398dffea..4191f7ec3 100644
--- a/Examples/lua/variables/Makefile
+++ b/Examples/lua/variables/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile lua_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' lua
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mylua' INTERFACE='$(INTERFACE)' lua_static
clean:
- $(MAKE) -f $(TOP)/Makefile lua_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' lua_clean
diff --git a/Examples/modula3/class/Makefile b/Examples/modula3/class/Makefile
index af8e099cc..2e2f37526 100644
--- a/Examples/modula3/class/Makefile
+++ b/Examples/modula3/class/Makefile
@@ -8,10 +8,10 @@ SWIGOPT = -c++
MODULA3SRCS = *.[im]3
check: build
- $(MAKE) -f $(TOP)/Makefile modula3_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' modula3
m3ppinplace $(MODULA3SRCS)
# compilation of example_wrap.cxx is started by cm3
@@ -21,4 +21,4 @@ build:
cm3
clean:
- $(MAKE) -f $(TOP)/Makefile modula3_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_clean
diff --git a/Examples/modula3/enum/Makefile b/Examples/modula3/enum/Makefile
index a351cb1b9..3915e5405 100644
--- a/Examples/modula3/enum/Makefile
+++ b/Examples/modula3/enum/Makefile
@@ -8,18 +8,18 @@ SWIGOPT = -c++
MODULA3SRCS = *.[im]3
check: build
- $(MAKE) -f $(TOP)/Makefile modula3_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_run
build:
$(SWIG) -modula3 $(SWIGOPT) -module Example -generateconst $(CONSTNUMERIC) $(TARGET).h
$(CXX) -Wall $(CONSTNUMERIC).c -o $(CONSTNUMERIC)
$(CONSTNUMERIC) >$(CONSTNUMERIC).i
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' modula3
m3ppinplace $(MODULA3SRCS)
mv m3makefile $(MODULA3SRCS) src/
cm3
clean:
- $(MAKE) -f $(TOP)/Makefile modula3_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_clean
diff --git a/Examples/modula3/exception/Makefile b/Examples/modula3/exception/Makefile
index 8d4525512..1dbf1a156 100644
--- a/Examples/modula3/exception/Makefile
+++ b/Examples/modula3/exception/Makefile
@@ -8,15 +8,15 @@ MODULA3SRCS = *.[im]3
MODULA3FLAGS= -o runme
check: build
- $(MAKE) -f $(TOP)/Makefile modula3_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' modula3_cpp
-# $(MAKE) -f $(TOP)/Makefile MODULA3SRCS='$(MODULA3SRCS)' MODULA3FLAGS='$(MODULA3FLAGS)' modula3_compile
+# $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' MODULA3SRCS='$(MODULA3SRCS)' MODULA3FLAGS='$(MODULA3FLAGS)' modula3_compile
m3ppinplace $(MODULA3SRCS)
mv m3makefile $(MODULA3SRCS) src/
cm3
clean:
- $(MAKE) -f $(TOP)/Makefile modula3_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_clean
diff --git a/Examples/modula3/reference/Makefile b/Examples/modula3/reference/Makefile
index 1a5fdeb30..3b68fe822 100644
--- a/Examples/modula3/reference/Makefile
+++ b/Examples/modula3/reference/Makefile
@@ -7,14 +7,14 @@ SWIGOPT = -c++
MODULA3SRCS = *.[im]3
check: build
- $(MAKE) -f $(TOP)/Makefile modula3_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' modula3
m3ppinplace $(MODULA3SRCS)
mv m3makefile $(MODULA3SRCS) src/
cm3
clean:
- $(MAKE) -f $(TOP)/Makefile modula3_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_clean
diff --git a/Examples/modula3/simple/Makefile b/Examples/modula3/simple/Makefile
index 6287dac20..2796b25f8 100644
--- a/Examples/modula3/simple/Makefile
+++ b/Examples/modula3/simple/Makefile
@@ -7,14 +7,14 @@ SWIGOPT =
MODULA3SRCS = *.[im]3
check: build
- $(MAKE) -f $(TOP)/Makefile modula3_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' modula3
m3ppinplace $(MODULA3SRCS)
mv m3makefile $(MODULA3SRCS) src/
cm3
clean:
- $(MAKE) -f $(TOP)/Makefile modula3_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_clean
diff --git a/Examples/modula3/typemap/Makefile b/Examples/modula3/typemap/Makefile
index 6287dac20..2796b25f8 100644
--- a/Examples/modula3/typemap/Makefile
+++ b/Examples/modula3/typemap/Makefile
@@ -7,14 +7,14 @@ SWIGOPT =
MODULA3SRCS = *.[im]3
check: build
- $(MAKE) -f $(TOP)/Makefile modula3_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' modula3
m3ppinplace $(MODULA3SRCS)
mv m3makefile $(MODULA3SRCS) src/
cm3
clean:
- $(MAKE) -f $(TOP)/Makefile modula3_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_clean
diff --git a/Examples/mzscheme/multimap/Makefile b/Examples/mzscheme/multimap/Makefile
index f8eeb72c3..ecf83fbeb 100644
--- a/Examples/mzscheme/multimap/Makefile
+++ b/Examples/mzscheme/multimap/Makefile
@@ -6,10 +6,10 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile mzscheme_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' mzscheme_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' mzscheme
clean:
- $(MAKE) -f $(TOP)/Makefile mzscheme_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' mzscheme_clean
diff --git a/Examples/mzscheme/simple/Makefile b/Examples/mzscheme/simple/Makefile
index f8eeb72c3..ecf83fbeb 100644
--- a/Examples/mzscheme/simple/Makefile
+++ b/Examples/mzscheme/simple/Makefile
@@ -6,10 +6,10 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile mzscheme_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' mzscheme_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' mzscheme
clean:
- $(MAKE) -f $(TOP)/Makefile mzscheme_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' mzscheme_clean
diff --git a/Examples/mzscheme/std_vector/Makefile b/Examples/mzscheme/std_vector/Makefile
index d2bf0a013..75918a61e 100644
--- a/Examples/mzscheme/std_vector/Makefile
+++ b/Examples/mzscheme/std_vector/Makefile
@@ -9,7 +9,7 @@ GPP = `which g++`
MZC = test -n "/usr/bin/mzc" && /usr/bin/mzc
check: build
- $(MAKE) -f $(TOP)/Makefile mzscheme_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' mzscheme_run
build:
$(SWIG) -mzscheme -c++ $(SWIGOPT) $(INTERFACE)
@@ -17,4 +17,4 @@ build:
$(MZC) --linker $(GPP) --ld $(TARGET).so example_wrap.o
clean:
- $(MAKE) -f $(TOP)/Makefile mzscheme_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' mzscheme_clean
diff --git a/Examples/ocaml/argout_ref/Makefile b/Examples/ocaml/argout_ref/Makefile
index 4e12e3769..09893af65 100644
--- a/Examples/ocaml/argout_ref/Makefile
+++ b/Examples/ocaml/argout_ref/Makefile
@@ -8,21 +8,21 @@ PROGFILE = example_prog.ml
OBJS = example.o
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_run
build: static
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_static_cpp
dynamic:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_dynamic_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' MLFILE='$(MLFILE)' ocaml_clean
diff --git a/Examples/ocaml/contract/Makefile b/Examples/ocaml/contract/Makefile
index 1db93e38a..df5d6a6f5 100644
--- a/Examples/ocaml/contract/Makefile
+++ b/Examples/ocaml/contract/Makefile
@@ -8,27 +8,27 @@ PROGFILE = example_prog.ml
OBJS =
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_run
build: static
dynamic:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_dynamic
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_static
toplevel:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_static_toplevel
clean:
- $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' MLFILE='$(MLFILE)' ocaml_clean
diff --git a/Examples/ocaml/scoped_enum/Makefile b/Examples/ocaml/scoped_enum/Makefile
index e5de57ac2..794733971 100644
--- a/Examples/ocaml/scoped_enum/Makefile
+++ b/Examples/ocaml/scoped_enum/Makefile
@@ -8,27 +8,27 @@ PROGFILE = example_prog.ml
OBJS =
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_run
build: static
dynamic:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_dynamic_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_static_cpp
toplevel:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_static_cpp_toplevel
clean:
- $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' MLFILE='$(MLFILE)' ocaml_clean
diff --git a/Examples/ocaml/shapes/Makefile b/Examples/ocaml/shapes/Makefile
index c1ab6507c..69102f3b1 100644
--- a/Examples/ocaml/shapes/Makefile
+++ b/Examples/ocaml/shapes/Makefile
@@ -9,27 +9,27 @@ PROGFILE = example_prog.ml
OBJS = example.o
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_run
build: static static_top
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_static_cpp
static_top:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_static_cpp_toplevel
dynamic:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)'
MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_dynamic_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' MLFILE='$(MLFILE)' ocaml_clean
diff --git a/Examples/ocaml/simple/Makefile b/Examples/ocaml/simple/Makefile
index 64c7256c1..49bf81c1e 100644
--- a/Examples/ocaml/simple/Makefile
+++ b/Examples/ocaml/simple/Makefile
@@ -8,27 +8,27 @@ PROGFILE = example_prog.ml
OBJS = example.o
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_run
build: static
dynamic:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_dynamic
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_static
toplevel:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' MLFILE='$(MLFILE)' \
PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_static_toplevel
clean:
- $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' MLFILE='$(MLFILE)' ocaml_clean
diff --git a/Examples/ocaml/std_string/Makefile b/Examples/ocaml/std_string/Makefile
index 89f997090..8f8b2f684 100644
--- a/Examples/ocaml/std_string/Makefile
+++ b/Examples/ocaml/std_string/Makefile
@@ -6,19 +6,19 @@ INTERFACE = example.i
PROGFILE = runme.ml
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_run
build: static
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
ocaml_static_cpp
dynamic:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
ocaml_dynamic_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_clean
diff --git a/Examples/ocaml/std_vector/Makefile b/Examples/ocaml/std_vector/Makefile
index 89f997090..8f8b2f684 100644
--- a/Examples/ocaml/std_vector/Makefile
+++ b/Examples/ocaml/std_vector/Makefile
@@ -6,19 +6,19 @@ INTERFACE = example.i
PROGFILE = runme.ml
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_run
build: static
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
ocaml_static_cpp
dynamic:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
ocaml_dynamic_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_clean
diff --git a/Examples/ocaml/stl/Makefile b/Examples/ocaml/stl/Makefile
index a913611fb..e4cce4883 100644
--- a/Examples/ocaml/stl/Makefile
+++ b/Examples/ocaml/stl/Makefile
@@ -6,29 +6,29 @@ INTERFACE = example.i
PROGFILE = runme.ml
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_run
build: static
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
ocaml_static_cpp
director:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
ocaml_static_cpp_director
dynamic:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
ocaml_static_cpp
toplevel:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
ocaml_static_cpp_toplevel
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_clean
diff --git a/Examples/ocaml/string_from_ptr/Makefile b/Examples/ocaml/string_from_ptr/Makefile
index 6d344854a..294bdec83 100644
--- a/Examples/ocaml/string_from_ptr/Makefile
+++ b/Examples/ocaml/string_from_ptr/Makefile
@@ -9,27 +9,27 @@ PROGFILE = example_prog.ml
OBJS =
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_run
build: static static_top
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_static_cpp
static_top:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_static_cpp_toplevel
dynamic:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)'
MLFILE='$(MLFILE)' PROGFILE='$(PROGFILE)' OBJS='$(OBJS)' \
ocaml_dynamic_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile MLFILE='$(MLFILE)' ocaml_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' MLFILE='$(MLFILE)' ocaml_clean
diff --git a/Examples/ocaml/strings_test/Makefile b/Examples/ocaml/strings_test/Makefile
index 49cc544ed..b6b866669 100644
--- a/Examples/ocaml/strings_test/Makefile
+++ b/Examples/ocaml/strings_test/Makefile
@@ -6,24 +6,24 @@ INTERFACE = example.i
PROGFILE = runme.ml
check: build
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_run
build: static top
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
ocaml_static_cpp
dynamic:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
ocaml_static_cpp
top:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
PROGFILE='$(PROGFILE)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
ocaml_static_cpp_toplevel
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' ocaml_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' ocaml_clean
diff --git a/Examples/octave/callback/Makefile b/Examples/octave/callback/Makefile
index d38d7f896..7855d0617 100644
--- a/Examples/octave/callback/Makefile
+++ b/Examples/octave/callback/Makefile
@@ -7,11 +7,11 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/class/Makefile b/Examples/octave/class/Makefile
index d38d7f896..7855d0617 100644
--- a/Examples/octave/class/Makefile
+++ b/Examples/octave/class/Makefile
@@ -7,11 +7,11 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/constants/Makefile b/Examples/octave/constants/Makefile
index 03501bd81..eb05d1e7e 100644
--- a/Examples/octave/constants/Makefile
+++ b/Examples/octave/constants/Makefile
@@ -7,11 +7,11 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/contract/Makefile b/Examples/octave/contract/Makefile
index 73e3962ed..2e0e82124 100644
--- a/Examples/octave/contract/Makefile
+++ b/Examples/octave/contract/Makefile
@@ -5,11 +5,11 @@ TARGET = swigexample
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/enum/Makefile b/Examples/octave/enum/Makefile
index d38d7f896..7855d0617 100644
--- a/Examples/octave/enum/Makefile
+++ b/Examples/octave/enum/Makefile
@@ -7,11 +7,11 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/extend/Makefile b/Examples/octave/extend/Makefile
index d38d7f896..7855d0617 100644
--- a/Examples/octave/extend/Makefile
+++ b/Examples/octave/extend/Makefile
@@ -7,11 +7,11 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/funcptr/Makefile b/Examples/octave/funcptr/Makefile
index 73e3962ed..2e0e82124 100644
--- a/Examples/octave/funcptr/Makefile
+++ b/Examples/octave/funcptr/Makefile
@@ -5,11 +5,11 @@ TARGET = swigexample
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/funcptr2/Makefile b/Examples/octave/funcptr2/Makefile
index 73e3962ed..2e0e82124 100644
--- a/Examples/octave/funcptr2/Makefile
+++ b/Examples/octave/funcptr2/Makefile
@@ -5,11 +5,11 @@ TARGET = swigexample
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/functor/Makefile b/Examples/octave/functor/Makefile
index 94fb96337..0fbc7586b 100644
--- a/Examples/octave/functor/Makefile
+++ b/Examples/octave/functor/Makefile
@@ -7,11 +7,11 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/module_load/Makefile b/Examples/octave/module_load/Makefile
index e388763bd..7b24a8530 100644
--- a/Examples/octave/module_load/Makefile
+++ b/Examples/octave/module_load/Makefile
@@ -5,14 +5,14 @@ TARGET = swigexample
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' SWIGOPT='-module $$(TARGET)' INTERFACE='$(INTERFACE)' octave
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)2' SWIGOPT='-module $$(TARGET) -globals .' INTERFACE='$(INTERFACE)' octave
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
rm -f $(TARGET).m
diff --git a/Examples/octave/operator/Makefile b/Examples/octave/operator/Makefile
index 94fb96337..0fbc7586b 100644
--- a/Examples/octave/operator/Makefile
+++ b/Examples/octave/operator/Makefile
@@ -7,11 +7,11 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/pointer/Makefile b/Examples/octave/pointer/Makefile
index 73e3962ed..2e0e82124 100644
--- a/Examples/octave/pointer/Makefile
+++ b/Examples/octave/pointer/Makefile
@@ -5,11 +5,11 @@ TARGET = swigexample
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/reference/Makefile b/Examples/octave/reference/Makefile
index d38d7f896..7855d0617 100644
--- a/Examples/octave/reference/Makefile
+++ b/Examples/octave/reference/Makefile
@@ -7,11 +7,11 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/simple/Makefile b/Examples/octave/simple/Makefile
index 73e3962ed..2e0e82124 100644
--- a/Examples/octave/simple/Makefile
+++ b/Examples/octave/simple/Makefile
@@ -5,11 +5,11 @@ TARGET = swigexample
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/template/Makefile b/Examples/octave/template/Makefile
index 94fb96337..0fbc7586b 100644
--- a/Examples/octave/template/Makefile
+++ b/Examples/octave/template/Makefile
@@ -7,11 +7,11 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/octave/variables/Makefile b/Examples/octave/variables/Makefile
index 73e3962ed..2e0e82124 100644
--- a/Examples/octave/variables/Makefile
+++ b/Examples/octave/variables/Makefile
@@ -5,11 +5,11 @@ TARGET = swigexample
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile octave_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' octave
clean:
- $(MAKE) -f $(TOP)/Makefile octave_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' octave_clean
diff --git a/Examples/perl5/callback/Makefile b/Examples/perl5/callback/Makefile
index 544d13642..0d1cc574f 100644
--- a/Examples/perl5/callback/Makefile
+++ b/Examples/perl5/callback/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/class/Makefile b/Examples/perl5/class/Makefile
index 544d13642..0d1cc574f 100644
--- a/Examples/perl5/class/Makefile
+++ b/Examples/perl5/class/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/constants/Makefile b/Examples/perl5/constants/Makefile
index 899282913..b7b411534 100644
--- a/Examples/perl5/constants/Makefile
+++ b/Examples/perl5/constants/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/constants2/Makefile b/Examples/perl5/constants2/Makefile
index 2ed10d733..85dd13741 100644
--- a/Examples/perl5/constants2/Makefile
+++ b/Examples/perl5/constants2/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
SWIGOPT = -const
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/extend/Makefile b/Examples/perl5/extend/Makefile
index 544d13642..0d1cc574f 100644
--- a/Examples/perl5/extend/Makefile
+++ b/Examples/perl5/extend/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/funcptr/Makefile b/Examples/perl5/funcptr/Makefile
index 366b5897c..3e1de1fc1 100644
--- a/Examples/perl5/funcptr/Makefile
+++ b/Examples/perl5/funcptr/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/import/Makefile b/Examples/perl5/import/Makefile
index baa8277fd..b31ab7952 100644
--- a/Examples/perl5/import/Makefile
+++ b/Examples/perl5/import/Makefile
@@ -4,17 +4,17 @@ SWIGOPT =
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='baseclass' INTERFACE='base.i' perl5_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' perl5_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' perl5_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='spam' INTERFACE='spam.i' perl5_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/inline/Makefile b/Examples/perl5/inline/Makefile
index d544a6532..5c98748c1 100644
--- a/Examples/perl5/inline/Makefile
+++ b/Examples/perl5/inline/Makefile
@@ -1,6 +1,6 @@
run:
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
rm -rf _Inline
diff --git a/Examples/perl5/java/Makefile b/Examples/perl5/java/Makefile
index 3a0bb215d..5eaea3212 100644
--- a/Examples/perl5/java/Makefile
+++ b/Examples/perl5/java/Makefile
@@ -6,17 +6,17 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build: Example.class Example.h
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
CXXSHARED="gcj -fpic -shared Example.class" PERL5_CCFLAGS='' PERL5_EXP='' LIBS="-lstdc++" perl5_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
rm -f *.class Example.h
-Example.class Example.h: Example.java
- gcj -fPIC -C -c -g Example.java
+Example.class Example.h: $(SRCDIR)Example.java
+ gcj -d . -fPIC -C -c -g $(SRCDIR)Example.java
gcjh Example.class
diff --git a/Examples/perl5/multimap/Makefile b/Examples/perl5/multimap/Makefile
index 366b5897c..3e1de1fc1 100644
--- a/Examples/perl5/multimap/Makefile
+++ b/Examples/perl5/multimap/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/multiple_inheritance/Makefile b/Examples/perl5/multiple_inheritance/Makefile
index 62355a82c..1fe5a51bb 100644
--- a/Examples/perl5/multiple_inheritance/Makefile
+++ b/Examples/perl5/multiple_inheritance/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/pointer/Makefile b/Examples/perl5/pointer/Makefile
index 366b5897c..3e1de1fc1 100644
--- a/Examples/perl5/pointer/Makefile
+++ b/Examples/perl5/pointer/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/reference/Makefile b/Examples/perl5/reference/Makefile
index 986fab86a..a22f5a68d 100644
--- a/Examples/perl5/reference/Makefile
+++ b/Examples/perl5/reference/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT = -noproxy
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' SWIGOPT='$(SWIGOPT)' perl5_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myperl' INTERFACE='$(INTERFACE)' SWIGOPT='$(SWIGOPT)' perl5_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/simple/Makefile b/Examples/perl5/simple/Makefile
index 366b5897c..3e1de1fc1 100644
--- a/Examples/perl5/simple/Makefile
+++ b/Examples/perl5/simple/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/value/Makefile b/Examples/perl5/value/Makefile
index 366b5897c..3e1de1fc1 100644
--- a/Examples/perl5/value/Makefile
+++ b/Examples/perl5/value/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/variables/Makefile b/Examples/perl5/variables/Makefile
index 366b5897c..3e1de1fc1 100644
--- a/Examples/perl5/variables/Makefile
+++ b/Examples/perl5/variables/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/perl5/xmlstring/Makefile b/Examples/perl5/xmlstring/Makefile
index df9dabd11..4f02d3ee4 100644
--- a/Examples/perl5/xmlstring/Makefile
+++ b/Examples/perl5/xmlstring/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lxerces-c -lxerces-depdom -lm
check: build
- $(MAKE) -f $(TOP)/Makefile perl5_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' LIBS=$(LIBS) CXX="g++ -g3" perl5_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile perl5_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' perl5_clean
diff --git a/Examples/php/callback/Makefile b/Examples/php/callback/Makefile
index 6f7e4ad27..3ad3999a5 100644
--- a/Examples/php/callback/Makefile
+++ b/Examples/php/callback/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/class/Makefile b/Examples/php/class/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/class/Makefile
+++ b/Examples/php/class/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/constants/Makefile b/Examples/php/constants/Makefile
index 3f24a3921..e5b49571e 100644
--- a/Examples/php/constants/Makefile
+++ b/Examples/php/constants/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/cpointer/Makefile b/Examples/php/cpointer/Makefile
index 57785acc7..f2c15c5c1 100644
--- a/Examples/php/cpointer/Makefile
+++ b/Examples/php/cpointer/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/disown/Makefile b/Examples/php/disown/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/disown/Makefile
+++ b/Examples/php/disown/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/enum/Makefile b/Examples/php/enum/Makefile
index 22f979d2f..2028d03c7 100644
--- a/Examples/php/enum/Makefile
+++ b/Examples/php/enum/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT = -noproxy
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/extend/Makefile b/Examples/php/extend/Makefile
index 6f7e4ad27..3ad3999a5 100644
--- a/Examples/php/extend/Makefile
+++ b/Examples/php/extend/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/funcptr/Makefile b/Examples/php/funcptr/Makefile
index 57785acc7..f2c15c5c1 100644
--- a/Examples/php/funcptr/Makefile
+++ b/Examples/php/funcptr/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/overloading/Makefile b/Examples/php/overloading/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/overloading/Makefile
+++ b/Examples/php/overloading/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/pointer/Makefile b/Examples/php/pointer/Makefile
index 57785acc7..f2c15c5c1 100644
--- a/Examples/php/pointer/Makefile
+++ b/Examples/php/pointer/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/pragmas/Makefile b/Examples/php/pragmas/Makefile
index 3f24a3921..e5b49571e 100644
--- a/Examples/php/pragmas/Makefile
+++ b/Examples/php/pragmas/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/proxy/Makefile b/Examples/php/proxy/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/proxy/Makefile
+++ b/Examples/php/proxy/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/reference/Makefile b/Examples/php/reference/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/reference/Makefile
+++ b/Examples/php/reference/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/simple/Makefile b/Examples/php/simple/Makefile
index 57785acc7..f2c15c5c1 100644
--- a/Examples/php/simple/Makefile
+++ b/Examples/php/simple/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/sync/Makefile b/Examples/php/sync/Makefile
index cefd81f78..8b2b340e9 100644
--- a/Examples/php/sync/Makefile
+++ b/Examples/php/sync/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/value/Makefile b/Examples/php/value/Makefile
index 449686784..3db7afec5 100644
--- a/Examples/php/value/Makefile
+++ b/Examples/php/value/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT = -noproxy
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/php/variables/Makefile b/Examples/php/variables/Makefile
index 57785acc7..f2c15c5c1 100644
--- a/Examples/php/variables/Makefile
+++ b/Examples/php/variables/Makefile
@@ -7,17 +7,17 @@ LIBS =
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile php_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
php
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myphp' INTERFACE='$(INTERFACE)' \
php_static
clean:
- $(MAKE) -f $(TOP)/Makefile php_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
diff --git a/Examples/pike/class/Makefile b/Examples/pike/class/Makefile
index aadc47151..d8cf4ea7e 100644
--- a/Examples/pike/class/Makefile
+++ b/Examples/pike/class/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile pike_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' pike_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypike' INTERFACE='$(INTERFACE)' pike_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile pike_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_clean
diff --git a/Examples/pike/constants/Makefile b/Examples/pike/constants/Makefile
index c9385ce3b..736d30f03 100644
--- a/Examples/pike/constants/Makefile
+++ b/Examples/pike/constants/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile pike_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' pike
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mypike' INTERFACE='$(INTERFACE)' pike_static
clean:
- $(MAKE) -f $(TOP)/Makefile pike_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_clean
diff --git a/Examples/pike/enum/Makefile b/Examples/pike/enum/Makefile
index aadc47151..d8cf4ea7e 100644
--- a/Examples/pike/enum/Makefile
+++ b/Examples/pike/enum/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile pike_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' pike_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypike' INTERFACE='$(INTERFACE)' pike_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile pike_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_clean
diff --git a/Examples/pike/overload/Makefile b/Examples/pike/overload/Makefile
index 8d799efe1..f111b1137 100644
--- a/Examples/pike/overload/Makefile
+++ b/Examples/pike/overload/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lstdc++ -lm
check: build
- $(MAKE) -f $(TOP)/Makefile pike_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' pike_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypike' INTERFACE='$(INTERFACE)' pike_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile pike_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_clean
diff --git a/Examples/pike/simple/Makefile b/Examples/pike/simple/Makefile
index f58ed4e65..d7f6b209e 100644
--- a/Examples/pike/simple/Makefile
+++ b/Examples/pike/simple/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile pike_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' pike
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mypike' INTERFACE='$(INTERFACE)' pike_static
clean:
- $(MAKE) -f $(TOP)/Makefile pike_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_clean
diff --git a/Examples/pike/template/Makefile b/Examples/pike/template/Makefile
index e4fc945f7..da115c1d5 100644
--- a/Examples/pike/template/Makefile
+++ b/Examples/pike/template/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile pike_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' pike_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='mypike' INTERFACE='$(INTERFACE)' pike_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile pike_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' pike_clean
diff --git a/Examples/python/callback/Makefile b/Examples/python/callback/Makefile
index 684995801..a4c4d2a69 100644
--- a/Examples/python/callback/Makefile
+++ b/Examples/python/callback/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/class/Makefile b/Examples/python/class/Makefile
index e940c1f43..41cded284 100644
--- a/Examples/python/class/Makefile
+++ b/Examples/python/class/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/constants/Makefile b/Examples/python/constants/Makefile
index 15ffa24c9..8ec6e9cc9 100644
--- a/Examples/python/constants/Makefile
+++ b/Examples/python/constants/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/contract/Makefile b/Examples/python/contract/Makefile
index 999521ccc..fe1d9325e 100644
--- a/Examples/python/contract/Makefile
+++ b/Examples/python/contract/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/docstrings/Makefile b/Examples/python/docstrings/Makefile
index 51552f3cf..f471930dd 100644
--- a/Examples/python/docstrings/Makefile
+++ b/Examples/python/docstrings/Makefile
@@ -7,17 +7,17 @@ LIBS = -lm
SWIGOPT = -O
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/enum/Makefile b/Examples/python/enum/Makefile
index e940c1f43..41cded284 100644
--- a/Examples/python/enum/Makefile
+++ b/Examples/python/enum/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/exception/Makefile b/Examples/python/exception/Makefile
index fb200fbaf..ad3d49fe1 100644
--- a/Examples/python/exception/Makefile
+++ b/Examples/python/exception/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/exceptproxy/Makefile b/Examples/python/exceptproxy/Makefile
index 86a643415..f406dfaf4 100644
--- a/Examples/python/exceptproxy/Makefile
+++ b/Examples/python/exceptproxy/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/extend/Makefile b/Examples/python/extend/Makefile
index 684995801..a4c4d2a69 100644
--- a/Examples/python/extend/Makefile
+++ b/Examples/python/extend/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/funcptr/Makefile b/Examples/python/funcptr/Makefile
index df3bc86ff..222916fa1 100644
--- a/Examples/python/funcptr/Makefile
+++ b/Examples/python/funcptr/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/funcptr2/Makefile b/Examples/python/funcptr2/Makefile
index df3bc86ff..222916fa1 100644
--- a/Examples/python/funcptr2/Makefile
+++ b/Examples/python/funcptr2/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/functor/Makefile b/Examples/python/functor/Makefile
index dde0d0910..1234c310e 100644
--- a/Examples/python/functor/Makefile
+++ b/Examples/python/functor/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/import/Makefile b/Examples/python/import/Makefile
index f63e12271..d83dfeaa8 100644
--- a/Examples/python/import/Makefile
+++ b/Examples/python/import/Makefile
@@ -4,19 +4,19 @@ SWIGOPT =
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='base' INTERFACE='base.i' python_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='spam' INTERFACE='spam.i' python_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
rm -f foo.py bar.py spam.py base.py
diff --git a/Examples/python/import_packages/Makefile b/Examples/python/import_packages/Makefile
index fda2380b3..2df2be101 100644
--- a/Examples/python/import_packages/Makefile
+++ b/Examples/python/import_packages/Makefile
@@ -5,7 +5,7 @@ LIBS =
PY3 =
import_packages_subdirs = \
- same_modnames1 \
+ same_modnames1 \
same_modnames2 \
from_init1 \
from_init2 \
@@ -14,8 +14,13 @@ import_packages_subdirs = \
relativeimport1
check: build
+ if test "x$(SRCDIR)" != x; then \
+ for file in `cd $(SRCDIR) && find . -type f -name __init__.py`; do \
+ cp "${SRCDIR}$$file" "$$file" || exit 1; \
+ done; \
+ fi; \
for s in $(import_packages_subdirs); do \
- (cd $$s && $(MAKE) check); \
+ (cd $$s && $(MAKE) check); \
done
build:
@@ -29,7 +34,7 @@ static:
done
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
for s in $(import_packages_subdirs); do \
(cd $$s && $(MAKE) clean); \
done
diff --git a/Examples/python/import_packages/from_init1/Makefile b/Examples/python/import_packages/from_init1/Makefile
index 8e35c6c61..b9d803a0e 100644
--- a/Examples/python/import_packages/from_init1/Makefile
+++ b/Examples/python/import_packages/from_init1/Makefile
@@ -11,7 +11,7 @@ else
endif
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' build
@@ -20,6 +20,6 @@ static:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd py2 && $(MAKE) clean
cd py3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init1/py2/Makefile b/Examples/python/import_packages/from_init1/py2/Makefile
index 4c0dfab07..9595397d8 100644
--- a/Examples/python/import_packages/from_init1/py2/Makefile
+++ b/Examples/python/import_packages/from_init1/py2/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init1/py2/pkg2/Makefile b/Examples/python/import_packages/from_init1/py2/pkg2/Makefile
index 0dd174659..1eb810e05 100644
--- a/Examples/python/import_packages/from_init1/py2/pkg2/Makefile
+++ b/Examples/python/import_packages/from_init1/py2/pkg2/Makefile
@@ -4,17 +4,17 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp_static
clean::
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
- $(MAKE) -f $(TOP)/Makefile TARGET='bar' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='bar' python_clean
diff --git a/Examples/python/import_packages/from_init1/py3/Makefile b/Examples/python/import_packages/from_init1/py3/Makefile
index 4c0dfab07..9595397d8 100644
--- a/Examples/python/import_packages/from_init1/py3/Makefile
+++ b/Examples/python/import_packages/from_init1/py3/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init1/py3/pkg2/Makefile b/Examples/python/import_packages/from_init1/py3/pkg2/Makefile
index 0dd174659..1eb810e05 100644
--- a/Examples/python/import_packages/from_init1/py3/pkg2/Makefile
+++ b/Examples/python/import_packages/from_init1/py3/pkg2/Makefile
@@ -4,17 +4,17 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp_static
clean::
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
- $(MAKE) -f $(TOP)/Makefile TARGET='bar' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='bar' python_clean
diff --git a/Examples/python/import_packages/from_init2/Makefile b/Examples/python/import_packages/from_init2/Makefile
index 8e35c6c61..b9d803a0e 100644
--- a/Examples/python/import_packages/from_init2/Makefile
+++ b/Examples/python/import_packages/from_init2/Makefile
@@ -11,7 +11,7 @@ else
endif
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' build
@@ -20,6 +20,6 @@ static:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd py2 && $(MAKE) clean
cd py3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init2/py2/Makefile b/Examples/python/import_packages/from_init2/py2/Makefile
index 4c0dfab07..9595397d8 100644
--- a/Examples/python/import_packages/from_init2/py2/Makefile
+++ b/Examples/python/import_packages/from_init2/py2/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init2/py2/pkg2/Makefile b/Examples/python/import_packages/from_init2/py2/pkg2/Makefile
index 3fe56139d..36e099b78 100644
--- a/Examples/python/import_packages/from_init2/py2/pkg2/Makefile
+++ b/Examples/python/import_packages/from_init2/py2/pkg2/Makefile
@@ -4,15 +4,15 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' build
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='bar' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='bar' python_clean
cd pkg3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init2/py2/pkg2/pkg3/Makefile b/Examples/python/import_packages/from_init2/py2/pkg2/pkg3/Makefile
index a417e2745..cb20bd25f 100644
--- a/Examples/python/import_packages/from_init2/py2/pkg2/pkg3/Makefile
+++ b/Examples/python/import_packages/from_init2/py2/pkg2/pkg3/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_packages/from_init2/py3/Makefile b/Examples/python/import_packages/from_init2/py3/Makefile
index 4c0dfab07..9595397d8 100644
--- a/Examples/python/import_packages/from_init2/py3/Makefile
+++ b/Examples/python/import_packages/from_init2/py3/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init2/py3/pkg2/Makefile b/Examples/python/import_packages/from_init2/py3/pkg2/Makefile
index 3fe56139d..36e099b78 100644
--- a/Examples/python/import_packages/from_init2/py3/pkg2/Makefile
+++ b/Examples/python/import_packages/from_init2/py3/pkg2/Makefile
@@ -4,15 +4,15 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' build
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='bar' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='bar' python_clean
cd pkg3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init2/py3/pkg2/pkg3/Makefile b/Examples/python/import_packages/from_init2/py3/pkg2/pkg3/Makefile
index a417e2745..cb20bd25f 100644
--- a/Examples/python/import_packages/from_init2/py3/pkg2/pkg3/Makefile
+++ b/Examples/python/import_packages/from_init2/py3/pkg2/pkg3/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_packages/from_init3/Makefile b/Examples/python/import_packages/from_init3/Makefile
index 8e35c6c61..b9d803a0e 100644
--- a/Examples/python/import_packages/from_init3/Makefile
+++ b/Examples/python/import_packages/from_init3/Makefile
@@ -11,7 +11,7 @@ else
endif
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' build
@@ -20,6 +20,6 @@ static:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd py2 && $(MAKE) clean
cd py3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init3/py2/Makefile b/Examples/python/import_packages/from_init3/py2/Makefile
index 4c0dfab07..9595397d8 100644
--- a/Examples/python/import_packages/from_init3/py2/Makefile
+++ b/Examples/python/import_packages/from_init3/py2/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init3/py2/pkg2/Makefile b/Examples/python/import_packages/from_init3/py2/pkg2/Makefile
index 3fe56139d..36e099b78 100644
--- a/Examples/python/import_packages/from_init3/py2/pkg2/Makefile
+++ b/Examples/python/import_packages/from_init3/py2/pkg2/Makefile
@@ -4,15 +4,15 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' build
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='bar' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='bar' python_clean
cd pkg3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init3/py2/pkg2/pkg3/Makefile b/Examples/python/import_packages/from_init3/py2/pkg2/pkg3/Makefile
index 470f9d561..d6ae1b2bc 100644
--- a/Examples/python/import_packages/from_init3/py2/pkg2/pkg3/Makefile
+++ b/Examples/python/import_packages/from_init3/py2/pkg2/pkg3/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg4 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg4 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init3/py2/pkg2/pkg3/pkg4/Makefile b/Examples/python/import_packages/from_init3/py2/pkg2/pkg3/pkg4/Makefile
index a98d31122..286d90070 100644
--- a/Examples/python/import_packages/from_init3/py2/pkg2/pkg3/pkg4/Makefile
+++ b/Examples/python/import_packages/from_init3/py2/pkg2/pkg3/pkg4/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_packages/from_init3/py3/Makefile b/Examples/python/import_packages/from_init3/py3/Makefile
index 4c0dfab07..9595397d8 100644
--- a/Examples/python/import_packages/from_init3/py3/Makefile
+++ b/Examples/python/import_packages/from_init3/py3/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init3/py3/pkg2/Makefile b/Examples/python/import_packages/from_init3/py3/pkg2/Makefile
index 3fe56139d..36e099b78 100644
--- a/Examples/python/import_packages/from_init3/py3/pkg2/Makefile
+++ b/Examples/python/import_packages/from_init3/py3/pkg2/Makefile
@@ -4,15 +4,15 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' build
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='bar' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='bar' python_clean
cd pkg3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init3/py3/pkg2/pkg3/Makefile b/Examples/python/import_packages/from_init3/py3/pkg2/pkg3/Makefile
index 470f9d561..d6ae1b2bc 100644
--- a/Examples/python/import_packages/from_init3/py3/pkg2/pkg3/Makefile
+++ b/Examples/python/import_packages/from_init3/py3/pkg2/pkg3/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg4 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg4 && $(MAKE) clean
diff --git a/Examples/python/import_packages/from_init3/py3/pkg2/pkg3/pkg4/Makefile b/Examples/python/import_packages/from_init3/py3/pkg2/pkg3/pkg4/Makefile
index a98d31122..286d90070 100644
--- a/Examples/python/import_packages/from_init3/py3/pkg2/pkg3/pkg4/Makefile
+++ b/Examples/python/import_packages/from_init3/py3/pkg2/pkg3/pkg4/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_packages/relativeimport1/Makefile b/Examples/python/import_packages/relativeimport1/Makefile
index 8e35c6c61..b9d803a0e 100644
--- a/Examples/python/import_packages/relativeimport1/Makefile
+++ b/Examples/python/import_packages/relativeimport1/Makefile
@@ -11,7 +11,7 @@ else
endif
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' build
@@ -20,6 +20,6 @@ static:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd py2 && $(MAKE) clean
cd py3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport1/py2/Makefile b/Examples/python/import_packages/relativeimport1/py2/Makefile
index 4c0dfab07..9595397d8 100644
--- a/Examples/python/import_packages/relativeimport1/py2/Makefile
+++ b/Examples/python/import_packages/relativeimport1/py2/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport1/py2/pkg2/Makefile b/Examples/python/import_packages/relativeimport1/py2/pkg2/Makefile
index 3fe56139d..36e099b78 100644
--- a/Examples/python/import_packages/relativeimport1/py2/pkg2/Makefile
+++ b/Examples/python/import_packages/relativeimport1/py2/pkg2/Makefile
@@ -4,15 +4,15 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' build
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='bar' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='bar' python_clean
cd pkg3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport1/py2/pkg2/pkg3/Makefile b/Examples/python/import_packages/relativeimport1/py2/pkg2/pkg3/Makefile
index a417e2745..cb20bd25f 100644
--- a/Examples/python/import_packages/relativeimport1/py2/pkg2/pkg3/Makefile
+++ b/Examples/python/import_packages/relativeimport1/py2/pkg2/pkg3/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_packages/relativeimport1/py3/Makefile b/Examples/python/import_packages/relativeimport1/py3/Makefile
index 4c0dfab07..9595397d8 100644
--- a/Examples/python/import_packages/relativeimport1/py3/Makefile
+++ b/Examples/python/import_packages/relativeimport1/py3/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport1/py3/pkg2/Makefile b/Examples/python/import_packages/relativeimport1/py3/pkg2/Makefile
index 3fe56139d..36e099b78 100644
--- a/Examples/python/import_packages/relativeimport1/py3/pkg2/Makefile
+++ b/Examples/python/import_packages/relativeimport1/py3/pkg2/Makefile
@@ -4,15 +4,15 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' build
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='bar' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='bar' python_clean
cd pkg3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport1/py3/pkg2/pkg3/Makefile b/Examples/python/import_packages/relativeimport1/py3/pkg2/pkg3/Makefile
index a417e2745..cb20bd25f 100644
--- a/Examples/python/import_packages/relativeimport1/py3/pkg2/pkg3/Makefile
+++ b/Examples/python/import_packages/relativeimport1/py3/pkg2/pkg3/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_packages/relativeimport2/Makefile b/Examples/python/import_packages/relativeimport2/Makefile
index 8e35c6c61..b9d803a0e 100644
--- a/Examples/python/import_packages/relativeimport2/Makefile
+++ b/Examples/python/import_packages/relativeimport2/Makefile
@@ -11,7 +11,7 @@ else
endif
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' build
@@ -20,6 +20,6 @@ static:
cd $(PKG1DIR) && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT) -relativeimport' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd py2 && $(MAKE) clean
cd py3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport2/py2/Makefile b/Examples/python/import_packages/relativeimport2/py2/Makefile
index 4c0dfab07..9595397d8 100644
--- a/Examples/python/import_packages/relativeimport2/py2/Makefile
+++ b/Examples/python/import_packages/relativeimport2/py2/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport2/py2/pkg2/Makefile b/Examples/python/import_packages/relativeimport2/py2/pkg2/Makefile
index 3fe56139d..36e099b78 100644
--- a/Examples/python/import_packages/relativeimport2/py2/pkg2/Makefile
+++ b/Examples/python/import_packages/relativeimport2/py2/pkg2/Makefile
@@ -4,15 +4,15 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' build
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='bar' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='bar' python_clean
cd pkg3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport2/py2/pkg2/pkg3/Makefile b/Examples/python/import_packages/relativeimport2/py2/pkg2/pkg3/Makefile
index 470f9d561..d6ae1b2bc 100644
--- a/Examples/python/import_packages/relativeimport2/py2/pkg2/pkg3/Makefile
+++ b/Examples/python/import_packages/relativeimport2/py2/pkg2/pkg3/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg4 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg4 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport2/py2/pkg2/pkg3/pkg4/Makefile b/Examples/python/import_packages/relativeimport2/py2/pkg2/pkg3/pkg4/Makefile
index a98d31122..286d90070 100644
--- a/Examples/python/import_packages/relativeimport2/py2/pkg2/pkg3/pkg4/Makefile
+++ b/Examples/python/import_packages/relativeimport2/py2/pkg2/pkg3/pkg4/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_packages/relativeimport2/py3/Makefile b/Examples/python/import_packages/relativeimport2/py3/Makefile
index 4c0dfab07..9595397d8 100644
--- a/Examples/python/import_packages/relativeimport2/py3/Makefile
+++ b/Examples/python/import_packages/relativeimport2/py3/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport2/py3/pkg2/Makefile b/Examples/python/import_packages/relativeimport2/py3/pkg2/Makefile
index 3fe56139d..36e099b78 100644
--- a/Examples/python/import_packages/relativeimport2/py3/pkg2/Makefile
+++ b/Examples/python/import_packages/relativeimport2/py3/pkg2/Makefile
@@ -4,15 +4,15 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' build
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
cd pkg3 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='bar' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='bar' python_clean
cd pkg3 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport2/py3/pkg2/pkg3/Makefile b/Examples/python/import_packages/relativeimport2/py3/pkg2/pkg3/Makefile
index 470f9d561..d6ae1b2bc 100644
--- a/Examples/python/import_packages/relativeimport2/py3/pkg2/pkg3/Makefile
+++ b/Examples/python/import_packages/relativeimport2/py3/pkg2/pkg3/Makefile
@@ -10,5 +10,5 @@ static:
cd pkg4 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg4 && $(MAKE) clean
diff --git a/Examples/python/import_packages/relativeimport2/py3/pkg2/pkg3/pkg4/Makefile b/Examples/python/import_packages/relativeimport2/py3/pkg2/pkg3/pkg4/Makefile
index a98d31122..286d90070 100644
--- a/Examples/python/import_packages/relativeimport2/py3/pkg2/pkg3/pkg4/Makefile
+++ b/Examples/python/import_packages/relativeimport2/py3/pkg2/pkg3/pkg4/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_packages/same_modnames1/Makefile b/Examples/python/import_packages/same_modnames1/Makefile
index 9dd5971dc..e05c13017 100644
--- a/Examples/python/import_packages/same_modnames1/Makefile
+++ b/Examples/python/import_packages/same_modnames1/Makefile
@@ -4,7 +4,7 @@ SWIGOPT =
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
cd pkg1 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' build
@@ -15,6 +15,6 @@ static:
cd pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg1 && $(MAKE) clean
cd pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/same_modnames1/pkg1/Makefile b/Examples/python/import_packages/same_modnames1/pkg1/Makefile
index 9b51a76ed..df1b30321 100644
--- a/Examples/python/import_packages/same_modnames1/pkg1/Makefile
+++ b/Examples/python/import_packages/same_modnames1/pkg1/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_packages/same_modnames1/pkg2/Makefile b/Examples/python/import_packages/same_modnames1/pkg2/Makefile
index 9b51a76ed..df1b30321 100644
--- a/Examples/python/import_packages/same_modnames1/pkg2/Makefile
+++ b/Examples/python/import_packages/same_modnames1/pkg2/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_packages/same_modnames2/Makefile b/Examples/python/import_packages/same_modnames2/Makefile
index cfc327883..770343a80 100644
--- a/Examples/python/import_packages/same_modnames2/Makefile
+++ b/Examples/python/import_packages/same_modnames2/Makefile
@@ -4,7 +4,7 @@ SWIGOPT =
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
cd pkg1 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' build
@@ -15,6 +15,6 @@ static:
cd pkg1/pkg2 && $(MAKE) SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' LIBS='$(LIBS)' static
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
cd pkg1 && $(MAKE) clean
cd pkg1/pkg2 && $(MAKE) clean
diff --git a/Examples/python/import_packages/same_modnames2/pkg1/Makefile b/Examples/python/import_packages/same_modnames2/pkg1/Makefile
index 9b51a76ed..df1b30321 100644
--- a/Examples/python/import_packages/same_modnames2/pkg1/Makefile
+++ b/Examples/python/import_packages/same_modnames2/pkg1/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_packages/same_modnames2/pkg1/pkg2/Makefile b/Examples/python/import_packages/same_modnames2/pkg1/pkg2/Makefile
index 053b911f5..11e8573ad 100644
--- a/Examples/python/import_packages/same_modnames2/pkg1/pkg2/Makefile
+++ b/Examples/python/import_packages/same_modnames2/pkg1/pkg2/Makefile
@@ -4,12 +4,12 @@ SWIGOPT =
LIBS =
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='foo' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='foo' python_clean
diff --git a/Examples/python/import_template/Makefile b/Examples/python/import_template/Makefile
index f63e12271..d83dfeaa8 100644
--- a/Examples/python/import_template/Makefile
+++ b/Examples/python/import_template/Makefile
@@ -4,19 +4,19 @@ SWIGOPT =
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='base' INTERFACE='base.i' python_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' python_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' python_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='spam' INTERFACE='spam.i' python_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
rm -f foo.py bar.py spam.py base.py
diff --git a/Examples/python/java/Makefile b/Examples/python/java/Makefile
index 2ce219969..4befa38ba 100644
--- a/Examples/python/java/Makefile
+++ b/Examples/python/java/Makefile
@@ -6,18 +6,18 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build: Example.class Example.h
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
CXXSHARED="gcj -fpic -shared Example.class" DEFS='' LIBS="-lstdc++" python_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_clean
rm -f $(TARGET).py
rm -f *.class Example.h
-Example.class Example.h: Example.java
- gcj -fPIC -C -c -g Example.java
+Example.class Example.h: $(SRCDIR)Example.java
+ gcj -d . -fPIC -C -c -g $(SRCDIR)Example.java
gcjh Example.class
diff --git a/Examples/python/libffi/Makefile b/Examples/python/libffi/Makefile
index ae51b0a60..db5dfe138 100644
--- a/Examples/python/libffi/Makefile
+++ b/Examples/python/libffi/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' LIBS='-L/usr/local/lib -lffi' python
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/multimap/Makefile b/Examples/python/multimap/Makefile
index df3bc86ff..222916fa1 100644
--- a/Examples/python/multimap/Makefile
+++ b/Examples/python/multimap/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/operator/Makefile b/Examples/python/operator/Makefile
index dde0d0910..1234c310e 100644
--- a/Examples/python/operator/Makefile
+++ b/Examples/python/operator/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/performance/constructor/Makefile b/Examples/python/performance/constructor/Makefile
index 98a50ec29..8e65123cf 100644
--- a/Examples/python/performance/constructor/Makefile
+++ b/Examples/python/performance/constructor/Makefile
@@ -5,17 +5,17 @@ TARGET = Simple
INTERFACE = Simple.i
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -module Simple_baseline' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -module Simple_baseline' \
TARGET='$(TARGET)_baseline' INTERFACE='$(INTERFACE)' python_cpp
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -O -module Simple_optimized' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -O -module Simple_optimized' \
TARGET='$(TARGET)_optimized' INTERFACE='$(INTERFACE)' python_cpp
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -builtin -O -module Simple_builtin' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -builtin -O -module Simple_builtin' \
TARGET='$(TARGET)_builtin' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
rm -f $(TARGET)_*.py
diff --git a/Examples/python/performance/func/Makefile b/Examples/python/performance/func/Makefile
index 98a50ec29..8e65123cf 100644
--- a/Examples/python/performance/func/Makefile
+++ b/Examples/python/performance/func/Makefile
@@ -5,17 +5,17 @@ TARGET = Simple
INTERFACE = Simple.i
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -module Simple_baseline' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -module Simple_baseline' \
TARGET='$(TARGET)_baseline' INTERFACE='$(INTERFACE)' python_cpp
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -O -module Simple_optimized' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -O -module Simple_optimized' \
TARGET='$(TARGET)_optimized' INTERFACE='$(INTERFACE)' python_cpp
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -builtin -O -module Simple_builtin' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -builtin -O -module Simple_builtin' \
TARGET='$(TARGET)_builtin' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
rm -f $(TARGET)_*.py
diff --git a/Examples/python/performance/hierarchy/Makefile b/Examples/python/performance/hierarchy/Makefile
index 98a50ec29..8e65123cf 100644
--- a/Examples/python/performance/hierarchy/Makefile
+++ b/Examples/python/performance/hierarchy/Makefile
@@ -5,17 +5,17 @@ TARGET = Simple
INTERFACE = Simple.i
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -module Simple_baseline' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -module Simple_baseline' \
TARGET='$(TARGET)_baseline' INTERFACE='$(INTERFACE)' python_cpp
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -O -module Simple_optimized' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -O -module Simple_optimized' \
TARGET='$(TARGET)_optimized' INTERFACE='$(INTERFACE)' python_cpp
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -builtin -O -module Simple_builtin' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -builtin -O -module Simple_builtin' \
TARGET='$(TARGET)_builtin' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
rm -f $(TARGET)_*.py
diff --git a/Examples/python/performance/hierarchy_operator/Makefile b/Examples/python/performance/hierarchy_operator/Makefile
index 98a50ec29..8e65123cf 100644
--- a/Examples/python/performance/hierarchy_operator/Makefile
+++ b/Examples/python/performance/hierarchy_operator/Makefile
@@ -5,17 +5,17 @@ TARGET = Simple
INTERFACE = Simple.i
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -module Simple_baseline' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -module Simple_baseline' \
TARGET='$(TARGET)_baseline' INTERFACE='$(INTERFACE)' python_cpp
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -O -module Simple_optimized' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -O -module Simple_optimized' \
TARGET='$(TARGET)_optimized' INTERFACE='$(INTERFACE)' python_cpp
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -builtin -O -module Simple_builtin' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -builtin -O -module Simple_builtin' \
TARGET='$(TARGET)_builtin' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
rm -f $(TARGET)_*.py
diff --git a/Examples/python/performance/operator/Makefile b/Examples/python/performance/operator/Makefile
index 98a50ec29..8e65123cf 100644
--- a/Examples/python/performance/operator/Makefile
+++ b/Examples/python/performance/operator/Makefile
@@ -5,17 +5,17 @@ TARGET = Simple
INTERFACE = Simple.i
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -module Simple_baseline' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -module Simple_baseline' \
TARGET='$(TARGET)_baseline' INTERFACE='$(INTERFACE)' python_cpp
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -O -module Simple_optimized' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -O -module Simple_optimized' \
TARGET='$(TARGET)_optimized' INTERFACE='$(INTERFACE)' python_cpp
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -builtin -O -module Simple_builtin' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG) -builtin -O -module Simple_builtin' \
TARGET='$(TARGET)_builtin' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
rm -f $(TARGET)_*.py
diff --git a/Examples/python/pointer/Makefile b/Examples/python/pointer/Makefile
index df3bc86ff..222916fa1 100644
--- a/Examples/python/pointer/Makefile
+++ b/Examples/python/pointer/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/reference/Makefile b/Examples/python/reference/Makefile
index e940c1f43..41cded284 100644
--- a/Examples/python/reference/Makefile
+++ b/Examples/python/reference/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/simple/Makefile b/Examples/python/simple/Makefile
index df3bc86ff..222916fa1 100644
--- a/Examples/python/simple/Makefile
+++ b/Examples/python/simple/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/smartptr/Makefile b/Examples/python/smartptr/Makefile
index aaba9cbbc..19609353d 100644
--- a/Examples/python/smartptr/Makefile
+++ b/Examples/python/smartptr/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/std_map/Makefile b/Examples/python/std_map/Makefile
index 86a643415..f406dfaf4 100644
--- a/Examples/python/std_map/Makefile
+++ b/Examples/python/std_map/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/std_vector/Makefile b/Examples/python/std_vector/Makefile
index 86a643415..f406dfaf4 100644
--- a/Examples/python/std_vector/Makefile
+++ b/Examples/python/std_vector/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/swigrun/Makefile b/Examples/python/swigrun/Makefile
index c58f39caf..94f7d04e0 100644
--- a/Examples/python/swigrun/Makefile
+++ b/Examples/python/swigrun/Makefile
@@ -7,17 +7,17 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
$(SWIG) -python -external-runtime
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' $(SWIGLIB) CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
rm -f swigpyrun.h
diff --git a/Examples/python/template/Makefile b/Examples/python/template/Makefile
index 86a643415..f406dfaf4 100644
--- a/Examples/python/template/Makefile
+++ b/Examples/python/template/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/varargs/Makefile b/Examples/python/varargs/Makefile
index 15ffa24c9..8ec6e9cc9 100644
--- a/Examples/python/varargs/Makefile
+++ b/Examples/python/varargs/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/python/variables/Makefile b/Examples/python/variables/Makefile
index df3bc86ff..222916fa1 100644
--- a/Examples/python/variables/Makefile
+++ b/Examples/python/variables/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile python_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' python_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
clean:
- $(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' python_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
diff --git a/Examples/r/class/Makefile b/Examples/r/class/Makefile
index 8a64f49a9..3e5d6a6ca 100644
--- a/Examples/r/class/Makefile
+++ b/Examples/r/class/Makefile
@@ -5,11 +5,11 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile r_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' r_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' r_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' r_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' r_clean
diff --git a/Examples/r/simple/Makefile b/Examples/r/simple/Makefile
index 8a8e0e1c1..5cc41530c 100644
--- a/Examples/r/simple/Makefile
+++ b/Examples/r/simple/Makefile
@@ -5,11 +5,11 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile r_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' r_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' r
clean:
- $(MAKE) -f $(TOP)/Makefile INTERFACE='$(INTERFACE)' r_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' INTERFACE='$(INTERFACE)' r_clean
diff --git a/Examples/ruby/class/Makefile b/Examples/ruby/class/Makefile
index ef267bc44..516f842d7 100644
--- a/Examples/ruby/class/Makefile
+++ b/Examples/ruby/class/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/constants/Makefile b/Examples/ruby/constants/Makefile
index 7af9ec89e..561d5fd84 100644
--- a/Examples/ruby/constants/Makefile
+++ b/Examples/ruby/constants/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/enum/Makefile b/Examples/ruby/enum/Makefile
index ef267bc44..516f842d7 100644
--- a/Examples/ruby/enum/Makefile
+++ b/Examples/ruby/enum/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/exception_class/Makefile b/Examples/ruby/exception_class/Makefile
index f0ae7e573..6723a2a7c 100644
--- a/Examples/ruby/exception_class/Makefile
+++ b/Examples/ruby/exception_class/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/free_function/Makefile b/Examples/ruby/free_function/Makefile
index ef267bc44..516f842d7 100644
--- a/Examples/ruby/free_function/Makefile
+++ b/Examples/ruby/free_function/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/funcptr/Makefile b/Examples/ruby/funcptr/Makefile
index ddbc1ae30..15b39cf0d 100644
--- a/Examples/ruby/funcptr/Makefile
+++ b/Examples/ruby/funcptr/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/funcptr2/Makefile b/Examples/ruby/funcptr2/Makefile
index ddbc1ae30..15b39cf0d 100644
--- a/Examples/ruby/funcptr2/Makefile
+++ b/Examples/ruby/funcptr2/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/functor/Makefile b/Examples/ruby/functor/Makefile
index 662baa110..348bd66e3 100644
--- a/Examples/ruby/functor/Makefile
+++ b/Examples/ruby/functor/Makefile
@@ -5,15 +5,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/hashargs/Makefile b/Examples/ruby/hashargs/Makefile
index 3933cf279..59a36c0dd 100644
--- a/Examples/ruby/hashargs/Makefile
+++ b/Examples/ruby/hashargs/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/import/Makefile b/Examples/ruby/import/Makefile
index cd7719b5c..b5d06bdd7 100644
--- a/Examples/ruby/import/Makefile
+++ b/Examples/ruby/import/Makefile
@@ -4,17 +4,17 @@ SWIGOPT =
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='base' INTERFACE='base.i' ruby_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' ruby_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' ruby_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='spam' INTERFACE='spam.i' ruby_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/import_template/Makefile b/Examples/ruby/import_template/Makefile
index cd7719b5c..b5d06bdd7 100644
--- a/Examples/ruby/import_template/Makefile
+++ b/Examples/ruby/import_template/Makefile
@@ -4,17 +4,17 @@ SWIGOPT =
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='base' INTERFACE='base.i' ruby_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' ruby_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' ruby_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='spam' INTERFACE='spam.i' ruby_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/java/Makefile b/Examples/ruby/java/Makefile
index a71635baa..7d611abd2 100644
--- a/Examples/ruby/java/Makefile
+++ b/Examples/ruby/java/Makefile
@@ -6,17 +6,17 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build: Example.class Example.h
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
CXXSHARED="gcj -fpic -shared Example.class" LIBS="-lstdc++" DEFS='' ruby_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
rm -f *.class Example.h
-Example.class Example.h: Example.java
- gcj -fPIC -C -c -g Example.java
+Example.class Example.h: $(SRCDIR)Example.java
+ gcj -d . -fPIC -C -c -g $(SRCDIR)Example.java
gcjh Example.class
diff --git a/Examples/ruby/mark_function/Makefile b/Examples/ruby/mark_function/Makefile
index ef267bc44..516f842d7 100644
--- a/Examples/ruby/mark_function/Makefile
+++ b/Examples/ruby/mark_function/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/multimap/Makefile b/Examples/ruby/multimap/Makefile
index ddbc1ae30..15b39cf0d 100644
--- a/Examples/ruby/multimap/Makefile
+++ b/Examples/ruby/multimap/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/operator/Makefile b/Examples/ruby/operator/Makefile
index 5fd4b077b..bdcf52646 100644
--- a/Examples/ruby/operator/Makefile
+++ b/Examples/ruby/operator/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/overloading/Makefile b/Examples/ruby/overloading/Makefile
index ef267bc44..516f842d7 100644
--- a/Examples/ruby/overloading/Makefile
+++ b/Examples/ruby/overloading/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/pointer/Makefile b/Examples/ruby/pointer/Makefile
index ddbc1ae30..15b39cf0d 100644
--- a/Examples/ruby/pointer/Makefile
+++ b/Examples/ruby/pointer/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/reference/Makefile b/Examples/ruby/reference/Makefile
index ef267bc44..516f842d7 100644
--- a/Examples/ruby/reference/Makefile
+++ b/Examples/ruby/reference/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/simple/Makefile b/Examples/ruby/simple/Makefile
index ddbc1ae30..15b39cf0d 100644
--- a/Examples/ruby/simple/Makefile
+++ b/Examples/ruby/simple/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/std_vector/Makefile b/Examples/ruby/std_vector/Makefile
index 208a64495..370bd8fb6 100644
--- a/Examples/ruby/std_vector/Makefile
+++ b/Examples/ruby/std_vector/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/template/Makefile b/Examples/ruby/template/Makefile
index 208a64495..370bd8fb6 100644
--- a/Examples/ruby/template/Makefile
+++ b/Examples/ruby/template/Makefile
@@ -7,15 +7,15 @@ LIBS = -lm
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/value/Makefile b/Examples/ruby/value/Makefile
index ddbc1ae30..15b39cf0d 100644
--- a/Examples/ruby/value/Makefile
+++ b/Examples/ruby/value/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/ruby/variables/Makefile b/Examples/ruby/variables/Makefile
index ddbc1ae30..15b39cf0d 100644
--- a/Examples/ruby/variables/Makefile
+++ b/Examples/ruby/variables/Makefile
@@ -5,15 +5,15 @@ TARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile ruby_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_static
clean:
- $(MAKE) -f $(TOP)/Makefile ruby_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' ruby_clean
diff --git a/Examples/tcl/class/Makefile b/Examples/tcl/class/Makefile
index db6149cb3..aacf30e04 100644
--- a/Examples/tcl/class/Makefile
+++ b/Examples/tcl/class/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tcl_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mytclsh' INTERFACE='$(INTERFACE)' tclsh_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/constants/Makefile b/Examples/tcl/constants/Makefile
index ed4d89f52..17c8afa3f 100644
--- a/Examples/tcl/constants/Makefile
+++ b/Examples/tcl/constants/Makefile
@@ -6,15 +6,15 @@ DLTARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/contract/Makefile b/Examples/tcl/contract/Makefile
index ca6134e75..01fdc37b3 100644
--- a/Examples/tcl/contract/Makefile
+++ b/Examples/tcl/contract/Makefile
@@ -7,15 +7,15 @@ INTERFACE = example.i
SWIGOPT =
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/enum/Makefile b/Examples/tcl/enum/Makefile
index db6149cb3..aacf30e04 100644
--- a/Examples/tcl/enum/Makefile
+++ b/Examples/tcl/enum/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tcl_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mytclsh' INTERFACE='$(INTERFACE)' tclsh_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/funcptr/Makefile b/Examples/tcl/funcptr/Makefile
index 919077918..7155bf3c3 100644
--- a/Examples/tcl/funcptr/Makefile
+++ b/Examples/tcl/funcptr/Makefile
@@ -6,15 +6,15 @@ DLTARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/import/Makefile b/Examples/tcl/import/Makefile
index 81cd7c471..6aa48e7a8 100644
--- a/Examples/tcl/import/Makefile
+++ b/Examples/tcl/import/Makefile
@@ -4,18 +4,18 @@ SWIGOPT =
LIBS =
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='base' INTERFACE='base.i' tcl_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='foo' INTERFACE='foo.i' tcl_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='bar' INTERFACE='bar.i' tcl_cpp
- $(MAKE) -f $(TOP)/Makefile SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SWIG='$(SWIG)' SWIGOPT='$(SWIGOPT)' \
LIBS='$(LIBS)' TARGET='spam' INTERFACE='spam.i' tcl_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/java/Makefile b/Examples/tcl/java/Makefile
index a3819ab7c..4be3764e2 100644
--- a/Examples/tcl/java/Makefile
+++ b/Examples/tcl/java/Makefile
@@ -6,17 +6,17 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build: Example.class Example.h
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
TCLCXXSHARED="gcj -fpic -shared Example.class " LIBS="-lstdc++" DEFS='' tcl_cpp
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
rm -f *.class Example.h
-Example.class Example.h: Example.java
- gcj -fPIC -C -c -g Example.java
+Example.class Example.h: $(SRCDIR)Example.java
+ gcj -d . -fPIC -C -c -g $(SRCDIR)Example.java
gcjh Example.class
diff --git a/Examples/tcl/multimap/Makefile b/Examples/tcl/multimap/Makefile
index 919077918..7155bf3c3 100644
--- a/Examples/tcl/multimap/Makefile
+++ b/Examples/tcl/multimap/Makefile
@@ -6,15 +6,15 @@ DLTARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/operator/Makefile b/Examples/tcl/operator/Makefile
index 6c91c3d21..1c6e1be98 100644
--- a/Examples/tcl/operator/Makefile
+++ b/Examples/tcl/operator/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tcl_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mytclsh' INTERFACE='$(INTERFACE)' tclsh_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/pointer/Makefile b/Examples/tcl/pointer/Makefile
index 919077918..7155bf3c3 100644
--- a/Examples/tcl/pointer/Makefile
+++ b/Examples/tcl/pointer/Makefile
@@ -6,15 +6,15 @@ DLTARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/reference/Makefile b/Examples/tcl/reference/Makefile
index db6149cb3..aacf30e04 100644
--- a/Examples/tcl/reference/Makefile
+++ b/Examples/tcl/reference/Makefile
@@ -6,15 +6,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tcl_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='mytclsh' INTERFACE='$(INTERFACE)' tclsh_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/simple/Makefile b/Examples/tcl/simple/Makefile
index 919077918..7155bf3c3 100644
--- a/Examples/tcl/simple/Makefile
+++ b/Examples/tcl/simple/Makefile
@@ -6,15 +6,15 @@ DLTARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/std_vector/Makefile b/Examples/tcl/std_vector/Makefile
index a150fc956..f29f933ba 100644
--- a/Examples/tcl/std_vector/Makefile
+++ b/Examples/tcl/std_vector/Makefile
@@ -7,15 +7,15 @@ INTERFACE = example.i
LIBS = -lm
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl_cpp
static:
- $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh_cpp_static
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/value/Makefile b/Examples/tcl/value/Makefile
index 919077918..7155bf3c3 100644
--- a/Examples/tcl/value/Makefile
+++ b/Examples/tcl/value/Makefile
@@ -6,15 +6,15 @@ DLTARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/tcl/variables/Makefile b/Examples/tcl/variables/Makefile
index 919077918..7155bf3c3 100644
--- a/Examples/tcl/variables/Makefile
+++ b/Examples/tcl/variables/Makefile
@@ -6,15 +6,15 @@ DLTARGET = example
INTERFACE = example.i
check: build
- $(MAKE) -f $(TOP)/Makefile tcl_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(DLTARGET)' INTERFACE='$(INTERFACE)' tcl
static:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' tclsh
clean:
- $(MAKE) -f $(TOP)/Makefile tcl_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' tcl_clean
diff --git a/Examples/test-suite/allegrocl/Makefile.in b/Examples/test-suite/allegrocl/Makefile.in
index 697c15a45..2803b7012 100644
--- a/Examples/test-suite/allegrocl/Makefile.in
+++ b/Examples/test-suite/allegrocl/Makefile.in
@@ -5,9 +5,15 @@
LANGUAGE = allegrocl
ALLEGROCL = @ALLEGROCLBIN@
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 473d395fd..a530e2243 100644
--- a/Examples/test-suite/cffi/Makefile.in
+++ b/Examples/test-suite/cffi/Makefile.in
@@ -5,9 +5,15 @@
LANGUAGE = cffi
CFFI = @CFFIBIN@
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 4ee8cb0fa..ac02dad83 100644
--- a/Examples/test-suite/chicken/Makefile.in
+++ b/Examples/test-suite/chicken/Makefile.in
@@ -6,9 +6,16 @@ LANGUAGE = chicken
VARIANT =
SCRIPTSUFFIX = _runme.ss
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 1fe3c23ac..9db84c561 100644
--- a/Examples/test-suite/clisp/Makefile.in
+++ b/Examples/test-suite/clisp/Makefile.in
@@ -5,9 +5,15 @@
LANGUAGE = clisp
CLISP = @CLISPBIN@
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 bdd1cd471..37d660989 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -69,7 +69,7 @@ INCLUDES = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
LIBS = -L.
LIBPREFIX = lib
ACTION = check
-INTERFACEDIR = $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/
+INTERFACEDIR = ../
# Regenerate Makefile if Makefile.in or config.status have changed.
ifeq (,$(TEST_SUITE_SUBDIR))
@@ -688,14 +688,14 @@ partialcheck:
$(MAKE) check CC=true CXX=true LDSHARED=true CXXSHARED=true RUNTOOL=true COMPILETOOL=true
swig_and_compile_cpp = \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CXXSRCS="$(CXXSRCS)" \
+ $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR="$(SRCDIR)" CXXSRCS="$(CXXSRCS)" \
SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" \
INCLUDES="$(INCLUDES)" SWIGOPT="$(SWIGOPT)" NOLINK=true \
TARGET="$(TARGETPREFIX)$*$(TARGETSUFFIX)" INTERFACEDIR="$(INTERFACEDIR)" INTERFACE="$*.i" \
$(LANGUAGE)$(VARIANT)_cpp
swig_and_compile_c = \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CSRCS="$(CSRCS)" \
+ $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR="$(SRCDIR)" CSRCS="$(CSRCS)" \
SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" \
INCLUDES="$(INCLUDES)" SWIGOPT="$(SWIGOPT)" NOLINK=true \
TARGET="$(TARGETPREFIX)$*$(TARGETSUFFIX)" INTERFACEDIR="$(INTERFACEDIR)" INTERFACE="$*.i" \
@@ -703,7 +703,7 @@ swig_and_compile_c = \
swig_and_compile_multi_cpp = \
for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CXXSRCS="$(CXXSRCS)" \
+ $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR="$(SRCDIR)" CXXSRCS="$(CXXSRCS)" \
SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" LIBS='$(LIBS)' \
INCLUDES="$(INCLUDES)" SWIGOPT="$(SWIGOPT)" NOLINK=true \
TARGET="$(TARGETPREFIX)$${f}$(TARGETSUFFIX)" INTERFACEDIR="$(INTERFACEDIR)" INTERFACE="$$f.i" \
@@ -711,11 +711,11 @@ swig_and_compile_multi_cpp = \
done
swig_and_compile_external = \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile \
+ $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR="$(SRCDIR)" \
SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" \
TARGET="$*_wrap_hdr.h" \
$(LANGUAGE)$(VARIANT)_externalhdr; \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CXXSRCS="$(CXXSRCS) $*_external.cxx" \
+ $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR="$(SRCDIR)" CXXSRCS="$(CXXSRCS) $*_external.cxx" \
SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" \
INCLUDES="$(INCLUDES)" SWIGOPT="$(SWIGOPT)" NOLINK=true \
TARGET="$(TARGETPREFIX)$*$(TARGETSUFFIX)" INTERFACEDIR="$(INTERFACEDIR)" INTERFACE="$*.i" \
@@ -724,7 +724,7 @@ swig_and_compile_external = \
swig_and_compile_runtime = \
setup = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
else \
echo "$(ACTION)ing $(LANGUAGE) testcase $*" ; \
diff --git a/Examples/test-suite/csharp/Makefile.in b/Examples/test-suite/csharp/Makefile.in
index e54edcc35..a2a0828fd 100644
--- a/Examples/test-suite/csharp/Makefile.in
+++ b/Examples/test-suite/csharp/Makefile.in
@@ -3,14 +3,21 @@
#######################################################################
LANGUAGE = csharp
+SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.cs
CSHARPCILINTERPRETER = @CSHARPCILINTERPRETER@
CSHARPCILINTERPRETER_FLAGS = @CSHARPCILINTERPRETER_FLAGS@
CSHARPPATHSEPARATOR = "@CSHARPPATHSEPARATOR@"
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 \
@@ -57,7 +64,7 @@ csharp_swig2_compatibility.cpptest: SWIGOPT += -DSWIG2_CSHARP
# Makes a directory for the testcase if it does not exist
setup = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
else \
echo "$(ACTION)ing $(LANGUAGE) testcase $*" ; \
@@ -71,10 +78,10 @@ setup = \
# Note C# uses LD_LIBRARY_PATH under Unix, PATH under Cygwin/Windows and SHLIB_PATH on HPUX.
# DYLD_FALLBACK_LIBRARY_PATH is cleared for MacOSX.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
$(MAKE) -f $*/$(top_builddir)/$(EXAMPLES)/Makefile \
CSHARPFLAGS='-nologo -debug+ $(CSHARPFLAGSSPECIAL) -out:$*_runme.exe' \
- CSHARPSRCS='`$(CSHARPCYGPATH_W) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)` `find $* -name "*.cs" -exec $(CSHARPCYGPATH_W) "{}" \+`' csharp_compile && \
+ CSHARPSRCS='`$(CSHARPCYGPATH_W) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)` `find $* -name "*.cs" -exec $(CSHARPCYGPATH_W) "{}" \+`' csharp_compile && \
env LD_LIBRARY_PATH="$*:$$LD_LIBRARY_PATH" PATH="$*:$$PATH" SHLIB_PATH="$*:$$SHLIB_PATH" DYLD_FALLBACK_LIBRARY_PATH= $(RUNTOOL) $(CSHARPCILINTERPRETER) $(CSHARPCILINTERPRETER_FLAGS) ./$*_runme.exe; \
else \
cd $* && \
diff --git a/Examples/test-suite/d/Makefile.in b/Examples/test-suite/d/Makefile.in
index 61c2749dc..0542bbad0 100644
--- a/Examples/test-suite/d/Makefile.in
+++ b/Examples/test-suite/d/Makefile.in
@@ -3,9 +3,15 @@
#######################################################################
LANGUAGE = d
+
srcdir = @srcdir@
-top_srcdir = ../@top_srcdir@
-top_builddir = ../@top_builddir@
+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 843283e7c..c74e9c65b 100644
--- a/Examples/test-suite/errors/Makefile.in
+++ b/Examples/test-suite/errors/Makefile.in
@@ -22,9 +22,18 @@ 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')
+STRIP_SRCDIR = sed 's|^$(srcdir_regexp)||'
# All .i files with prefix 'cpp_' will be treated as C++ input and remaining .i files as C input
-ALL_ERROR_TEST_CASES := $(patsubst %.i,%, $(wildcard *.i))
+ALL_ERROR_TEST_CASES := $(patsubst %.i,%, $(notdir $(wildcard $(srcdir)/*.i)))
CPP_ERROR_TEST_CASES := $(filter cpp_%, $(ALL_ERROR_TEST_CASES))
C_ERROR_TEST_CASES := $(filter-out $(CPP_ERROR_TEST_CASES), $(ALL_ERROR_TEST_CASES))
@@ -40,13 +49,13 @@ include $(srcdir)/../common.mk
# Rules for the different types of tests
%.cpptest:
echo "$(ACTION)ing errors testcase $*"
- -$(SWIG) -c++ -python -Wall -Fstandard $(SWIGOPT) $*.i 2>&1 | $(TODOS) > $*.$(ERROR_EXT)
- $(COMPILETOOL) diff -c $*.stderr $*.$(ERROR_EXT)
+ -$(SWIG) -c++ -python -Wall -Fstandard $(SWIGOPT) $(srcdir)/$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT)
+ $(COMPILETOOL) diff -c $(srcdir)/$*.stderr $*.$(ERROR_EXT)
%.ctest:
echo "$(ACTION)ing errors testcase $*"
- -$(SWIG) -python -Wall -Fstandard $(SWIGOPT) $*.i 2>&1 | $(TODOS) > $*.$(ERROR_EXT)
- $(COMPILETOOL) diff -c $*.stderr $*.$(ERROR_EXT)
+ -$(SWIG) -python -Wall -Fstandard $(SWIGOPT) $(srcdir)/$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT)
+ $(COMPILETOOL) diff -c $(srcdir)/$*.stderr $*.$(ERROR_EXT)
%.clean:
@exit 0
diff --git a/Examples/test-suite/go/Makefile.in b/Examples/test-suite/go/Makefile.in
index 64a84f820..03f6f151e 100644
--- a/Examples/test-suite/go/Makefile.in
+++ b/Examples/test-suite/go/Makefile.in
@@ -9,6 +9,7 @@ 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`
@@ -23,6 +24,11 @@ SO = @SO@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
+ifeq (.,$(srcdir))
+SRCDIR =
+else
+SRCDIR = $(srcdir)/
+endif
include $(srcdir)/../common.mk
@@ -47,7 +53,7 @@ include $(srcdir)/../common.mk
multi_import.multicpptest:
$(setup)
for f in multi_import_b multi_import_a; do \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile CXXSRCS="$(CXXSRCS)" \
+ $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR="$(SRCDIR)" CXXSRCS="$(CXXSRCS)" \
SWIG_LIB="$(SWIG_LIB)" SWIG="$(SWIG)" LIBS='$(LIBS)' \
INCLUDES="$(INCLUDES)" SWIGOPT="$(SWIGOPT)" NOLINK=true \
TARGET="$(TARGETPREFIX)$${f}$(TARGETSUFFIX)" INTERFACEDIR="$(INTERFACEDIR)" INTERFACE="$$f.i" \
@@ -57,8 +63,8 @@ multi_import.multicpptest:
# Runs the testcase.
run_testcase = \
- if test -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); then \
- $(COMPILETOOL) $(GO) $(GOCOMPILEARG) -I . $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
+ if test -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); then \
+ $(COMPILETOOL) $(GO) $(GOCOMPILEARG) -I . $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
if $(GOGCC) ; then \
$(COMPILETOOL) $(GO) -o $*_runme $(SCRIPTPREFIX)$*_runme.@OBJEXT@ $*.@OBJEXT@ $*_wrap.@OBJEXT@; \
elif $(GO12) || $(GO13); then \
@@ -70,8 +76,8 @@ run_testcase = \
fi
run_testcase_cpp = \
- if test -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); then \
- $(COMPILETOOL) $(GO) $(GOCOMPILEARG) -I . $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
+ if test -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); then \
+ $(COMPILETOOL) $(GO) $(GOCOMPILEARG) -I . $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
if $(GOGCC) ; then \
$(COMPILETOOL) $(GO) -o $*_runme $(SCRIPTPREFIX)$*_runme.@OBJEXT@ $*.@OBJEXT@ $*_wrap.@OBJEXT@ -lstdc++; \
elif $(GO12) || $(GO13); then \
@@ -83,8 +89,8 @@ run_testcase_cpp = \
fi
run_multi_testcase = \
- if test -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); then \
- $(COMPILETOOL) $(GO) $(GOCOMPILEARG) -I . $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
+ if test -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); then \
+ $(COMPILETOOL) $(GO) $(GOCOMPILEARG) -I . $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
if $(GOGCC) ; then \
files=`cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list`; \
$(COMPILETOOL) $(GO) -o $*_runme $(SCRIPTPREFIX)$*_runme.@OBJEXT@ `for f in $$files; do echo $$f.@OBJEXT@ $${f}_wrap.@OBJEXT@; done` -lstdc++; \
diff --git a/Examples/test-suite/guile/Makefile.in b/Examples/test-suite/guile/Makefile.in
index 493dde4f5..5ac3de685 100644
--- a/Examples/test-suite/guile/Makefile.in
+++ b/Examples/test-suite/guile/Makefile.in
@@ -6,10 +6,18 @@ 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=
@@ -51,8 +59,8 @@ INCLUDES += -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/guile
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.scm appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env GUILE_AUTO_COMPILE=0 LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(GUILE) -l $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env GUILE_AUTO_COMPILE=0 LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(GUILE) -l $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean
diff --git a/Examples/test-suite/java/Makefile.in b/Examples/test-suite/java/Makefile.in
index e4e803d2a..a61452ed2 100644
--- a/Examples/test-suite/java/Makefile.in
+++ b/Examples/test-suite/java/Makefile.in
@@ -6,10 +6,17 @@ 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 \
@@ -72,7 +79,7 @@ director_nspace_director_name_collision.%: JAVA_PACKAGE = $*Package
# Makes a directory for the testcase if it does not exist
setup = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
else \
echo "$(ACTION)ing $(LANGUAGE) testcase $*" ; \
@@ -86,8 +93,8 @@ setup = \
# Note Java uses LD_LIBRARY_PATH under Unix, PATH under Cygwin/Windows, SHLIB_PATH on HPUX and DYLD_LIBRARY_PATH on Mac OS X.
run_testcase = \
cd $(JAVA_PACKAGE) && $(COMPILETOOL) $(JAVAC) -classpath . `find . -name "*.java"` && cd .. && \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- $(COMPILETOOL) $(JAVAC) -classpath . -d . $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ $(COMPILETOOL) $(JAVAC) -classpath . -d . $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
env LD_LIBRARY_PATH="$(JAVA_PACKAGE):$$LD_LIBRARY_PATH" PATH="$(JAVA_PACKAGE):$$PATH" SHLIB_PATH="$(JAVA_PACKAGE):$$SHLIB_PATH" DYLD_LIBRARY_PATH="$(JAVA_PACKAGE):$$DYLD_LIBRARY_PATH" $(RUNTOOL) $(JAVA) $(JAVAFLAGS) -classpath . $*_runme; \
fi
diff --git a/Examples/test-suite/javascript/Makefile.in b/Examples/test-suite/javascript/Makefile.in
index 7368ea9a3..6126bde74 100644
--- a/Examples/test-suite/javascript/Makefile.in
+++ b/Examples/test-suite/javascript/Makefile.in
@@ -4,10 +4,18 @@
LANGUAGE = javascript
NODEGYP = @NODEGYP@
+NODEJS = @NODEJS@
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
ifneq (, $(ENGINE))
@@ -47,20 +55,27 @@ ifeq (node,$(JSENGINE))
constant_pointers.cpptest: GYP_CFLAGS = \"-Wno-ignored-qualifiers\"
enum_thorough.cpptest: GYP_CFLAGS = \"-Wno-ignored-qualifiers\"
+ setup_node = \
+ test -d $* || mkdir $*; \
+ sed -e 's|$$testcase|$*|g; s|$$cflags|$(GYP_CFLAGS)|g; s|$$srcdir|$(srcdir)|g' \
+ $(srcdir)/node_template/binding.gyp.in > $*/binding.gyp; \
+ sed -e 's|$$testcase|$*|g;' \
+ $(srcdir)/node_template/index.js.in > $*/index.js
+
# Note: we need to use swig in C parse mode, but make node-gyp believe it is c++ (via file extension)
swig_and_compile_c = \
- sh ./setup_test.sh $* $(GYP_CFLAGS); \
- $(SWIG) -javascript $(SWIGOPT) -o $*_wrap.cxx ../$*.i; \
+ $(setup_node); \
+ $(SWIG) -javascript $(SWIGOPT) -o $*_wrap.cxx $(srcdir)/../$*.i; \
$(NODEGYP) --loglevel=silent --directory $* configure build 1>>/dev/null
swig_and_compile_cpp = \
- sh ./setup_test.sh $* $(GYP_CFLAGS); \
- $(SWIG) -c++ -javascript $(SWIGOPT) ../$*.i; \
+ $(setup_node); \
+ $(SWIG) -c++ -javascript $(SWIGOPT) $(srcdir)/../$*.i; \
$(NODEGYP) --loglevel=silent --directory $* configure build 1>>/dev/null
run_testcase = \
if [ -f $(srcdir)/$*$(SCRIPTSUFFIX) ]; then \
- node $(srcdir)/$*$(SCRIPTSUFFIX); \
+ env NODE_PATH=$$PWD:$(srcdir) $(NODEJS) $(srcdir)/$*$(SCRIPTSUFFIX); \
fi
@@ -83,7 +98,7 @@ else
run_testcase = \
if [ -f $(srcdir)/$*$(SCRIPTSUFFIX) ]; then \
- $(top_srcdir)/Tools/javascript/javascript -$(JSENGINE) $(srcdir)/$*$(SCRIPTSUFFIX); \
+ $(top_builddir)/Tools/javascript/javascript -$(JSENGINE) $(srcdir)/$*$(SCRIPTSUFFIX); \
fi
%.ctest:
diff --git a/Examples/test-suite/javascript/abstract_access_runme.js b/Examples/test-suite/javascript/abstract_access_runme.js
index 8f87d2105..f61bb4358 100644
--- a/Examples/test-suite/javascript/abstract_access_runme.js
+++ b/Examples/test-suite/javascript/abstract_access_runme.js
@@ -1,4 +1,4 @@
-var abstract_access = require("./abstract_access");
+var abstract_access = require("abstract_access");
var d = new abstract_access.D()
if (d.do_x() != 1) {
diff --git a/Examples/test-suite/javascript/abstract_inherit_runme.js b/Examples/test-suite/javascript/abstract_inherit_runme.js
index 3af2eae74..f732e8767 100644
--- a/Examples/test-suite/javascript/abstract_inherit_runme.js
+++ b/Examples/test-suite/javascript/abstract_inherit_runme.js
@@ -1,4 +1,4 @@
-var abstract_inherit = require("./abstract_inherit");
+var abstract_inherit = require("abstract_inherit");
// Shouldn't be able to instantiate any of these classes
// since none of them implements the pure virtual function
diff --git a/Examples/test-suite/javascript/abstract_typedef2_runme.js b/Examples/test-suite/javascript/abstract_typedef2_runme.js
index c177e49c3..d8a533ab1 100644
--- a/Examples/test-suite/javascript/abstract_typedef2_runme.js
+++ b/Examples/test-suite/javascript/abstract_typedef2_runme.js
@@ -1,4 +1,4 @@
-var abstract_typedef2 = require("./abstract_typedef2");
+var abstract_typedef2 = require("abstract_typedef2");
var a = new abstract_typedef2.A_UF();
diff --git a/Examples/test-suite/javascript/abstract_typedef_runme.js b/Examples/test-suite/javascript/abstract_typedef_runme.js
index abcfc581d..286328fa8 100644
--- a/Examples/test-suite/javascript/abstract_typedef_runme.js
+++ b/Examples/test-suite/javascript/abstract_typedef_runme.js
@@ -1,4 +1,4 @@
-var abstract_typedef = require("./abstract_typedef");
+var abstract_typedef = require("abstract_typedef");
var e = new abstract_typedef.Engine();
var a = new abstract_typedef.A()
diff --git a/Examples/test-suite/javascript/abstract_virtual_runme.js b/Examples/test-suite/javascript/abstract_virtual_runme.js
index 9e2814e41..9a9ce9988 100644
--- a/Examples/test-suite/javascript/abstract_virtual_runme.js
+++ b/Examples/test-suite/javascript/abstract_virtual_runme.js
@@ -1,4 +1,4 @@
-var abstract_virtual = require("./abstract_virtual");
+var abstract_virtual = require("abstract_virtual");
d = new abstract_virtual.D()
diff --git a/Examples/test-suite/javascript/array_member_runme.js b/Examples/test-suite/javascript/array_member_runme.js
index 8c4ef1da5..3d9bb0e5b 100644
--- a/Examples/test-suite/javascript/array_member_runme.js
+++ b/Examples/test-suite/javascript/array_member_runme.js
@@ -1,4 +1,4 @@
-var array_member = require("./array_member");
+var array_member = require("array_member");
var f = new array_member.Foo();
f.data = array_member.global_data;
diff --git a/Examples/test-suite/javascript/arrays_global_runme.js b/Examples/test-suite/javascript/arrays_global_runme.js
index fdb365f83..0cbb28efb 100644
--- a/Examples/test-suite/javascript/arrays_global_runme.js
+++ b/Examples/test-suite/javascript/arrays_global_runme.js
@@ -1,4 +1,4 @@
-var arrays_global = require("./arrays_global");
+var arrays_global = require("arrays_global");
arrays_global.array_i = arrays_global.array_const_i;
diff --git a/Examples/test-suite/javascript/callback_runme.js b/Examples/test-suite/javascript/callback_runme.js
index 9b1ef01a3..021888641 100644
--- a/Examples/test-suite/javascript/callback_runme.js
+++ b/Examples/test-suite/javascript/callback_runme.js
@@ -1,4 +1,4 @@
-var callback = require("./callback");
+var callback = require("callback");
if (callback.foo(2) !== 2) {
throw new Error("Failed.");
diff --git a/Examples/test-suite/javascript/char_binary_runme.js b/Examples/test-suite/javascript/char_binary_runme.js
index 42abe6060..b2aac920c 100644
--- a/Examples/test-suite/javascript/char_binary_runme.js
+++ b/Examples/test-suite/javascript/char_binary_runme.js
@@ -1,4 +1,4 @@
-var char_binary = require("./char_binary");
+var char_binary = require("char_binary");
var t = new char_binary.Test();
if (t.strlen('hile') != 4) {
diff --git a/Examples/test-suite/javascript/char_strings_runme.js b/Examples/test-suite/javascript/char_strings_runme.js
index cca50d851..fe17cb982 100644
--- a/Examples/test-suite/javascript/char_strings_runme.js
+++ b/Examples/test-suite/javascript/char_strings_runme.js
@@ -1,4 +1,4 @@
-var char_strings = require("./char_strings");
+var char_strings = require("char_strings");
var assertIsEqual = function(expected, actual) {
if (expected !== actual) {
diff --git a/Examples/test-suite/javascript/class_ignore_runme.js b/Examples/test-suite/javascript/class_ignore_runme.js
index f0a32a1c4..ffbe021c7 100644
--- a/Examples/test-suite/javascript/class_ignore_runme.js
+++ b/Examples/test-suite/javascript/class_ignore_runme.js
@@ -1,4 +1,4 @@
-var class_ignore = require("./class_ignore");
+var class_ignore = require("class_ignore");
a = new class_ignore.Bar();
diff --git a/Examples/test-suite/javascript/class_scope_weird_runme.js b/Examples/test-suite/javascript/class_scope_weird_runme.js
index ac745d023..73c118d61 100644
--- a/Examples/test-suite/javascript/class_scope_weird_runme.js
+++ b/Examples/test-suite/javascript/class_scope_weird_runme.js
@@ -1,4 +1,4 @@
-var class_scope_weird = require("./class_scope_weird");
+var class_scope_weird = require("class_scope_weird");
f = new class_scope_weird.Foo();
g = new class_scope_weird.Foo(3);
diff --git a/Examples/test-suite/javascript/complextest_runme.js b/Examples/test-suite/javascript/complextest_runme.js
index 1fcc97648..b87d6bffa 100644
--- a/Examples/test-suite/javascript/complextest_runme.js
+++ b/Examples/test-suite/javascript/complextest_runme.js
@@ -1,4 +1,4 @@
-var complextest = require("./complextest");
+var complextest = require("complextest");
a = [-1,2];
diff --git a/Examples/test-suite/javascript/constover_runme.js b/Examples/test-suite/javascript/constover_runme.js
index 764d8b328..9b192b5ff 100644
--- a/Examples/test-suite/javascript/constover_runme.js
+++ b/Examples/test-suite/javascript/constover_runme.js
@@ -1,4 +1,4 @@
-var constover = require("./constover");
+var constover = require("constover");
p = constover.test("test");
if (p != "test") {
diff --git a/Examples/test-suite/javascript/constructor_copy_runme.js b/Examples/test-suite/javascript/constructor_copy_runme.js
index 39dce52ce..179b9fb40 100644
--- a/Examples/test-suite/javascript/constructor_copy_runme.js
+++ b/Examples/test-suite/javascript/constructor_copy_runme.js
@@ -1,4 +1,4 @@
-var constructor_copy = require("./constructor_copy");
+var constructor_copy = require("constructor_copy");
f1 = new constructor_copy.Foo1(3);
f11 = new constructor_copy.Foo1(f1);
diff --git a/Examples/test-suite/javascript/cpp_enum_runme.js b/Examples/test-suite/javascript/cpp_enum_runme.js
index 35f7c60ac..8a248c372 100644
--- a/Examples/test-suite/javascript/cpp_enum_runme.js
+++ b/Examples/test-suite/javascript/cpp_enum_runme.js
@@ -1,4 +1,4 @@
-var cpp_enum = require("./cpp_enum");
+var cpp_enum = require("cpp_enum");
var f = new cpp_enum.Foo()
diff --git a/Examples/test-suite/javascript/cpp_namespace_runme.js b/Examples/test-suite/javascript/cpp_namespace_runme.js
index 3bdfef3e9..a6ab79964 100644
--- a/Examples/test-suite/javascript/cpp_namespace_runme.js
+++ b/Examples/test-suite/javascript/cpp_namespace_runme.js
@@ -1,4 +1,4 @@
-var cpp_namespace = require("./cpp_namespace");
+var cpp_namespace = require("cpp_namespace");
var n = cpp_namespace.fact(4);
if (n != 24){
diff --git a/Examples/test-suite/javascript/cpp_static_runme.js b/Examples/test-suite/javascript/cpp_static_runme.js
index 2579aeafe..c7917e12e 100644
--- a/Examples/test-suite/javascript/cpp_static_runme.js
+++ b/Examples/test-suite/javascript/cpp_static_runme.js
@@ -1,4 +1,4 @@
-var cpp_static = require("./cpp_static");
+var cpp_static = require("cpp_static");
cpp_static.StaticFunctionTest.static_func();
cpp_static.StaticFunctionTest.static_func_2(1);
diff --git a/Examples/test-suite/javascript/director_alternating_runme.js b/Examples/test-suite/javascript/director_alternating_runme.js
index a0411eace..cff288d35 100644
--- a/Examples/test-suite/javascript/director_alternating_runme.js
+++ b/Examples/test-suite/javascript/director_alternating_runme.js
@@ -1,4 +1,4 @@
-var director_alternating = require("./director_alternating");
+var director_alternating = require("director_alternating");
id = director_alternating.getBar().id();
if (id != director_alternating.idFromGetBar())
diff --git a/Examples/test-suite/javascript/disown_runme.js b/Examples/test-suite/javascript/disown_runme.js
index a4a6fd880..ea742b51e 100644
--- a/Examples/test-suite/javascript/disown_runme.js
+++ b/Examples/test-suite/javascript/disown_runme.js
@@ -1,4 +1,4 @@
-var disown = require("./disown");
+var disown = require("disown");
var a = new disown.A();
var tmp = a.thisown;
diff --git a/Examples/test-suite/javascript/dynamic_cast_runme.js b/Examples/test-suite/javascript/dynamic_cast_runme.js
index 0029cb0f8..32eabcf8b 100644
--- a/Examples/test-suite/javascript/dynamic_cast_runme.js
+++ b/Examples/test-suite/javascript/dynamic_cast_runme.js
@@ -1,4 +1,4 @@
-var dynamic_cast = require("./dynamic_cast");
+var dynamic_cast = require("dynamic_cast");
var f = new dynamic_cast.Foo();
var b = new dynamic_cast.Bar();
diff --git a/Examples/test-suite/javascript/empty_runme.js b/Examples/test-suite/javascript/empty_runme.js
index db06b3902..7894379be 100644
--- a/Examples/test-suite/javascript/empty_runme.js
+++ b/Examples/test-suite/javascript/empty_runme.js
@@ -1 +1 @@
-var empty = require("./empty");
\ No newline at end of file
+var empty = require("empty");
\ No newline at end of file
diff --git a/Examples/test-suite/javascript/enum_template_runme.js b/Examples/test-suite/javascript/enum_template_runme.js
index 20f8c3482..1e71e5f64 100644
--- a/Examples/test-suite/javascript/enum_template_runme.js
+++ b/Examples/test-suite/javascript/enum_template_runme.js
@@ -1,4 +1,4 @@
-var enum_template = require("./enum_template");
+var enum_template = require("enum_template");
if (enum_template.MakeETest() != 1)
throw "RuntimeError";
diff --git a/Examples/test-suite/javascript/infinity_runme.js b/Examples/test-suite/javascript/infinity_runme.js
index 7b5182ff6..050c391a7 100644
--- a/Examples/test-suite/javascript/infinity_runme.js
+++ b/Examples/test-suite/javascript/infinity_runme.js
@@ -1,4 +1,4 @@
-var infinity = require("./infinity");
+var infinity = require("infinity");
var my_infinity = infinity.INFINITY;
var ret_val = infinity.use_infinity(my_infinity);
diff --git a/Examples/test-suite/javascript/namespace_virtual_method_runme.js b/Examples/test-suite/javascript/namespace_virtual_method_runme.js
index 24d3bd487..4f1e05c84 100644
--- a/Examples/test-suite/javascript/namespace_virtual_method_runme.js
+++ b/Examples/test-suite/javascript/namespace_virtual_method_runme.js
@@ -1,3 +1,3 @@
-var namespace_virtual_method = require("./namespace_virtual_method");
+var namespace_virtual_method = require("namespace_virtual_method");
x = new namespace_virtual_method.Spam();
diff --git a/Examples/test-suite/javascript/node_template/binding.gyp.in b/Examples/test-suite/javascript/node_template/binding.gyp.in
index 209774ae0..a82ac2f3e 100644
--- a/Examples/test-suite/javascript/node_template/binding.gyp.in
+++ b/Examples/test-suite/javascript/node_template/binding.gyp.in
@@ -3,7 +3,7 @@
{
"target_name": "$testcase",
"sources":[ "../$testcase_wrap.cxx" ],
- "include_dirs": ["../.."],
+ "include_dirs": ["../$srcdir/.."],
'defines': [
'BUILDING_NODE_EXTENSION=1',
],
diff --git a/Examples/test-suite/javascript/nspace_extend_runme.js b/Examples/test-suite/javascript/nspace_extend_runme.js
index ab81c19d3..8cabfe945 100644
--- a/Examples/test-suite/javascript/nspace_extend_runme.js
+++ b/Examples/test-suite/javascript/nspace_extend_runme.js
@@ -1,4 +1,4 @@
-var nspace_extend = require("./nspace_extend");
+var nspace_extend = require("nspace_extend");
// constructors and destructors
var color1 = new nspace_extend.Outer.Inner1.Color();
diff --git a/Examples/test-suite/javascript/nspace_runme.js b/Examples/test-suite/javascript/nspace_runme.js
index f1afff428..993610dd6 100644
--- a/Examples/test-suite/javascript/nspace_runme.js
+++ b/Examples/test-suite/javascript/nspace_runme.js
@@ -1,4 +1,4 @@
-var nspace = require("./nspace");
+var nspace = require("nspace");
var color1 = new nspace.Outer.Inner1.Color();
var color = new nspace.Outer.Inner1.Color(color1);
diff --git a/Examples/test-suite/javascript/overload_copy_runme.js b/Examples/test-suite/javascript/overload_copy_runme.js
index 1039ffda1..e2f610788 100644
--- a/Examples/test-suite/javascript/overload_copy_runme.js
+++ b/Examples/test-suite/javascript/overload_copy_runme.js
@@ -1,4 +1,4 @@
-var overload_copy = require("./overload_copy");
+var overload_copy = require("overload_copy");
f = new overload_copy.Foo();
g = new overload_copy.Foo(f);
diff --git a/Examples/test-suite/javascript/preproc_include_runme.js b/Examples/test-suite/javascript/preproc_include_runme.js
index 4b827fbcc..5ec72b842 100644
--- a/Examples/test-suite/javascript/preproc_include_runme.js
+++ b/Examples/test-suite/javascript/preproc_include_runme.js
@@ -1,4 +1,4 @@
-var preproc_include = require("./preproc_include");
+var preproc_include = require("preproc_include");
if (preproc_include.multiply10(10) != 100)
throw "RuntimeError";
diff --git a/Examples/test-suite/javascript/preproc_runme.js b/Examples/test-suite/javascript/preproc_runme.js
index 669f9d1f0..167ca5ac1 100644
--- a/Examples/test-suite/javascript/preproc_runme.js
+++ b/Examples/test-suite/javascript/preproc_runme.js
@@ -1,4 +1,4 @@
-var preproc = require("./preproc");
+var preproc = require("preproc");
if (preproc.endif != 1)
throw "RuntimeError";
diff --git a/Examples/test-suite/javascript/rename1_runme.js b/Examples/test-suite/javascript/rename1_runme.js
index 8374e6a89..68ecc11b6 100644
--- a/Examples/test-suite/javascript/rename1_runme.js
+++ b/Examples/test-suite/javascript/rename1_runme.js
@@ -1,4 +1,4 @@
-var rename = require("./rename1");
+var rename = require("rename1");
function part1() {
var xyz = new rename.XYZInt();
diff --git a/Examples/test-suite/javascript/rename2_runme.js b/Examples/test-suite/javascript/rename2_runme.js
index bc6a95a59..99f478596 100644
--- a/Examples/test-suite/javascript/rename2_runme.js
+++ b/Examples/test-suite/javascript/rename2_runme.js
@@ -1,4 +1,4 @@
-var rename = require("./rename2");
+var rename = require("rename2");
function part1() {
var xyz = new rename.XYZInt();
diff --git a/Examples/test-suite/javascript/rename3_runme.js b/Examples/test-suite/javascript/rename3_runme.js
index 9e57e80ea..237029fbb 100644
--- a/Examples/test-suite/javascript/rename3_runme.js
+++ b/Examples/test-suite/javascript/rename3_runme.js
@@ -1,4 +1,4 @@
-var rename = require("./rename3");
+var rename = require("rename3");
function part1() {
var xyz = new rename.XYZInt();
diff --git a/Examples/test-suite/javascript/rename4_runme.js b/Examples/test-suite/javascript/rename4_runme.js
index d651fc7a1..fed50dceb 100644
--- a/Examples/test-suite/javascript/rename4_runme.js
+++ b/Examples/test-suite/javascript/rename4_runme.js
@@ -1,4 +1,4 @@
-var rename = require("./rename4");
+var rename = require("rename4");
function part1() {
var xyz = new rename.XYZInt();
diff --git a/Examples/test-suite/javascript/rename_scope_runme.js b/Examples/test-suite/javascript/rename_scope_runme.js
index c0226df69..fea4d2ca9 100644
--- a/Examples/test-suite/javascript/rename_scope_runme.js
+++ b/Examples/test-suite/javascript/rename_scope_runme.js
@@ -1,4 +1,4 @@
-var rename_scope = require("./rename_scope");
+var rename_scope = require("rename_scope");
var a = new rename_scope.Natural_UP();
var b = new rename_scope.Natural_BP();
diff --git a/Examples/test-suite/javascript/rename_simple_runme.js b/Examples/test-suite/javascript/rename_simple_runme.js
index 918dd68a5..21350cd3e 100644
--- a/Examples/test-suite/javascript/rename_simple_runme.js
+++ b/Examples/test-suite/javascript/rename_simple_runme.js
@@ -1,4 +1,4 @@
-var rename_simple = require("./rename_simple");
+var rename_simple = require("rename_simple");
var NewStruct = rename_simple.NewStruct;
var s = new NewStruct();
diff --git a/Examples/test-suite/javascript/ret_by_value_runme.js b/Examples/test-suite/javascript/ret_by_value_runme.js
index d9a77a20b..9d0840602 100644
--- a/Examples/test-suite/javascript/ret_by_value_runme.js
+++ b/Examples/test-suite/javascript/ret_by_value_runme.js
@@ -1,4 +1,4 @@
-var ret_by_value = require("./ret_by_value");
+var ret_by_value = require("ret_by_value");
a = ret_by_value.get_test();
if (a.myInt != 100)
diff --git a/Examples/test-suite/javascript/setup_test.sh b/Examples/test-suite/javascript/setup_test.sh
deleted file mode 100644
index 913a74c4b..000000000
--- a/Examples/test-suite/javascript/setup_test.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-if [ ! -d $1 ]; then
- mkdir $1;
-fi
-sed -e "s/\$testcase/$1/" -e "s/\$cflags/$2/" < node_template/binding.gyp.in > $1/binding.gyp
-sed s/\$testcase/$1/ node_template/index.js.in > $1/index.js
diff --git a/Examples/test-suite/javascript/string_simple_runme.js b/Examples/test-suite/javascript/string_simple_runme.js
index dbdd4136d..39ae84e9e 100644
--- a/Examples/test-suite/javascript/string_simple_runme.js
+++ b/Examples/test-suite/javascript/string_simple_runme.js
@@ -1,4 +1,4 @@
-var string_simple = require("./string_simple");
+var string_simple = require("string_simple");
// Test unicode string
var str = "olé";
diff --git a/Examples/test-suite/javascript/struct_value_runme.js b/Examples/test-suite/javascript/struct_value_runme.js
index d6b26f726..5b171b8fe 100644
--- a/Examples/test-suite/javascript/struct_value_runme.js
+++ b/Examples/test-suite/javascript/struct_value_runme.js
@@ -1,4 +1,4 @@
-var struct_value = require("./struct_value");
+var struct_value = require("struct_value");
b = new struct_value.Bar();
diff --git a/Examples/test-suite/javascript/template_static_runme.js b/Examples/test-suite/javascript/template_static_runme.js
index 477d97249..d6106138a 100644
--- a/Examples/test-suite/javascript/template_static_runme.js
+++ b/Examples/test-suite/javascript/template_static_runme.js
@@ -1,3 +1,3 @@
-var template_static = require("./template_static");
+var template_static = require("template_static");
template_static.Foo.bar_double(1);
diff --git a/Examples/test-suite/javascript/typedef_class_runme.js b/Examples/test-suite/javascript/typedef_class_runme.js
index 3e4dc9093..64e0051c3 100644
--- a/Examples/test-suite/javascript/typedef_class_runme.js
+++ b/Examples/test-suite/javascript/typedef_class_runme.js
@@ -1,4 +1,4 @@
-var typedef_class = require("./typedef_class");
+var typedef_class = require("typedef_class");
a = new typedef_class.RealA();
a.a = 3;
diff --git a/Examples/test-suite/javascript/typedef_inherit_runme.js b/Examples/test-suite/javascript/typedef_inherit_runme.js
index 4abcc2536..7590e1e6e 100644
--- a/Examples/test-suite/javascript/typedef_inherit_runme.js
+++ b/Examples/test-suite/javascript/typedef_inherit_runme.js
@@ -1,4 +1,4 @@
-var typedef_inherit = require("./typedef_inherit");
+var typedef_inherit = require("typedef_inherit");
a = new typedef_inherit.Foo();
b = new typedef_inherit.Bar();
diff --git a/Examples/test-suite/javascript/typedef_scope_runme.js b/Examples/test-suite/javascript/typedef_scope_runme.js
index 0ac56884c..5c1368ab7 100644
--- a/Examples/test-suite/javascript/typedef_scope_runme.js
+++ b/Examples/test-suite/javascript/typedef_scope_runme.js
@@ -1,4 +1,4 @@
-var typedef_scope = require("./typedef_scope");
+var typedef_scope = require("typedef_scope");
b = new typedef_scope.Bar();
x = b.test1(42,"hello");
diff --git a/Examples/test-suite/javascript/typemap_arrays_runme.js b/Examples/test-suite/javascript/typemap_arrays_runme.js
index cd6827ac9..610ecdd9c 100644
--- a/Examples/test-suite/javascript/typemap_arrays_runme.js
+++ b/Examples/test-suite/javascript/typemap_arrays_runme.js
@@ -1,4 +1,4 @@
-var typemap_arrays = require("./typemap_arrays");
+var typemap_arrays = require("typemap_arrays");
if (typemap_arrays.sumA(null) != 60)
throw "RuntimeError, Sum is wrong";
diff --git a/Examples/test-suite/javascript/typemap_delete_runme.js b/Examples/test-suite/javascript/typemap_delete_runme.js
index 4b3174956..1d42ce4da 100644
--- a/Examples/test-suite/javascript/typemap_delete_runme.js
+++ b/Examples/test-suite/javascript/typemap_delete_runme.js
@@ -1,4 +1,4 @@
-var typemap_delete = require("./typemap_delete");
+var typemap_delete = require("typemap_delete");
r = new typemap_delete.Rect(123);
if (r.val != 123)
diff --git a/Examples/test-suite/javascript/typemap_namespace_runme.js b/Examples/test-suite/javascript/typemap_namespace_runme.js
index 614e0ffeb..2aa358024 100644
--- a/Examples/test-suite/javascript/typemap_namespace_runme.js
+++ b/Examples/test-suite/javascript/typemap_namespace_runme.js
@@ -1,4 +1,4 @@
-var typemap_namespace = require("./typemap_namespace");
+var typemap_namespace = require("typemap_namespace");
if (typemap_namespace.test1("hello") != "hello")
throw "RuntimeError";
diff --git a/Examples/test-suite/javascript/typemap_ns_using_runme.js b/Examples/test-suite/javascript/typemap_ns_using_runme.js
index 9115c16ae..7e4019ab2 100644
--- a/Examples/test-suite/javascript/typemap_ns_using_runme.js
+++ b/Examples/test-suite/javascript/typemap_ns_using_runme.js
@@ -1,4 +1,4 @@
-var typemap_ns_using = require("./typemap_ns_using");
+var typemap_ns_using = require("typemap_ns_using");
if (typemap_ns_using.spam(37) != 37)
throw "RuntimeError";
diff --git a/Examples/test-suite/javascript/using1_runme.js b/Examples/test-suite/javascript/using1_runme.js
index a2e37fcb6..2415156f0 100644
--- a/Examples/test-suite/javascript/using1_runme.js
+++ b/Examples/test-suite/javascript/using1_runme.js
@@ -1,4 +1,4 @@
-var using1 = require("./using1");
+var using1 = require("using1");
if (using1.spam(37) != 37)
throw "RuntimeError";
diff --git a/Examples/test-suite/javascript/using2_runme.js b/Examples/test-suite/javascript/using2_runme.js
index aa5e9b15f..2ef08faca 100644
--- a/Examples/test-suite/javascript/using2_runme.js
+++ b/Examples/test-suite/javascript/using2_runme.js
@@ -1,4 +1,4 @@
-var using2 = require("./using2");
+var using2 = require("using2");
if (using2.spam(37) != 37)
throw "RuntimeError";
diff --git a/Examples/test-suite/javascript/varargs_runme.js b/Examples/test-suite/javascript/varargs_runme.js
index 69d761e63..fc6d945c1 100644
--- a/Examples/test-suite/javascript/varargs_runme.js
+++ b/Examples/test-suite/javascript/varargs_runme.js
@@ -1,4 +1,4 @@
-var varargs = require("./varargs");
+var varargs = require("varargs");
if (varargs.test("Hello") != "Hello") {
throw new Error("Failed");
diff --git a/Examples/test-suite/lua/Makefile.in b/Examples/test-suite/lua/Makefile.in
index 0950c9d91..b35cc15ad 100644
--- a/Examples/test-suite/lua/Makefile.in
+++ b/Examples/test-suite/lua/Makefile.in
@@ -4,10 +4,17 @@
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
@@ -46,8 +53,8 @@ lua_no_module_global.%: SWIGOPT += -nomoduleglobal
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.lua appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LUA_PATH="$(srcdir)/?.lua;" $(RUNTOOL) $(LUA) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LUA_PATH="$(srcdir)/?.lua;" $(RUNTOOL) $(LUA) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean: (does nothing, we dont generate extra lua code)
diff --git a/Examples/test-suite/mzscheme/Makefile.in b/Examples/test-suite/mzscheme/Makefile.in
index 67b8bddf2..39fb1acbc 100644
--- a/Examples/test-suite/mzscheme/Makefile.in
+++ b/Examples/test-suite/mzscheme/Makefile.in
@@ -5,9 +5,15 @@
LANGUAGE = mzscheme
MZSCHEME = mzscheme
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 63edec26a..5081e203e 100644
--- a/Examples/test-suite/ocaml/Makefile.in
+++ b/Examples/test-suite/ocaml/Makefile.in
@@ -6,9 +6,15 @@ LANGUAGE = ocaml
OCAMLC = ocamlc
VARIANT = _static
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 e48d36a64..11cb7c076 100644
--- a/Examples/test-suite/octave/Makefile.in
+++ b/Examples/test-suite/octave/Makefile.in
@@ -4,10 +4,17 @@
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 \
@@ -33,7 +40,7 @@ include $(srcdir)/../common.mk
# Overridden variables here
LIBS = -L.
-CSRCS = $(srcdir)/octave_empty.c
+CSRCS = octave_empty.c
# Custom tests - tests with additional commandline options
# none!
@@ -57,8 +64,8 @@ CSRCS = $(srcdir)/octave_empty.c
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.m appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH OCTAVE_PATH=$(srcdir):$$OCTAVE_PATH $(RUNTOOL) $(OCTAVE) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH OCTAVE_PATH=$(srcdir):$$OCTAVE_PATH $(RUNTOOL) $(OCTAVE) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean: remove the generated .m file
diff --git a/Examples/test-suite/perl5/Makefile.in b/Examples/test-suite/perl5/Makefile.in
index 68f32a54a..6778f714e 100644
--- a/Examples/test-suite/perl5/Makefile.in
+++ b/Examples/test-suite/perl5/Makefile.in
@@ -4,11 +4,18 @@
LANGUAGE = perl5
PERL = @PERL@
+SCRIPTDIR = $(srcdir)
SCRIPTSUFFIX = _runme.pl
-TEST_RUNNER = run-perl-test.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 \
@@ -49,8 +56,8 @@ include $(srcdir)/../common.mk
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.pl appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(PERL) $(TEST_RUNNER) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(PERL) $(TEST_RUNNER) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean: remove the generated .pm file
diff --git a/Examples/test-suite/php/Makefile.in b/Examples/test-suite/php/Makefile.in
index 735a3137e..b6e4fff1a 100644
--- a/Examples/test-suite/php/Makefile.in
+++ b/Examples/test-suite/php/Makefile.in
@@ -3,10 +3,17 @@
#######################################################################
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 \
@@ -56,10 +63,10 @@ missingtests: missingcpptests missingctests
# Runs the testcase. Tries to run testcase_runme.php, and if that's not
# found, runs testcase.php, except for multicpptests.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHP_SCRIPT=$(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) RUNTOOL="$(RUNTOOL)" php_run; \
- elif [ -f $(srcdir)/$(SCRIPTPREFIX)$*.php -a ! -f $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list ]; then \
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHP_SCRIPT=$(srcdir)/$(SCRIPTPREFIX)$*.php RUNTOOL="$(RUNTOOL)" php_run; \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHP_SCRIPT=$(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) RUNTOOL="$(RUNTOOL)" php_run; \
+ elif [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*.php -a ! -f $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list ]; then \
+ $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHP_SCRIPT=$(SCRIPTDIR)/$(SCRIPTPREFIX)$*.php RUNTOOL="$(RUNTOOL)" php_run; \
fi
# Clean: remove the generated .php file
diff --git a/Examples/test-suite/pike/Makefile.in b/Examples/test-suite/pike/Makefile.in
index c1ebb747b..36a34352a 100644
--- a/Examples/test-suite/pike/Makefile.in
+++ b/Examples/test-suite/pike/Makefile.in
@@ -5,9 +5,15 @@
LANGUAGE = pike
PIKE = pike
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 389aed9ea..719e7d1a4 100644
--- a/Examples/test-suite/python/Makefile.in
+++ b/Examples/test-suite/python/Makefile.in
@@ -21,9 +21,16 @@ 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
@@ -128,39 +135,43 @@ VALGRIND_OPT += --suppressions=pythonswig.supp
$(run_testcase)
-# Call 2to3 to generate Python 3.x test from the Python 2.x's *_runme.py file
-%$(PY3SCRIPTSUFFIX): %$(PY2SCRIPTSUFFIX)
- cp $< $@
- $(PY2TO3) -w $@ >/dev/null 2>&1
-
-
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.py (or _runme3.py for Python 3) appended after the testcase name.
-run_python = env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PYTHONPATH=.:$(srcdir):$$PYTHONPATH $(RUNTOOL) $(PYTHON) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
+py_runme = $(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
+py2_runme = $(SCRIPTPREFIX)$*$(PY2SCRIPTSUFFIX)
+py3_runme = $(SCRIPTPREFIX)$*$(PY3SCRIPTSUFFIX)
-py2_runme = $(srcdir)/$(SCRIPTPREFIX)$*$(PY2SCRIPTSUFFIX)
-py3_runme = $(srcdir)/$(SCRIPTPREFIX)$*$(PY3SCRIPTSUFFIX)
+run_python = env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PYTHONPATH=.:$(srcdir):$$PYTHONPATH $(RUNTOOL) $(PYTHON) $(py_runme)
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(py_runme) ]; then \
$(run_python);\
fi
-ifeq (,$(PY3))
+# No copying/conversion needed for in-source-tree Python 2 scripts
+ifeq ($(SCRIPTDIR)|$(SCRIPTSUFFIX),$(srcdir)|$(PY2SCRIPTSUFFIX))
convert_testcase =
else
+
convert_testcase = \
- if [ -f $(py2_runme) ]; then \
- $(MAKE) -f $(srcdir)/Makefile $(py3_runme); \
+ if [ -f $(srcdir)/$(py2_runme) ]; then \
+ $(MAKE) $(SCRIPTDIR)/$(py_runme); \
fi
+
+$(SCRIPTDIR)/$(SCRIPTPREFIX)%$(SCRIPTSUFFIX): $(srcdir)/$(SCRIPTPREFIX)%$(PY2SCRIPTSUFFIX)
+ test x$< = x$@ || cp $< $@ || exit 1
+ test x$(PY3) = x || $(PY2TO3) -w $@ >/dev/null 2>&1 || exit 1
+
endif
# Clean: remove the generated .py file
+# We only remove the _runme3.py if it is generated by 2to3 from a _runme.py.
%.clean:
- @rm -f $*.py;
- @#We only remove the _runme3.py if it is generated by 2to3 from a _runme.py.
- @if [ -f $(py2_runme) ]; then rm -f $(py3_runme) $(py3_runme).bak; fi
+ @rm -f $*.py
+ @if [ -f $(srcdir)/$(py2_runme) ]; then \
+ rm -f $(SCRIPTDIR)/$(py3_runme) $(SCRIPTDIR)/$(py3_runme).bak; \
+ fi
clean:
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile python_clean
diff --git a/Examples/test-suite/r/Makefile.in b/Examples/test-suite/r/Makefile.in
index 32d9b85da..9f0de1c5f 100644
--- a/Examples/test-suite/r/Makefile.in
+++ b/Examples/test-suite/r/Makefile.in
@@ -6,9 +6,15 @@ LANGUAGE = r
SCRIPTSUFFIX = _runme.R
WRAPSUFFIX = .R
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 40985e532..d0c65929a 100644
--- a/Examples/test-suite/ruby/Makefile.in
+++ b/Examples/test-suite/ruby/Makefile.in
@@ -4,10 +4,17 @@
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 \
@@ -60,8 +67,8 @@ ruby_naming.cpptest: SWIGOPT += -autorename
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.rb appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(RUBY) -I$(srcdir):. $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(RUBY) -I$(srcdir):. $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean
diff --git a/Examples/test-suite/tcl/Makefile.in b/Examples/test-suite/tcl/Makefile.in
index 6ab293fb9..f8a196e26 100644
--- a/Examples/test-suite/tcl/Makefile.in
+++ b/Examples/test-suite/tcl/Makefile.in
@@ -4,10 +4,17 @@
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 \
@@ -45,8 +52,8 @@ include $(srcdir)/../common.mk
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.tcl appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(TCLSH) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(TCLSH) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean
diff --git a/Examples/test-suite/uffi/Makefile.in b/Examples/test-suite/uffi/Makefile.in
index 5fd000a96..9f3546da6 100644
--- a/Examples/test-suite/uffi/Makefile.in
+++ b/Examples/test-suite/uffi/Makefile.in
@@ -5,9 +5,15 @@
LANGUAGE = uffi
UFFI = @UFFIBIN@
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/Makefile.in b/Makefile.in
index 53ac47de5..8c6072b41 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -100,7 +100,7 @@ skip-errors = test -n ""
ACTION = check
NOSKIP =
-chk-set-swiglib = SWIG_LIB=@ROOT_DIR@/Lib
+chk-set-swiglib = SWIG_LIB=@ROOT_DIR@/$(srcdir)/Lib
chk-set-swig = SWIG=@ROOT_DIR@/$(TARGET)
chk-set-env = $(chk-set-swiglib) $(chk-set-swig)
@@ -443,7 +443,7 @@ maintainer-clean:
@echo maintainer-cleaning CCache
@test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) $(FLAGS) maintainer-clean)
@echo maintainer-cleaning docs
- @cd $(DOCS) && $(MAKE) $(FLAGS) maintainer-clean
+ @test -d $(DOCS) || exit 0; cd $(DOCS) && $(MAKE) $(FLAGS) maintainer-clean
@echo maintainer-cleaning Lib files
@rm -f $(srcdir)/Lib/swigwarn.swg
@echo distcleaning
diff --git a/Tools/javascript/Makefile.in b/Tools/javascript/Makefile.in
index 6fbca2384..d5c4711a0 100644
--- a/Tools/javascript/Makefile.in
+++ b/Tools/javascript/Makefile.in
@@ -53,7 +53,7 @@ JS_INTERPRETER_SRC = javascript.cxx js_shell.cxx $(JS_INTERPRETER_SRC_JSC) $(JS_
JS_INTERPRETER_OBJS = $(JS_INTERPRETER_SRC:.cxx=.o)
-%.o: %.cxx
+%.o: $(srcdir)/%.cxx
$(JSCXX) $(JS_INTERPRETER_DEFINES) $(CXXFLAGS) $(JSINCLUDES) -o $@ -c $<
javascript: $(JS_INTERPRETER_OBJS)
diff --git a/configure.ac b/configure.ac
index eeabd11b4..949986341 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2677,6 +2677,41 @@ AC_CONFIG_FILES([
AC_CONFIG_FILES([preinst-swig], [chmod +x preinst-swig])
AC_CONFIG_FILES([CCache/ccache_swig_config.h])
+#--------------------------------------------------------------------
+# Building Examples/ out of source directory
+#--------------------------------------------------------------------
+
+# If building out of source tree, replicate Examples/ source tree in
+# build directory, and copy over Makefiles from source directory.
+# Prefix each Makefile with a header which sets SRCDIR to the relative
+# source directory, and provides a rule for updating the Makefile from
+# its original source.
+AC_CONFIG_COMMANDS([Examples],[
+ if test "x${srcdir}" != "x." ; then
+ AC_MSG_NOTICE([generating Examples build tree])
+ for mkfile in `cd ${srcdir} && find Examples/ -type f -name Makefile`; do
+ dir=`dirname ${mkfile}`
+ d=${dir}
+ reldir="";
+ while test "x$d" != "x." ; do
+ d=`dirname $d`
+ reldir="${reldir}../"
+ done
+ relsrcdir=${reldir}${srcdir}/
+ AS_MKDIR_P([${dir}])
+ cat <${mkfile}
+# DO NOT EDIT: instead edit ${relsrcdir}${mkfile}
+# and run (cd ${reldir} && ./config.status) to regenerate
+SRCDIR = ${relsrcdir}${dir}/
+
+EOF
+ cat ${srcdir}/${mkfile} >>${mkfile}
+ done
+ fi
+])
+
+#--------------------------------------------------------------------
+
AC_OUTPUT
langs=""
From 9b0e484b8a786b043a6d8f39bd0b18ff2dd91823 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Mon, 12 May 2014 07:51:55 +0100
Subject: [PATCH 014/152] Tests for C nested classes symbol table not being in
global space
Tests for 55bda53145d2898bd4642926b25209c12738e558
---
Examples/test-suite/common.mk | 1 +
.../java/nested_extend_c_runme.java | 38 ++++++++++
Examples/test-suite/nested_extend_c.i | 74 +++++++++++++++++++
3 files changed, 113 insertions(+)
create mode 100644 Examples/test-suite/java/nested_extend_c_runme.java
create mode 100644 Examples/test-suite/nested_extend_c.i
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index 2a4591524..4b10527db 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -602,6 +602,7 @@ C_TEST_CASES += \
memberin_extend_c \
name \
nested \
+ nested_extend_c \
nested_structs \
newobject2 \
overload_extend \
diff --git a/Examples/test-suite/java/nested_extend_c_runme.java b/Examples/test-suite/java/nested_extend_c_runme.java
new file mode 100644
index 000000000..9da093a09
--- /dev/null
+++ b/Examples/test-suite/java/nested_extend_c_runme.java
@@ -0,0 +1,38 @@
+import nested_extend_c.*;
+
+public class nested_extend_c_runme {
+
+ static {
+ try {
+ System.loadLibrary("nested_extend_c");
+ } catch (UnsatisfiedLinkError e) {
+ System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
+ System.exit(1);
+ }
+ }
+
+ public static void main(String argv[]) throws Throwable
+ {
+ {
+ hiA hi = new hiA();
+ if (hi.hi_extend() != 'h')
+ throw new RuntimeException("test failed");
+ }
+ {
+ lowA low = new lowA();
+ if (low.low_extend() != 99)
+ throw new RuntimeException("test failed");
+ }
+
+ {
+ hiB hi = new hiB();
+ if (hi.hi_extend() != 'h')
+ throw new RuntimeException("test failed");
+ }
+ {
+ lowB low = new lowB();
+ if (low.low_extend() != 99)
+ throw new RuntimeException("test failed");
+ }
+ }
+}
diff --git a/Examples/test-suite/nested_extend_c.i b/Examples/test-suite/nested_extend_c.i
new file mode 100644
index 000000000..3641cf78f
--- /dev/null
+++ b/Examples/test-suite/nested_extend_c.i
@@ -0,0 +1,74 @@
+%module nested_extend_c
+
+%extend hiA {
+ hiA() {
+ union hiA *self = (union hiA *)malloc(sizeof(union hiA));
+ self->c = 'h';
+ return self;
+ }
+ char hi_extend() {
+ return $self->c;
+ }
+}
+%extend lowA {
+ lowA() {
+ struct lowA *self = (struct lowA *)malloc(sizeof(struct lowA));
+ self->name = 0;
+ self->num = 99;
+ return self;
+ }
+ int low_extend() {
+ return $self->num;
+ }
+}
+
+%extend hiB {
+ hiB() {
+ union hiB *self = (union hiB *)malloc(sizeof(union hiB));
+ self->c = 'h';
+ return self;
+ }
+ char hi_extend() {
+ return $self->c;
+ }
+}
+%extend lowB {
+ lowB() {
+ struct lowB *self = (struct lowB *)malloc(sizeof(struct lowB));
+ self->name = 0;
+ self->num = 99;
+ return self;
+ }
+ int low_extend() {
+ return $self->num;
+ }
+}
+
+%inline %{
+typedef struct NestedA {
+ int a;
+ union hiA {
+ char c;
+ int d;
+ } hiA_instance;
+
+ struct lowA {
+ char *name;
+ int num;
+ } lowA_instance;
+} NestedA;
+
+typedef struct {
+ int a;
+ union hiB {
+ char c;
+ int d;
+ } hiB_instance;
+
+ struct lowB {
+ char *name;
+ int num;
+ } lowB_instance;
+} NestedB;
+%}
+
From caaf224b5960202034884a1a00a9c3d2c3881c08 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Mon, 12 May 2014 19:07:55 +0100
Subject: [PATCH 015/152] Turn off %extend nested test for cplusplusout
languages
---
Examples/test-suite/nested_extend_c.i | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Examples/test-suite/nested_extend_c.i b/Examples/test-suite/nested_extend_c.i
index 3641cf78f..83d8c0601 100644
--- a/Examples/test-suite/nested_extend_c.i
+++ b/Examples/test-suite/nested_extend_c.i
@@ -1,5 +1,6 @@
%module nested_extend_c
+#if !defined(SWIGOCTAVE) && !defined(SWIG_JAVASCRIPT_V8)
%extend hiA {
hiA() {
union hiA *self = (union hiA *)malloc(sizeof(union hiA));
@@ -43,6 +44,7 @@
return $self->num;
}
}
+#endif
%inline %{
typedef struct NestedA {
From 2aa540b9c0dee27e42e7eb6db2cb3e9ea24ca2ba Mon Sep 17 00:00:00 2001
From: Vladimir Kalinin
Date: Wed, 14 May 2014 00:51:36 +0400
Subject: [PATCH 016/152] %extend for nested unnamed C structs
---
Source/CParse/parser.y | 9 ++++-----
Source/Modules/main.cxx | 2 ++
Source/Modules/nested.cxx | 10 ++++++----
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y
index 26af7be2d..a1a62cb62 100644
--- a/Source/CParse/parser.y
+++ b/Source/CParse/parser.y
@@ -41,7 +41,7 @@ int yyparse();
static Node *top = 0; /* Top of the generated parse tree */
static int unnamed = 0; /* Unnamed datatype counter */
-static Hash *extendhash = 0; /* Hash table of added methods */
+Hash *extendhash = 0; /* Hash table of added methods */
static Hash *classes = 0; /* Hash table of classes */
static Hash *classes_typedefs = 0; /* Hash table of typedef classes: typedef struct X {...} Y; */
static Symtab *prev_symtab = 0;
@@ -655,7 +655,7 @@ static void add_symbols_copy(Node *n) {
actually needs to take precedence. Therefore, we will selectively nuke symbols
from the current symbol table, replacing them with the added methods */
-static void merge_extensions(Node *cls, Node *am) {
+void merge_extensions(Node *cls, Node *am) {
Node *n;
Node *csym;
@@ -708,7 +708,7 @@ static void merge_extensions(Node *cls, Node *am) {
}
}
-static void append_previous_extension(Node *cls, Node *am) {
+void append_previous_extension(Node *cls, Node *am) {
Node *n, *ne;
Node *pe = 0;
Node *ae = 0;
@@ -737,7 +737,7 @@ static void append_previous_extension(Node *cls, Node *am) {
/* Check for unused %extend. Special case, don't report unused
extensions for templates */
-static void check_extensions() {
+void check_extensions() {
Iterator ki;
if (!extendhash) return;
@@ -1579,7 +1579,6 @@ program : interface {
Setattr(module_node,"name",ModuleName);
}
Setattr($1,"module",module_node);
- check_extensions();
top = $1;
}
| PARSETYPE parm SEMI {
diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
index 833394b9c..d8f20c207 100644
--- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx
@@ -198,6 +198,7 @@ static String *external_runtime_name = 0;
enum { STAGE1=1, STAGE2=2, STAGE3=4, STAGE4=8, STAGEOVERFLOW=16 };
static List *libfiles = 0;
static List *all_output_files = 0;
+extern "C" void check_extensions();
/* -----------------------------------------------------------------------------
* check_extension()
@@ -1172,6 +1173,7 @@ int SWIG_main(int argc, char *argv[], Language *l) {
Printf(stdout, "Processing unnamed structs...\n");
Swig_nested_name_unnamed_c_structs(top);
}
+ check_extensions();
if (Verbose) {
Printf(stdout, "Processing types...\n");
diff --git a/Source/Modules/nested.cxx b/Source/Modules/nested.cxx
index 3b45e9f90..169263c3f 100644
--- a/Source/Modules/nested.cxx
+++ b/Source/Modules/nested.cxx
@@ -338,7 +338,9 @@ static void insertNodeAfter(Node *n, Node *c) {
set_nextSibling(n, c);
set_previousSibling(c, n);
}
-
+extern "C" Hash *extendhash;
+extern "C" void merge_extensions(Node *cls, Node *am);
+extern "C" void append_previous_extension(Node *cls, Node *am);
void Swig_nested_name_unnamed_c_structs(Node *n) {
if (!classhash)
classhash = Getattr(n, "classes");
@@ -377,15 +379,15 @@ void Swig_nested_name_unnamed_c_structs(Node *n) {
}
Delete(ty);
// Check for extensions
-/* // TODO: we can save extensions hash like class hash and move check_extensions() after nesting processing
+ // TODO: we can save extensions hash like class hash and move check_extensions() after nesting processing
if (extendhash) {
if (Node *am = Getattr(extendhash, name)) {
// Merge the extension into the symbol table
merge_extensions(c, am);
append_previous_extension(c, am);
- Delattr(extendhash, clsname);
+ Delattr(extendhash, name);
}
- }*/
+ }
Swig_symbol_setscope(Swig_symbol_global_scope());
add_symbols_c(c);
From 5d78f14b1c2a580ad08326de4900f51245560dd7 Mon Sep 17 00:00:00 2001
From: Vladimir Kalinin
Date: Wed, 14 May 2014 00:56:39 +0400
Subject: [PATCH 017/152] test added for nested unnamed C struct %extend
---
Examples/test-suite/nested_extend_c.i | 15 +++++++++++++++
Source/Modules/nested.cxx | 2 --
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Examples/test-suite/nested_extend_c.i b/Examples/test-suite/nested_extend_c.i
index 83d8c0601..702c839b2 100644
--- a/Examples/test-suite/nested_extend_c.i
+++ b/Examples/test-suite/nested_extend_c.i
@@ -44,6 +44,13 @@
return $self->num;
}
}
+
+%extend FOO_bar {
+ void bar_extend() {
+ $self->d = 1;
+ }
+};
+
#endif
%inline %{
@@ -72,5 +79,13 @@ typedef struct {
int num;
} lowB_instance;
} NestedB;
+
+typedef struct {
+ int a;
+ union {
+ char c;
+ int d;
+ } bar;
+} FOO;
%}
diff --git a/Source/Modules/nested.cxx b/Source/Modules/nested.cxx
index 169263c3f..510270681 100644
--- a/Source/Modules/nested.cxx
+++ b/Source/Modules/nested.cxx
@@ -378,8 +378,6 @@ void Swig_nested_name_unnamed_c_structs(Node *n) {
decl = nextSibling(decl);
}
Delete(ty);
- // Check for extensions
- // TODO: we can save extensions hash like class hash and move check_extensions() after nesting processing
if (extendhash) {
if (Node *am = Getattr(extendhash, name)) {
// Merge the extension into the symbol table
From 3692e175bc980d1e1a06729465ff932e3bcc8e08 Mon Sep 17 00:00:00 2001
From: Vladimir Kalinin
Date: Thu, 15 May 2014 03:13:25 +0400
Subject: [PATCH 018/152] global unnamed structures ignored
---
Examples/test-suite/nested_extend_c.i | 4 ++++
Source/Modules/nested.cxx | 7 ++++++-
Source/Modules/typepass.cxx | 3 +++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/Examples/test-suite/nested_extend_c.i b/Examples/test-suite/nested_extend_c.i
index 702c839b2..0e1495f86 100644
--- a/Examples/test-suite/nested_extend_c.i
+++ b/Examples/test-suite/nested_extend_c.i
@@ -87,5 +87,9 @@ typedef struct {
int d;
} bar;
} FOO;
+
+struct {
+ int i;
+} THING;
%}
diff --git a/Source/Modules/nested.cxx b/Source/Modules/nested.cxx
index 510270681..ca1c79a31 100644
--- a/Source/Modules/nested.cxx
+++ b/Source/Modules/nested.cxx
@@ -396,7 +396,12 @@ void Swig_nested_name_unnamed_c_structs(Node *n) {
Delete(ins);
Delattr(c, "nested:outer");
} else {
- // global unnamed struct - ignore it
+ // global unnamed struct - ignore it and it's instances
+ SetFlag(c, "feature:ignore");
+ while (next && Getattr(next, "nested:unnamedtype") == c) {
+ SetFlag(next, "feature:ignore");
+ next = nextSibling(next);
+ }
c = next;
continue;
}
diff --git a/Source/Modules/typepass.cxx b/Source/Modules/typepass.cxx
index 329a601a8..ec6f64587 100644
--- a/Source/Modules/typepass.cxx
+++ b/Source/Modules/typepass.cxx
@@ -661,6 +661,9 @@ class TypePass:private Dispatcher {
* ------------------------------------------------------------ */
virtual int cDeclaration(Node *n) {
+ if (GetFlag(n, "feature:ignore")) {
+ return SWIG_OK;
+ }
if (NoExcept) {
Delattr(n, "throws");
}
From 2b5499a2628edda34f2deccd668001093d4a562d Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Tue, 13 May 2014 23:30:00 +0100
Subject: [PATCH 019/152] 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.
---
Examples/Makefile.in | 4 ++--
Examples/test-suite/allegrocl/Makefile.in | 5 -----
Examples/test-suite/cffi/Makefile.in | 5 -----
Examples/test-suite/chicken/Makefile.in | 5 -----
Examples/test-suite/clisp/Makefile.in | 5 -----
Examples/test-suite/common.mk | 2 ++
Examples/test-suite/csharp/Makefile.in | 7 +------
Examples/test-suite/d/Makefile.in | 5 -----
Examples/test-suite/errors/Makefile.in | 5 -----
Examples/test-suite/go/Makefile.in | 6 ------
Examples/test-suite/guile/Makefile.in | 6 ------
Examples/test-suite/java/Makefile.in | 7 +------
Examples/test-suite/javascript/Makefile.in | 5 -----
Examples/test-suite/lua/Makefile.in | 6 ------
Examples/test-suite/mzscheme/Makefile.in | 5 -----
Examples/test-suite/ocaml/Makefile.in | 5 -----
Examples/test-suite/octave/Makefile.in | 6 ------
Examples/test-suite/perl5/Makefile.in | 6 ------
Examples/test-suite/php/Makefile.in | 6 ------
Examples/test-suite/pike/Makefile.in | 5 -----
Examples/test-suite/python/Makefile.in | 15 +++------------
Examples/test-suite/r/Makefile.in | 5 -----
Examples/test-suite/ruby/Makefile.in | 6 ------
Examples/test-suite/tcl/Makefile.in | 6 ------
Examples/test-suite/uffi/Makefile.in | 5 -----
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
From beccd3258fc1fd9e0c3caef3a21fdaeffcef81d3 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Tue, 13 May 2014 23:52:55 +0100
Subject: [PATCH 020/152] Update all languages to use SCRIPTDIR
R also to use SCRIPTPREFIX and SCRIPTSUFFIX
---
Examples/test-suite/allegrocl/Makefile.in | 4 ++--
Examples/test-suite/cffi/Makefile.in | 4 ++--
Examples/test-suite/chicken/Makefile.in | 10 +++++-----
Examples/test-suite/clisp/Makefile.in | 4 ++--
Examples/test-suite/d/Makefile.in | 8 ++++----
Examples/test-suite/javascript/Makefile.in | 2 +-
Examples/test-suite/mzscheme/Makefile.in | 4 ++--
Examples/test-suite/ocaml/Makefile.in | 8 ++++----
Examples/test-suite/pike/Makefile.in | 4 ++--
Examples/test-suite/r/Makefile.in | 12 ++++++------
Examples/test-suite/uffi/Makefile.in | 4 ++--
11 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/Examples/test-suite/allegrocl/Makefile.in b/Examples/test-suite/allegrocl/Makefile.in
index 7c21e18cd..8c253a7f2 100644
--- a/Examples/test-suite/allegrocl/Makefile.in
+++ b/Examples/test-suite/allegrocl/Makefile.in
@@ -115,8 +115,8 @@ include $(srcdir)/../common.mk
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.lisp appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(ALLEGROCLBIN) -batch -s $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(ALLEGROCLBIN) -batch -s $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
%.clean:
diff --git a/Examples/test-suite/cffi/Makefile.in b/Examples/test-suite/cffi/Makefile.in
index 164538e2b..6e657ba46 100644
--- a/Examples/test-suite/cffi/Makefile.in
+++ b/Examples/test-suite/cffi/Makefile.in
@@ -39,8 +39,8 @@ CPP_TEST_CASES =
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.lisp appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(CFFI) -batch -s $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(CFFI) -batch -s $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean: (does nothing, we dont generate extra cffi code)
diff --git a/Examples/test-suite/chicken/Makefile.in b/Examples/test-suite/chicken/Makefile.in
index bdda02b7e..5a2ef3d8a 100644
--- a/Examples/test-suite/chicken/Makefile.in
+++ b/Examples/test-suite/chicken/Makefile.in
@@ -45,7 +45,7 @@ SWIGOPT += -nounit
$(setup)
+$(swig_and_compile_cpp)
$(run_testcase)
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \
$(MAKE) $*.cppproxy; \
fi
@@ -53,7 +53,7 @@ SWIGOPT += -nounit
$(setup)
+$(swig_and_compile_c)
$(run_testcase)
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \
$(MAKE) $*.cproxy; \
fi
@@ -61,7 +61,7 @@ SWIGOPT += -nounit
$(setup)
+$(swig_and_compile_multi_cpp)
$(run_testcase)
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \
$(MAKE) $*.multiproxy; \
fi
@@ -88,8 +88,8 @@ SWIGOPT += -nounit
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.scm appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(CHICKEN_CSI) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(CHICKEN_CSI) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean
diff --git a/Examples/test-suite/clisp/Makefile.in b/Examples/test-suite/clisp/Makefile.in
index 525605254..43f7159ff 100644
--- a/Examples/test-suite/clisp/Makefile.in
+++ b/Examples/test-suite/clisp/Makefile.in
@@ -39,8 +39,8 @@ CPP_TEST_CASES =
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.lisp appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(CLISP) -batch -s $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(CLISP) -batch -s $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean: (does nothing, we dont generate extra clisp code)
diff --git a/Examples/test-suite/d/Makefile.in b/Examples/test-suite/d/Makefile.in
index 42fac00bc..37a944b09 100644
--- a/Examples/test-suite/d/Makefile.in
+++ b/Examples/test-suite/d/Makefile.in
@@ -14,7 +14,7 @@ else
VERSIONSUFFIX = .1
endif
-TESTSUFFIX = _runme$(VERSIONSUFFIX).d
+SCRIPTSUFFIX = _runme$(VERSIONSUFFIX).d
CPP_TEST_CASES = \
d_nativepointers \
@@ -46,7 +46,7 @@ SWIGOPT+=-splitproxy -package $*
# Makes a directory for the testcase if it does not exist
setup = \
- if [ -f $(srcdir)/$(TESTPREFIX)$*$(TESTSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
else \
echo "$(ACTION)ing $(LANGUAGE) testcase $*" ; \
@@ -61,11 +61,11 @@ setup = \
# Compiles D files then runs the testcase. A testcase is only run if
# a file is found which has _runme.d appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(TESTPREFIX)$*$(TESTSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
cd $*$(VERSIONSUFFIX) && \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile \
DFLAGS='-of$*_runme' \
- DSRCS='../$(srcdir)/$(TESTPREFIX)$*$(TESTSUFFIX) `find $* -name *.d`' d_compile && \
+ DSRCS='../$(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) `find $* -name *.d`' d_compile && \
env LD_LIBRARY_PATH=".:$$LD_LIBRARY_PATH" $(RUNTOOL) ./$*_runme; \
else \
cd $*$(VERSIONSUFFIX) && \
diff --git a/Examples/test-suite/javascript/Makefile.in b/Examples/test-suite/javascript/Makefile.in
index 211310e86..87e4c6ecb 100644
--- a/Examples/test-suite/javascript/Makefile.in
+++ b/Examples/test-suite/javascript/Makefile.in
@@ -22,7 +22,7 @@ endif
include $(srcdir)/../common.mk
_setup = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
echo "$(ACTION)ing $(LANGUAGE) ($(JSENGINE)) testcase $* (with run test)" ; \
else \
echo "$(ACTION)ing $(LANGUAGE) ($(JSENGINE)) testcase $*" ; \
diff --git a/Examples/test-suite/mzscheme/Makefile.in b/Examples/test-suite/mzscheme/Makefile.in
index 1c2466efc..034e52131 100644
--- a/Examples/test-suite/mzscheme/Makefile.in
+++ b/Examples/test-suite/mzscheme/Makefile.in
@@ -37,8 +37,8 @@ include $(srcdir)/../common.mk
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.scm appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(MZSCHEME) -r $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(MZSCHEME) -r $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean
diff --git a/Examples/test-suite/ocaml/Makefile.in b/Examples/test-suite/ocaml/Makefile.in
index c9c4bb603..ee93d534c 100644
--- a/Examples/test-suite/ocaml/Makefile.in
+++ b/Examples/test-suite/ocaml/Makefile.in
@@ -14,12 +14,12 @@ top_builddir = @top_builddir@
C_TEST_CASES =
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) -a \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) -a \
-f $(top_srcdir)/Examples/test-suite/$*.list ] ; then \
- $(COMPILETOOL) $(OCAMLC) -c $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ $(COMPILETOOL) $(OCAMLC) -c $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
$(COMPILETOOL) $(OCAMLC) swig.cmo -custom -g -cc '$(CXX)' -o runme `cat $(top_srcdir)/Examples/test-suite/$(*).list | sed -e 's/\(.*\)/\1_wrap.o \1.cmo/g'`&& $(RUNTOOL) ./runme; \
- elif [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- $(COMPILETOOL) $(OCAMLC) -c $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ elif [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ $(COMPILETOOL) $(OCAMLC) -c $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
$(COMPILETOOL) $(OCAMLC) swig.cmo -custom -g -cc '$(CXX)' -o runme $(srcdir)/$(*).cmo $(srcdir)/$(*)_runme.cmo $(srcdir)/$(*)_wrap.o && \
$(RUNTOOL) ./runme; \
fi ;
diff --git a/Examples/test-suite/pike/Makefile.in b/Examples/test-suite/pike/Makefile.in
index 414fa1159..579c7e28f 100644
--- a/Examples/test-suite/pike/Makefile.in
+++ b/Examples/test-suite/pike/Makefile.in
@@ -37,8 +37,8 @@ include $(srcdir)/../common.mk
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.pike appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(PIKE) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(PIKE) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean: remove the generated .pike file
diff --git a/Examples/test-suite/r/Makefile.in b/Examples/test-suite/r/Makefile.in
index 8bf537d8c..cab339bf7 100644
--- a/Examples/test-suite/r/Makefile.in
+++ b/Examples/test-suite/r/Makefile.in
@@ -49,19 +49,19 @@ include $(srcdir)/../common.mk
# Run the runme if it exists. If not just load the R wrapper to
# check for syntactic correctness
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PATH=.:"$$PATH" $(RUNTOOL) $(RUNR) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PATH=.:"$$PATH" $(RUNTOOL) $(RUNR) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
else \
- $(RUNTOOL) $(RUNR) $(srcdir)/$(SCRIPTPREFIX)$*$(WRAPSUFFIX); \
+ $(RUNTOOL) $(RUNR) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(WRAPSUFFIX); \
fi
run_multitestcase = \
for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$${f}$(SCRIPTSUFFIX) ]; then \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$${f}$(SCRIPTSUFFIX) ]; then \
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PATH=.:"$$PATH" \
- $(RUNTOOL) $(RUNR) $(srcdir)/$(SCRIPTPREFIX)$${f}$(SCRIPTSUFFIX); \
+ $(RUNTOOL) $(RUNR) $(SCRIPTDIR)/$(SCRIPTPREFIX)$${f}$(SCRIPTSUFFIX); \
else \
- $(RUNTOOL) $(RUNR) $(srcdir)/$(SCRIPTPREFIX)$${f}$(WRAPSUFFIX); \
+ $(RUNTOOL) $(RUNR) $(SCRIPTDIR)/$(SCRIPTPREFIX)$${f}$(WRAPSUFFIX); \
fi; \
done
# Clean
diff --git a/Examples/test-suite/uffi/Makefile.in b/Examples/test-suite/uffi/Makefile.in
index 7184af40f..59aa33c6a 100644
--- a/Examples/test-suite/uffi/Makefile.in
+++ b/Examples/test-suite/uffi/Makefile.in
@@ -39,8 +39,8 @@ CPP_TEST_CASES =
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.lisp appended after the testcase name.
run_testcase = \
- if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
- env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(UFFI) -batch -s $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
+ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
+ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(UFFI) -batch -s $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
fi
# Clean: (does nothing, we dont generate extra uffi code)
From 28c3549e433620e6aa94571471e51433aad4d447 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Wed, 14 May 2014 00:48:51 +0100
Subject: [PATCH 021/152] Partially fix R out of source test-suite
Fix when there is NOT a runme.R file
---
Examples/test-suite/r/Makefile.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Examples/test-suite/r/Makefile.in b/Examples/test-suite/r/Makefile.in
index cab339bf7..8ee73b279 100644
--- a/Examples/test-suite/r/Makefile.in
+++ b/Examples/test-suite/r/Makefile.in
@@ -52,7 +52,7 @@ run_testcase = \
if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PATH=.:"$$PATH" $(RUNTOOL) $(RUNR) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
else \
- $(RUNTOOL) $(RUNR) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(WRAPSUFFIX); \
+ $(RUNTOOL) $(RUNR) ./$(SCRIPTPREFIX)$*$(WRAPSUFFIX); \
fi
run_multitestcase = \
@@ -61,7 +61,7 @@ run_multitestcase = \
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PATH=.:"$$PATH" \
$(RUNTOOL) $(RUNR) $(SCRIPTDIR)/$(SCRIPTPREFIX)$${f}$(SCRIPTSUFFIX); \
else \
- $(RUNTOOL) $(RUNR) $(SCRIPTDIR)/$(SCRIPTPREFIX)$${f}$(WRAPSUFFIX); \
+ $(RUNTOOL) $(RUNR) ./$(SCRIPTPREFIX)$${f}$(WRAPSUFFIX); \
fi; \
done
# Clean
From 4e47bbee06405811523f5426e812620ac58e86d4 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Wed, 14 May 2014 00:50:06 +0100
Subject: [PATCH 022/152] gitignore to ignore build directory names
---
.gitignore | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index ce6a3c4b7..efb6cf096 100644
--- a/.gitignore
+++ b/.gitignore
@@ -138,4 +138,4 @@ Examples/test-suite/uffi/*/
Examples/scratch
# Out of source tree build directories
-_build*/
+*build*/
From d927fa5376d7c1c19568ab653f1097ef082cae00 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Wed, 14 May 2014 22:23:40 +0100
Subject: [PATCH 023/152] Remove unnecessary make invocation when running
test-suite
---
Makefile.in | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 8c6072b41..da9dfdce5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -285,9 +285,6 @@ check-test-suite: \
check-javascript-test-suite
check-%-test-suite:
- @if test -d Examples/test-suite/$*; then \
- cd Examples/test-suite/$* && $(MAKE) Makefile; \
- fi
@if test -z "$(skip-$*)"; then \
echo $* unknown; \
exit 1; \
From 18d72f4562745f725e981443248b8fbea1a55cae Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Thu, 15 May 2014 20:27:01 +0100
Subject: [PATCH 024/152] Add in CPPFLAGS and LDFLAGS to examples/test-suite
- Split current usage of CXXFLAGS into the conventional CPPFLAGS CXXFLAGS and LDFLAGS
- Split current usage of CFLAGS into the conventional CPPFLAGS CFLAGS and LDFLAGS
- This restores 'make whatever CXXFLAGS=-g' which stopped working during
the recently added suppport for out of source builds.
- LDFLAGS is currently empty, but is there for future use
---
Examples/Makefile.in | 230 ++++++++++++++--------------
Examples/chicken/class/Makefile | 1 -
Examples/chicken/constants/Makefile | 1 -
Examples/chicken/multimap/Makefile | 1 -
Examples/chicken/overload/Makefile | 1 -
Examples/chicken/simple/Makefile | 1 -
Tools/javascript/Makefile.in | 10 +-
7 files changed, 121 insertions(+), 124 deletions(-)
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index d22a85abc..7c2d23647 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -45,8 +45,10 @@ endif
TARGET =
CC = @CC@
CXX = @CXX@
-CFLAGS = $(SRCDIR_INCLUDE) @PLATCFLAGS@
-CXXFLAGS = $(SRCDIR_INCLUDE) @BOOST_CPPFLAGS@ @PLATCXXFLAGS@
+CPPFLAGS = $(SRCDIR_INCLUDE)
+CFLAGS = @PLATCFLAGS@
+CXXFLAGS = @BOOST_CPPFLAGS@ @PLATCXXFLAGS@
+LDFLAGS =
prefix = @prefix@
exec_prefix= @exec_prefix@
SRCS =
@@ -155,12 +157,12 @@ TCL_SCRIPT = $(SRCDIR)$(RUNME).tcl
tclsh: $(SRCDIR_SRCS)
$(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i -o $(ISRCS) $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) \
$(TCL_LIB) $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET)
tclsh_cpp: $(SRCDIR_SRCS)
$(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) \
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) \
$(TCL_LIB) $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET)
# -----------------------------------------------------------
@@ -169,8 +171,8 @@ tclsh_cpp: $(SRCDIR_SRCS)
tcl: $(SRCDIR_SRCS)
$(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE)
- $(TCLLDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(TCL_SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE)
+ $(TCLLDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(TCL_SO)
# -----------------------------------------------------------
# Build a Tcl7.5 dynamic loadable module for C++
@@ -178,8 +180,8 @@ tcl: $(SRCDIR_SRCS)
tcl_cpp: $(SRCDIR_SRCS)
$(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE)
- $(TCLCXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(TCL_SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE)
+ $(TCLCXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(TCL_SO)
# -----------------------------------------------------------------
# Run Tcl example
@@ -230,8 +232,8 @@ PERL5_SCRIPT = $(SRCDIR)$(RUNME).pl
perl5: $(SRCDIR_SRCS)
$(SWIG) -perl5 $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c -Dbool=char $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(PERL5_CCFLAGS) $(PERL5_CCCDLFLAGS) -I$(PERL5_INCLUDE)
- $(LDSHARED) $(CFLAGS) $(PERL5_CCDLFLAGS) $(OBJS) $(IOBJS) $(PERL5_LDFLAGS) $(PERL5_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CC) -c -Dbool=char $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(PERL5_CCFLAGS) $(PERL5_CCCDLFLAGS) -I$(PERL5_INCLUDE)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(PERL5_CCDLFLAGS) $(OBJS) $(IOBJS) $(PERL5_LDFLAGS) $(PERL5_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# ----------------------------------------------------------------
# Build a Perl5 dynamically loadable module (C++)
@@ -239,15 +241,15 @@ perl5: $(SRCDIR_SRCS)
perl5_cpp: $(SRCDIR_SRCS)
$(SWIG) -perl5 -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PERL5_CCFLAGS) $(PERL5_CCCDLFLAGS) -I$(PERL5_INCLUDE)
- $(CXXSHARED) $(CXXFLAGS) $(PERL5_CCDLFLAGS) $(OBJS) $(IOBJS) $(PERL5_LDFLAGS) $(PERL5_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PERL5_CCFLAGS) $(PERL5_CCCDLFLAGS) -I$(PERL5_INCLUDE)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(PERL5_CCDLFLAGS) $(OBJS) $(IOBJS) $(PERL5_LDFLAGS) $(PERL5_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# ----------------------------------------------------------------
# Build a module from existing XS C source code. (ie. from xsubpp).
# ----------------------------------------------------------------
perl5_xs: $(SRCDIR_SRCS)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(INCLUDES) -I$(PERL5_INCLUDE)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(LIBS) -o $(TARGET)$(SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(SRCDIR_SRCS) $(INCLUDES) -I$(PERL5_INCLUDE)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(TARGET)$(SO)
# ----------------------------------------------------------------
# Build a statically linked Perl5 executable
@@ -255,11 +257,11 @@ perl5_xs: $(SRCDIR_SRCS)
perl5_static: $(SRCDIR_SRCS)
$(SWIG) -perl5 -static -lperlmain.i $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) $(CFLAGS) -Dbool=char $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -Dbool=char $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
perl5_static_cpp: $(SRCDIR_SRCS)
$(SWIG) -perl5 -c++ -static -lperlmain.i $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
# -----------------------------------------------------------------
# Running a Perl5 example
@@ -324,8 +326,8 @@ endif
python: $(SRCDIR_SRCS)
$(SWIGPYTHON) $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(PYTHON_INCLUDE)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) -o $(LIBPREFIX)_$(TARGET)$(PYTHON_SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(PYTHON_INCLUDE)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) -o $(LIBPREFIX)_$(TARGET)$(PYTHON_SO)
# -----------------------------------------------------------------
# Build a C++ dynamically loadable module
@@ -333,8 +335,8 @@ python: $(SRCDIR_SRCS)
python_cpp: $(SRCDIR_SRCS)
$(SWIGPYTHON) -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(PYTHON_INCLUDE)
- $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)_$(TARGET)$(PYTHON_SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(PYTHON_INCLUDE)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)_$(TARGET)$(PYTHON_SO)
# -----------------------------------------------------------------
# Build statically linked Python interpreter
@@ -349,12 +351,12 @@ PYTHON_LIBOPTS = $(PYTHON_LINK) @LIBS@ $(TKINTER) $(SYSLIBS)
python_static: $(SRCDIR_SRCS)
$(SWIGPYTHON) -lembed.i $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) $(CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
$(PYTHON_INCLUDE) $(LIBS) -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET)
python_static_cpp: $(SRCDIR_SRCS)
$(SWIGPYTHON) -c++ -lembed.i $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
$(PYTHON_INCLUDE) $(LIBS) -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET)
# -----------------------------------------------------------------
@@ -423,9 +425,9 @@ OCTAVE_SCRIPT = $(SRCDIR)$(RUNME).m
octave: $(SRCDIR_SRCS)
$(SWIG) -octave $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -g -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(INCLUDES) $(OCTAVE_CXX)
- $(CC) -g -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CSRCS) $(INCLUDES)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(OCTAVE_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(OCTAVE_SO)
+ $(CXX) -g -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(ICXXSRCS) $(INCLUDES) $(OCTAVE_CXX)
+ $(CC) -g -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CSRCS) $(INCLUDES)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(OCTAVE_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(OCTAVE_SO)
# -----------------------------------------------------------------
# Build a C++ dynamically loadable module
@@ -433,8 +435,8 @@ octave: $(SRCDIR_SRCS)
octave_cpp: $(SRCDIR_SRCS)
$(SWIG) -c++ -octave $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -g -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(OCTAVE_CXX)
- $(CXXSHARED) -g $(CXXFLAGS) $(OBJS) $(IOBJS) $(OCTAVE_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(OCTAVE_SO)
+ $(CXX) -g -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(OCTAVE_CXX)
+ $(CXXSHARED) -g $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(OCTAVE_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(OCTAVE_SO)
# -----------------------------------------------------------------
# Running an Octave example
@@ -478,14 +480,14 @@ GUILE_SCRIPT = $(SRCDIR)$(RUNME).scm
#------------------------------------------------------------------
guile: $(SRCDIR_SRCS)
$(SWIG) -guile -Linkage passive $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(GUILE_CFLAGS) $(ISRCS) $(SRCDIR_SRCS)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(GUILE_LIBS) $(LIBS) -o $(GUILE_LIBPREFIX)$(TARGET)$(GUILE_SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) $(GUILE_CFLAGS) $(ISRCS) $(SRCDIR_SRCS)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(GUILE_LIBS) $(LIBS) -o $(GUILE_LIBPREFIX)$(TARGET)$(GUILE_SO)
guile_cpp: $(GUILE_LIBPREFIX)$(TARGET)$(GUILE_SO)
$(GUILE_LIBPREFIX)$(TARGET)$(GUILE_SO): $(SRCDIR_SRCS)
$(SWIG) -c++ -guile -Linkage passive $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(INCLUDES) $(GUILE_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS)
- $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(GUILE_LIBS) $(LIBS) $(CPP_DLLIBS) -o $@
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES) $(GUILE_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(GUILE_LIBS) $(LIBS) $(CPP_DLLIBS) -o $@
guile_externalhdr:
$(SWIG) -guile -external-runtime $(TARGET)
@@ -496,7 +498,7 @@ guile_externalhdr:
guile_augmented: $(SRCDIR_SRCS)
$(SWIG) -guile $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) $(CXXFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) -o $(TARGET)
+ $(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) -o $(TARGET)
# -----------------------------------------------------------------
# Build statically linked Guile interpreter
@@ -504,24 +506,24 @@ guile_augmented: $(SRCDIR_SRCS)
guile_static: $(SRCDIR_SRCS)
$(SWIG) -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
-DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \
$(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) $(GUILE_LIBOPTS) -o $(TARGET)-guile
guile_static_cpp: $(SRCDIR_SRCS)
$(SWIG) -c++ -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
-DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \
$(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) $(GUILE_LIBOPTS) -o $(TARGET)-guile
guile_simple: $(SRCDIR_SRCS)
$(SWIG) -guile -lguilemain.i -Linkage simple $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
$(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) $(GUILE_LIBOPTS) -o $(TARGET)-guile
guile_simple_cpp: $(SRCDIR_SRCS)
$(SWIG) -c++ -guile -lguilemain.i -Linkage simple $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
$(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) $(GUILE_LIBOPTS) -o $(TARGET)-guile
# -----------------------------------------------------------------
@@ -575,8 +577,8 @@ JAVAC = @JAVAC@ -d .
java: $(SRCDIR_SRCS)
$(SWIG) -java $(SWIGOPT) -o $(ISRCS) $(realpath $(INTERFACEPATH))
- $(CC) -c $(CCSHARED) $(CFLAGS) $(JAVACFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(JAVA_INCLUDE)
- $(JAVALDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) -o $(JAVA_LIBPREFIX)$(TARGET)$(JAVASO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(JAVACFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(JAVA_INCLUDE)
+ $(JAVALDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) -o $(JAVA_LIBPREFIX)$(TARGET)$(JAVASO)
# ----------------------------------------------------------------
# Build a java dynamically loadable module (C++)
@@ -584,8 +586,8 @@ java: $(SRCDIR_SRCS)
java_cpp: $(SRCDIR_SRCS)
$(SWIG) -java -c++ $(SWIGOPT) -o $(ICXXSRCS) $(realpath $(INTERFACEPATH))
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(JAVACFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(JAVA_INCLUDE)
- $(JAVACXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(JAVA_LIBPREFIX)$(TARGET)$(JAVASO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(JAVACFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(JAVA_INCLUDE)
+ $(JAVACXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(JAVA_LIBPREFIX)$(TARGET)$(JAVASO)
# ----------------------------------------------------------------
# Compile java files
@@ -646,16 +648,16 @@ javascript_wrapper_cpp: $(SRCDIR_SRCS)
$(SWIG) -javascript -c++ $(SWIGOPT) -o $(INTERFACEDIR)$(TARGET)_wrap.cxx $(INTERFACEPATH)
javascript_build: $(SRCDIR_SRCS)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(JSINCLUDES)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(JSINCLUDES)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
javascript_build_cpp: $(SRCDIR_SRCS)
ifeq (node,$(JSENGINE))
sed -e 's|$$srcdir|./$(SRCDIR)|g' $(SRCDIR)binding.gyp.in > binding.gyp
$(NODEGYP) --loglevel=silent configure build 1>>/dev/null
else
- $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
- $(CXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
+ $(CXXSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
endif
@@ -664,17 +666,17 @@ endif
javascript: $(SRCDIR_SRCS) javascript_custom_interpreter
$(SWIG) -javascript $(SWIGOPT) $(INTERFACEPATH)
ifeq (jsc, $(ENGINE))
- $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(JSINCLUDES)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(JSINCLUDES)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
else # (v8 | node) # v8 and node must be compiled as c++
- $(CXX) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
- $(CXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
+ $(CXXSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
endif
javascript_cpp: $(SRCDIR_SRCS) javascript_custom_interpreter
$(SWIG) -javascript -c++ $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
- $(CXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
+ $(CXXSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
# Running a Javascript example
@@ -797,8 +799,6 @@ MODULA3_INCLUDE= @MODULA3INC@
modula3: $(SRCDIR_SRCS)
$(SWIG) -modula3 $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
-# $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) \
-# $(OBJS) $(IOBJS) $(LIBS)
modula3_cpp: $(SRCDIR_SRCS)
$(SWIG) -modula3 -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
@@ -848,7 +848,7 @@ mzscheme: $(SRCDIR_SRCS)
mzscheme_cpp: $(SRCDIR_SRCS)
$(SWIG) -mzscheme -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
$(COMPILETOOL) $(MZC) `echo $(INCLUDES) | sed 's/-I/++ccf -I/g'` --cc $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS)
- $(CXXSHARED) $(CXXFLAGS) -o $(LIBPREFIX)$(TARGET)$(MZSCHEME_SO) $(OBJS) $(IOBJS) $(MZDYNOBJ) $(CPP_DLLIBS)
+ $(CXXSHARED) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $(LIBPREFIX)$(TARGET)$(MZSCHEME_SO) $(OBJS) $(IOBJS) $(MZDYNOBJ) $(CPP_DLLIBS)
# -----------------------------------------------------------------
# Run mzscheme example
@@ -913,7 +913,7 @@ ocaml_dynamic: $(SRCDIR_SRCS)
$(OCAMLCORE)
$(SWIG) -ocaml $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
$(OCC) -g -c -ccopt -g -ccopt "$(INCLUDES)" $(ISRCS) $(SRCDIR_SRCS)
- $(CXXSHARED) $(CXXFLAGS) $(CCSHARED) $(CFLAGS) -o $(INTERFACE:%.i=%@SO@) \
+ $(CXXSHARED) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(CCSHARED) -o $(INTERFACE:%.i=%@SO@) \
$(INTERFACE:%.i=%_wrap.@OBJEXT@) $(OBJS) $(LIBS)
$(OCAMLDLGEN) $(INTERFACE:%.i=%.ml) $(INTERFACE:%.i=%@SO@) > \
$(INTERFACE:%.i=%_dynamic.ml)
@@ -984,7 +984,7 @@ ocaml_dynamic_cpp: $(SRCDIR_SRCS)
cp $(ICXXSRCS) $(ICXXSRCS:%.cxx=%.c)
$(OCC) -cc '$(CXX) -Wno-write-strings' -g -c -ccopt -g -ccopt "-xc++ $(INCLUDES)" \
$(ICXXSRCS:%.cxx=%.c) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) -ccopt -fPIC
- $(CXXSHARED) $(CXXFLAGS) -o $(INTERFACE:%.i=%@SO@) \
+ $(CXXSHARED) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $(INTERFACE:%.i=%@SO@) \
$(INTERFACE:%.i=%_wrap.@OBJEXT@) $(OBJS) \
$(CPP_DLLIBS) $(LIBS)
$(OCAMLDLGEN) $(INTERFACE:%.i=%.ml) $(INTERFACE:%.i=%@SO@) > \
@@ -1045,8 +1045,8 @@ RUBY_SCRIPT = $(SRCDIR)$(RUNME).rb
ruby: $(SRCDIR_SRCS)
$(SWIG) -ruby $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(RUBY_INCLUDE)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(RUBY_SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(RUBY_INCLUDE)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(RUBY_SO)
# -----------------------------------------------------------------
# Build a C++ dynamically loadable module
@@ -1054,8 +1054,8 @@ ruby: $(SRCDIR_SRCS)
ruby_cpp: $(SRCDIR_SRCS)
$(SWIG) -c++ -ruby $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(RUBY_INCLUDE)
- $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(RUBY_SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(RUBY_INCLUDE)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(RUBY_SO)
# -----------------------------------------------------------------
# Build statically linked Ruby interpreter
@@ -1066,12 +1066,12 @@ ruby_cpp: $(SRCDIR_SRCS)
ruby_static: $(SRCDIR_SRCS)
$(SWIG) -ruby -lembed.i $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(RUBY_CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(RUBY_CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
$(RUBY_INCLUDE) $(LIBS) -L$(RUBY_LIB) $(RUBY_LIBOPTS) -o $(TARGET)
ruby_cpp_static: $(SRCDIR_SRCS)
$(SWIG) -c++ -ruby -lembed.i $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
$(RUBY_INCLUDE) $(LIBS) -L$(RUBY_LIB) $(RUBY_LIBOPTS) -o $(TARGET)
# -----------------------------------------------------------------
@@ -1112,8 +1112,8 @@ PHP_SCRIPT = $(SRCDIR)$(RUNME).php
php: $(SRCDIR_SRCS)
$(SWIG) -php $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(PHP_INCLUDE)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(PHP_INCLUDE)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO)
# --------------------------------------------------------------------
# Build a PHP dynamically loadable module (C++)
@@ -1121,8 +1121,8 @@ php: $(SRCDIR_SRCS)
php_cpp: $(SRCDIR_SRCS)
$(SWIG) -php -cppext cxx -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PHP_INCLUDE)
- $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PHP_INCLUDE)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO)
# -----------------------------------------------------------------
# Running a PHP example
@@ -1166,8 +1166,8 @@ PIKE_SCRIPT = $(RUNME).pike
pike: $(SRCDIR_SRCS)
$(SWIG) -pike $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(PIKE_CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(PIKE_INCLUDE)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(PIKE_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(PIKE_CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(PIKE_INCLUDE)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(PIKE_DLNK) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
# Build a C++ dynamically loadable module
@@ -1175,8 +1175,8 @@ pike: $(SRCDIR_SRCS)
pike_cpp: $(SRCDIR_SRCS)
$(SWIG) -c++ -pike $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(PIKE_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(PIKE_INCLUDE)
- $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(PIKE_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(PIKE_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(PIKE_INCLUDE)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(PIKE_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
# Build statically linked Pike interpreter
@@ -1187,12 +1187,12 @@ pike_cpp: $(SRCDIR_SRCS)
pike_static: $(SRCDIR_SRCS)
$(SWIG) -pike -lembed.i $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(PIKE_CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(PIKE_CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) \
$(PIKE_INCLUDE) $(LIBS) -L$(PIKE_LIB) $(PIKE_LIBOPTS) -o $(TARGET)
pike_cpp_static: $(SRCDIR_SRCS)
$(SWIG) -c++ -pike -lembed.i $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(PIKE_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(PIKE_CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) \
$(PIKE_INCLUDE) $(LIBS) -L$(PIKE_LIB) $(PIKE_LIBOPTS) -o $(TARGET)
# -----------------------------------------------------------------
@@ -1253,9 +1253,9 @@ chicken_direct: $(SRCDIR_SRCS)
$(CHICKEN) $(CHICKEN_GENERATED_SCHEME) $(CHICKENOPTS) \
-dynamic -feature chicken-compile-shared \
-output-file $(CHICKEN_COMPILED_SCHEME)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(CHICKEN_CFLAGS) \
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(CHICKEN_CFLAGS) \
$(INCLUDES) $(CHICKEN_INCLUDE) $(ISRCS) $(SRCDIR_SRCS) $(CHICKEN_COMPILED_SCHEME)
- $(LDSHARED) $(CFLAGS) $(CHICKEN_COMPILED_OBJECT) $(OBJS) $(IOBJS) \
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(CHICKEN_COMPILED_OBJECT) $(OBJS) $(IOBJS) \
$(LIBS) $(CHICKEN_SHAREDLIBOPTS) -o $(LIBPREFIX)$(TARGET)$(SO)
chicken_direct_cpp: $(SRCDIR_CXXSRCS) $(CHICKSRCS)
@@ -1263,9 +1263,9 @@ chicken_direct_cpp: $(SRCDIR_CXXSRCS) $(CHICKSRCS)
$(CHICKEN) $(CHICKEN_GENERATED_SCHEME) $(CHICKENOPTS) \
-dynamic -feature chicken-compile-shared \
-output-file $(CHICKEN_COMPILED_SCHEME)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(CHICKEN_CFLAGS) \
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(CHICKEN_CFLAGS) \
$(INCLUDES) $(CHICKEN_INCLUDE) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(CHICKEN_COMPILED_SCHEME)
- $(CXXSHARED) $(CXXFLAGS) $(CHICKEN_COMPILED_OBJECT) $(OBJS) $(IOBJS) \
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(CHICKEN_COMPILED_OBJECT) $(OBJS) $(IOBJS) \
$(LIBS) $(CPP_DLLIBS) $(CHICKEN_SHAREDLIBOPTS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
@@ -1279,10 +1279,10 @@ chicken_static: $(SRCDIR_SRCS) $(CHICKSRCS)
-output-file $(CHICKEN_COMPILED_SCHEME)
$(CHICKEN) $(CHICKEN_MAIN) $(CHICKENOPTS) \
-output-file $(CHICKEN_MAIN:.scm=_chicken.c)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(CHICKEN_CFLAGS) \
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(CHICKEN_CFLAGS) \
$(INCLUDES) $(CHICKEN_INCLUDE) $(ISRCS) $(SRCDIR_SRCS) \
$(CHICKEN_COMPILED_SCHEME) $(CHICKEN_COMPILED_MAIN)
- $(CC) $(CHICKEN_COMPILED_OBJECT) $(CHICKEN_COMPILED_MAIN_OBJECT) \
+ $(CC) $(CFLAGS) $(LDFLAGS) $(CHICKEN_COMPILED_OBJECT) $(CHICKEN_COMPILED_MAIN_OBJECT) \
$(OBJS) $(IOBJS) $(LIBS) $(CHICKEN_SHAREDLIBOPTS) -o $(TARGET)
chicken_static_cpp: $(SRCDIR_CXXSRCS) $(CHICKSRCS)
@@ -1291,10 +1291,10 @@ chicken_static_cpp: $(SRCDIR_CXXSRCS) $(CHICKSRCS)
-output-file $(CHICKEN_COMPILED_SCHEME)
$(CHICKEN) $(CHICKEN_MAIN) $(CHICKENOPTS) \
-output-file $(CHICKEN_MAIN:.scm=_chicken.c)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(CHICKEN_CFLAGS) \
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(CHICKEN_CFLAGS) \
$(INCLUDES) $(CHICKEN_INCLUDE) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) \
$(CHICKEN_COMPILED_SCHEME) $(CHICKEN_COMPILED_MAIN)
- $(CXX) $(CHICKEN_COMPILED_OBJECT) $(CHICKEN_COMPILED_MAIN_OBJECT) \
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(CHICKEN_COMPILED_OBJECT) $(CHICKEN_COMPILED_MAIN_OBJECT) \
$(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) $(CHICKEN_SHAREDLIBOPTS) -o $(TARGET)
# ----------------------------------------------------------------
@@ -1355,8 +1355,8 @@ CSHARP_RUNME = $(CSHARPCILINTERPRETER) $(CSHARPCILINTERPRETER_FLAGS) ./$(RUNME).
csharp: $(SRCDIR_SRCS)
$(SWIG) -csharp $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(CSHARPCFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(CSHARP_DLNK) $(LIBS) -o $(CSHARP_LIBPREFIX)$(TARGET)$(CSHARPSO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(CSHARPCFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(CSHARP_DLNK) $(LIBS) -o $(CSHARP_LIBPREFIX)$(TARGET)$(CSHARPSO)
# ----------------------------------------------------------------
# Build a CSharp dynamically loadable module (C++)
@@ -1364,8 +1364,8 @@ csharp: $(SRCDIR_SRCS)
csharp_cpp: $(SRCDIR_SRCS)
$(SWIG) -csharp -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(CSHARPCFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES)
- $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(CSHARP_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(CSHARP_LIBPREFIX)$(TARGET)$(CSHARPSO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(CSHARPCFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(CSHARP_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(CSHARP_LIBPREFIX)$(TARGET)$(CSHARPSO)
# ----------------------------------------------------------------
# Compile CSharp files
@@ -1428,8 +1428,8 @@ LUA_INTERP = ../lua.c
lua: $(SRCDIR_SRCS)
$(SWIG) -lua $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(LUA_INCLUDE)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(LUA_LIB) -o $(LIBPREFIX)$(TARGET)$(LUA_SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(LUA_INCLUDE)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(LUA_LIB) -o $(LIBPREFIX)$(TARGET)$(LUA_SO)
# -----------------------------------------------------------------
# Build a C++ dynamically loadable module
@@ -1437,8 +1437,8 @@ lua: $(SRCDIR_SRCS)
lua_cpp: $(SRCDIR_SRCS) $(GENCXXSRCS)
$(SWIG) -c++ -lua $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(GENCXXSRCS) $(INCLUDES) $(LUA_INCLUDE)
- $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(LUA_LIB) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(LUA_SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(GENCXXSRCS) $(INCLUDES) $(LUA_INCLUDE)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(LUA_LIB) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(LUA_SO)
# -----------------------------------------------------------------
# Build statically linked Lua interpreter
@@ -1446,12 +1446,12 @@ lua_cpp: $(SRCDIR_SRCS) $(GENCXXSRCS)
lua_static: $(SRCDIR_SRCS)
$(SWIG) -lua -module example $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(SRCDIR)$(LUA_INTERP) $(INCLUDES) \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(SRCDIR)$(LUA_INTERP) $(INCLUDES) \
$(LUA_INCLUDE) $(LIBS) $(LUA_LIB) -o $(TARGET)
lua_static_cpp: $(SRCDIR_SRCS) $(GENCXXSRCS)
$(SWIG) -c++ -lua -module example $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(GENCXXSRCS) $(SRCDIR)$(LUA_INTERP) $(INCLUDES) \
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(GENCXXSRCS) $(SRCDIR)$(LUA_INTERP) $(INCLUDES) \
$(LUA_INCLUDE) $(LIBS) $(LUA_LIB) -o $(TARGET)
# -----------------------------------------------------------------
@@ -1489,13 +1489,13 @@ ALLEGROCL_SCRIPT=$(RUNME).lisp
allegrocl: $(SRCDIR_SRCS)
$(SWIG) -allegrocl -cwrap $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCDIR_SRCS)
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCDIR_SRCS)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
allegrocl_cpp: $(SRCDIR_SRCS)
$(SWIG) -c++ -allegrocl $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES)
- $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
# Run ALLEGRO CL example
@@ -1565,13 +1565,13 @@ CFFI_SCRIPT=$(RUNME).lisp
cffi: $(SRCDIR_SRCS)
$(SWIG) -cffi $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
-# $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCDIR_SRCS)
-# $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+# $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCDIR_SRCS)
+# $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
cffi_cpp: $(SRCDIR_SRCS)
$(SWIG) -c++ -cffi $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES)
- $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
# Run CFFI example
@@ -1605,13 +1605,13 @@ UFFI_SCRIPT=$(RUNME).lisp
uffi: $(SRCDIR_SRCS)
$(SWIG) -uffi $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
-# $(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCDIR_SRCS)
-# $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+# $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ISRCS) $(INCLUDES) $(SRCDIR_SRCS)
+# $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
uffi_cpp: $(SRCDIR_SRCS)
$(SWIG) -c++ -uffi $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
-# $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES)
-# $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+# $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES)
+# $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
# Run UFFI example
@@ -1657,7 +1657,7 @@ R_SCRIPT=$(RUNME).R
r: $(SRCDIR_SRCS)
$(SWIG) -r $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
ifneq ($(SRCDIR_SRCS),)
- $(CC) -g -c $(CFLAGS) $(R_CFLAGS) $(SRCDIR_SRCS) $(INCLUDES)
+ $(CC) -g -c $(CPPFLAGS) $(CFLAGS) $(R_CFLAGS) $(SRCDIR_SRCS) $(INCLUDES)
endif
+( PKG_CPPFLAGS="$(INCLUDES)" $(COMPILETOOL) $(R) CMD SHLIB -o $(LIBPREFIX)$(TARGET)$(SO) $(ISRCS) $(OBJS) > /dev/null )
@@ -1668,7 +1668,7 @@ endif
r_cpp: $(SRCDIR_CXXSRCS)
$(SWIG) -c++ -r $(SWIGOPT) -o $(RCXXSRCS) $(INTERFACEPATH)
ifneq ($(SRCDIR_CXXSRCS),)
- $(CXX) -g -c $(CXXFLAGS) $(R_CFLAGS) $(SRCDIR_CXXSRCS) $(INCLUDES)
+ $(CXX) -g -c $(CPPFLAGS) $(CXXFLAGS) $(R_CFLAGS) $(SRCDIR_CXXSRCS) $(INCLUDES)
endif
+( PKG_CPPFLAGS="$(INCLUDES)" $(COMPILETOOL) $(R) CMD SHLIB -o $(LIBPREFIX)$(TARGET)$(SO) $(RCXXSRCS) $(OBJS) > /dev/null )
@@ -1732,10 +1732,10 @@ GOGCCOBJS = $(GOSRCS:.go=.@OBJEXT@)
go: $(SRCDIR_SRCS)
$(SWIG) -go $(GOOPT) $(GOSWIGARG) $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
if $(GO12) || $(GO13) || $(GOGCC); then \
- $(CC) -g -c $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES); \
+ $(CC) -g -c $(CPPFLAGS) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES); \
else \
- $(CC) -g -c $(CCSHARED) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES); \
- $(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO); \
+ $(CC) -g -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES); \
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO); \
fi
$(COMPILETOOL) $(GO) $(GOCOMPILEARG) -I . $(GOSRCS)
if ! $(GOGCC) ; then \
@@ -1755,7 +1755,7 @@ go: $(SRCDIR_SRCS)
if $(GOGCC) ; then \
$(COMPILETOOL) $(GO) -o $(RUNME) $(RUNME).@OBJEXT@ $(GOGCCOBJS) $(OBJS) $(IOBJS); \
elif $(GO12) || $(GO13); then \
- $(COMPILETOOL) $(GOTOOL) $(GOLD) -linkmode external -extld "$(CC)" -extldflags "$(CFLAGS)" -o $(RUNME) $(RUNME).$(GOOBJEXT); \
+ $(COMPILETOOL) $(GOTOOL) $(GOLD) -linkmode external -extld "$(CC)" -extldflags "$(CFLAGS) $(LDFLAGS)" -o $(RUNME) $(RUNME).$(GOOBJEXT); \
else \
$(COMPILETOOL) $(GOTOOL) $(GOLD) -r $${GOROOT:-`go env GOROOT`}/pkg/$${GOOS:-`go env GOOS`}_$${GOARCH:-`go env GOARCH`}:. -o $(RUNME) $(RUNME).$(GOOBJEXT); \
fi; \
@@ -1768,10 +1768,10 @@ go: $(SRCDIR_SRCS)
go_cpp: $(SRCDIR_SRCS)
$(SWIG) -go -c++ $(GOOPT) $(GOSWIGARG) $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
if $(GO12) || $(GO13) || $(GOGCC); then \
- $(CXX) -g -c $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES); \
+ $(CXX) -g -c $(CPPFLAGS) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES); \
else \
- $(CXX) -g -c $(CCSHARED) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES); \
- $(CXXSHARED) $(CXXFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO); \
+ $(CXX) -g -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES); \
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO); \
fi
$(COMPILETOOL) $(GO) $(GOCOMPILEARG) -I . $(GOSRCS)
if ! $(GOGCC) ; then \
@@ -1791,7 +1791,7 @@ go_cpp: $(SRCDIR_SRCS)
if $(GOGCC) ; then \
$(COMPILETOOL) $(GO) -o $(RUNME) $(RUNME).@OBJEXT@ $(GOGCCOBJS) $(OBJS) $(IOBJS) -lstdc++; \
elif $(GO12) || $(GO13); then \
- $(COMPILETOOL) $(GOTOOL) $(GOLD) -linkmode external -extld "$(CXX)" -extldflags "$(CXXFLAGS)" -o $(RUNME) $(RUNME).$(GOOBJEXT); \
+ $(COMPILETOOL) $(GOTOOL) $(GOLD) -linkmode external -extld "$(CXX)" -extldflags "$(CXXFLAGS) $(LDFLAGS)" -o $(RUNME) $(RUNME).$(GOOBJEXT); \
else \
$(COMPILETOOL) $(GOTOOL) $(GOLD) -r $${GOROOT:-`go env GOROOT`}/pkg/$${GOOS:-`go env GOOS`}_$${GOARCH:-`go env GOARCH`}:. -o $(RUNME) $(RUNME).$(GOOBJEXT); \
fi; \
@@ -1846,8 +1846,8 @@ D_RUNME = ./$(RUNME)
d: $(SRCDIR_SRCS)
$(SWIGD) $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) -c $(CCSHARED) $(CFLAGS) $(DCFLAGS) $(EXTRA_CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES)
- $(LDSHARED) $(CFLAGS) $(DCFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(DLIBPREFIX)$(TARGET)$(SO)
+ $(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(DCFLAGS) $(EXTRA_CFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES)
+ $(LDSHARED) $(CFLAGS) $(LDFLAGS) $(DCFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(DLIBPREFIX)$(TARGET)$(SO)
# ----------------------------------------------------------------
# Build a dynamically loadable D wrapper for a C++ module
@@ -1855,8 +1855,8 @@ d: $(SRCDIR_SRCS)
d_cpp: $(SRCDIR_SRCS)
$(SWIGD) -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CXXFLAGS) $(DCFLAGS) $(EXTRA_CFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES)
- $(CXXSHARED) $(CXXFLAGS) $(DCFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(DLIBPREFIX)$(TARGET)$(SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(DCFLAGS) $(EXTRA_CFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(DCFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(DLIBPREFIX)$(TARGET)$(SO)
# ----------------------------------------------------------------
# Compile D files
diff --git a/Examples/chicken/class/Makefile b/Examples/chicken/class/Makefile
index 5fafa5c15..a37ea4a85 100644
--- a/Examples/chicken/class/Makefile
+++ b/Examples/chicken/class/Makefile
@@ -6,7 +6,6 @@ CXXSRCS = example.cxx
TARGET = class
INCLUDE =
SWIGOPT =
-CFLAGS =
VARIANT =
# uncomment the following lines to build a static exe (only pick one of the CHICKEN_MAIN lines)
diff --git a/Examples/chicken/constants/Makefile b/Examples/chicken/constants/Makefile
index a6100f757..7167e866b 100644
--- a/Examples/chicken/constants/Makefile
+++ b/Examples/chicken/constants/Makefile
@@ -6,7 +6,6 @@ CXXSRCS =
TARGET = constants
INCLUDE =
SWIGOPT =
-CFLAGS =
VARIANT =
# uncomment the following two lines to build a static exe
diff --git a/Examples/chicken/multimap/Makefile b/Examples/chicken/multimap/Makefile
index 79282be17..e8192e9cd 100644
--- a/Examples/chicken/multimap/Makefile
+++ b/Examples/chicken/multimap/Makefile
@@ -6,7 +6,6 @@ CXXSRCS =
TARGET = multimap
INCLUDE =
SWIGOPT =
-CFLAGS =
VARIANT =
# uncomment the following two lines to build a static exe
diff --git a/Examples/chicken/overload/Makefile b/Examples/chicken/overload/Makefile
index 717abd335..a9647d93e 100644
--- a/Examples/chicken/overload/Makefile
+++ b/Examples/chicken/overload/Makefile
@@ -6,7 +6,6 @@ CXXSRCS = example.cxx
TARGET = overload
INCLUDE =
SWIGOPT = -proxy -unhideprimitive
-CFLAGS =
VARIANT =
# uncomment the following lines to build a static exe
diff --git a/Examples/chicken/simple/Makefile b/Examples/chicken/simple/Makefile
index 9d1f34fa0..c07075efa 100644
--- a/Examples/chicken/simple/Makefile
+++ b/Examples/chicken/simple/Makefile
@@ -6,7 +6,6 @@ CXXSRCS =
TARGET = simple
INCLUDE =
SWIGOPT =
-CFLAGS =
VARIANT =
# uncomment the following two lines to build a static exe
diff --git a/Tools/javascript/Makefile.in b/Tools/javascript/Makefile.in
index d5c4711a0..960c661b2 100644
--- a/Tools/javascript/Makefile.in
+++ b/Tools/javascript/Makefile.in
@@ -16,9 +16,11 @@ all: javascript
CC = @CC@
# HACK: under OSX a g++ compiled interpreter is seg-faulting when loading module libraries
# with 'c++' it works... probably some missing flags?
-JSCXX = @JSINTERPRETERCXX@
+JSCXX = @JSINTERPRETERCXX@
+CPPFLAGS = @BOOST_CPPFLAGS@
CFLAGS = @PLATCFLAGS@
-CXXFLAGS = @BOOST_CPPFLAGS@ @PLATCXXFLAGS@
+CXXFLAGS = @PLATCXXFLAGS@
+LDFLAGS =
LINKFLAGS = @JSINTERPRETERLINKFLAGS@
ROOT_DIR = @ROOT_DIR@
@@ -54,10 +56,10 @@ JS_INTERPRETER_SRC = javascript.cxx js_shell.cxx $(JS_INTERPRETER_SRC_JSC) $(JS_
JS_INTERPRETER_OBJS = $(JS_INTERPRETER_SRC:.cxx=.o)
%.o: $(srcdir)/%.cxx
- $(JSCXX) $(JS_INTERPRETER_DEFINES) $(CXXFLAGS) $(JSINCLUDES) -o $@ -c $<
+ $(JSCXX) $(JS_INTERPRETER_DEFINES) $(CPPFLAGS) $(CXXFLAGS) $(JSINCLUDES) -o $@ -c $<
javascript: $(JS_INTERPRETER_OBJS)
- $(JSCXX) $^ $(CXXFLAGS) -o javascript $(JSDYNAMICLINKING) $(LINKFLAGS)
+ $(JSCXX) $^ $(CXXFLAGS) $(LDFLAGS) -o javascript $(JSDYNAMICLINKING) $(LINKFLAGS)
clean:
rm -f *.o
From ce5f49463e98fe2825e87f1b1f76e6602f32f4f0 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Thu, 15 May 2014 20:50:05 +0100
Subject: [PATCH 025/152] Remove duplicate test target in CCache Makefile
---
CCache/Makefile.in | 2 --
1 file changed, 2 deletions(-)
diff --git a/CCache/Makefile.in b/CCache/Makefile.in
index ae77ae745..6703e2ac0 100644
--- a/CCache/Makefile.in
+++ b/CCache/Makefile.in
@@ -59,8 +59,6 @@ uninstall: $(PACKAGE_NAME)$(EXEEXT) $(PACKAGE_NAME).1
clean:
/bin/rm -f $(OBJS) *~ $(PACKAGE_NAME)$(EXEEXT)
-check : test
-
test: test.sh
SWIG_LIB='$(SWIG_LIB)' PATH=../..:$$PATH SWIG='$(SWIG)' CC='$(CC)' NOSOFTLINKSTEST='$(NOSOFTLINKSTEST)' $(srcdir)/test.sh
From 8ece62b9457a6b61de544c6885772d3bc8150299 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Thu, 15 May 2014 22:04:54 +0100
Subject: [PATCH 026/152] Neaten up test-suite Makefile regeneration
---
Examples/test-suite/common.mk | 5 +----
Examples/test-suite/errors/Makefile.in | 7 ++-----
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index d93d788c9..ef697b131 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -74,11 +74,8 @@ SRCDIR = $(srcdir)/
SCRIPTDIR = $(srcdir)
# Regenerate Makefile if Makefile.in or config.status have changed.
-ifeq (,$(TEST_SUITE_SUBDIR))
-TEST_SUITE_SUBDIR = $(LANGUAGE)
-endif
Makefile: $(srcdir)/Makefile.in ../../../config.status
- cd ../../../ && $(SHELL) ./config.status $(EXAMPLES)/$(TEST_SUITE)/$(TEST_SUITE_SUBDIR)/Makefile
+ cd ../../../ && $(SHELL) ./config.status $(EXAMPLES)/$(TEST_SUITE)/$(LANGUAGE)/Makefile
#
# Please keep test cases in alphabetical order.
diff --git a/Examples/test-suite/errors/Makefile.in b/Examples/test-suite/errors/Makefile.in
index 9ca6f6ecd..da67db8bd 100644
--- a/Examples/test-suite/errors/Makefile.in
+++ b/Examples/test-suite/errors/Makefile.in
@@ -13,7 +13,7 @@
# file (.stderr) in addition to the test case itself.
#######################################################################
-LANGUAGE = python
+LANGUAGE = errors
ERROR_EXT = newerr
# Portable dos2unix / todos for stripping CR
TODOS = tr -d '\r'
@@ -35,9 +35,6 @@ C_ERROR_TEST_CASES := $(filter-out $(CPP_ERROR_TEST_CASES), $(ALL_ERROR_TEST_CAS
ERROR_TEST_CASES := $(CPP_ERROR_TEST_CASES:=.cpptest) \
$(C_ERROR_TEST_CASES:=.ctest)
-# For rebuilding Makefile from Makefile.in in common.mk
-TEST_SUITE_SUBDIR = errors
-
include $(srcdir)/../common.mk
@@ -56,5 +53,5 @@ include $(srcdir)/../common.mk
@exit 0
clean:
- $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile $(LANGUAGE)_clean
+ $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile python_clean
@rm -f *.$(ERROR_EXT) *.py
From 61818533129e7d88124e00c69b81088f060b4b39 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Wed, 14 May 2014 00:36:38 +0100
Subject: [PATCH 027/152] Fix out of source clean-android-examples
---
Examples/Makefile.in | 2 +-
Examples/android/class/Makefile | 2 +-
Examples/android/extend/Makefile | 2 +-
Examples/android/simple/Makefile | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index 7c2d23647..c47c075e9 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -782,7 +782,7 @@ android_version:
# -----------------------------------------------------------------
android_clean:
- ant -q -logfile /dev/null clean
+ cd $(SRCDIR) && ant -q -logfile /dev/null clean
rm -f $(INTERFACEDIR)$(TARGET)_wrap.*
rm -f `find $(PACKAGEDIR) -name \*.java | grep -v $(PROJECTNAME).java`
rm -rf obj
diff --git a/Examples/android/class/Makefile b/Examples/android/class/Makefile
index 44d33de0a..574566623 100644
--- a/Examples/android/class/Makefile
+++ b/Examples/android/class/Makefile
@@ -3,7 +3,7 @@ SWIG = $(TOP)/../preinst-swig
TARGET = example
INTERFACE = example.i
INTERFACEDIR = jni/
-PACKAGEDIR = src/org/swig
+PACKAGEDIR = $(SRCDIR)src/org/swig
PACKAGENAME= org.swig.classexample
SWIGOPT = -package $(PACKAGENAME) -outdir $(PACKAGEDIR)/classexample
PROJECTNAME= SwigClass
diff --git a/Examples/android/extend/Makefile b/Examples/android/extend/Makefile
index 3d0609a08..fb974d22c 100644
--- a/Examples/android/extend/Makefile
+++ b/Examples/android/extend/Makefile
@@ -3,7 +3,7 @@ SWIG = $(TOP)/../preinst-swig
TARGET = example
INTERFACE = example.i
INTERFACEDIR = jni/
-PACKAGEDIR = src/org/swig
+PACKAGEDIR = $(SRCDIR)src/org/swig
PACKAGENAME= org.swig.extendexample
SWIGOPT = -package $(PACKAGENAME) -outdir $(PACKAGEDIR)/extendexample
PROJECTNAME= SwigExtend
diff --git a/Examples/android/simple/Makefile b/Examples/android/simple/Makefile
index d71b9880c..2bf41968a 100644
--- a/Examples/android/simple/Makefile
+++ b/Examples/android/simple/Makefile
@@ -3,7 +3,7 @@ SWIG = $(TOP)/../preinst-swig
TARGET = example
INTERFACE = example.i
INTERFACEDIR = jni/
-PACKAGEDIR = src/org/swig
+PACKAGEDIR = $(SRCDIR)src/org/swig
PACKAGENAME= org.swig.simple
SWIGOPT = -package $(PACKAGENAME) -outdir $(PACKAGEDIR)/simple
PROJECTNAME= SwigSimple
From 81335c5a91f134c3bbd32ecf7c7fa299f356b4f2 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Thu, 15 May 2014 23:27:26 +0100
Subject: [PATCH 028/152] Configured languages display improvement
---
configure.ac | 53 ++++++++++++++++++++++++----------------------------
1 file changed, 24 insertions(+), 29 deletions(-)
diff --git a/configure.ac b/configure.ac
index 949986341..e2cbe9fca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2715,38 +2715,33 @@ EOF
AC_OUTPUT
langs=""
-test -n "$SKIP_ALLEGROCL" || langs="$langs allegrocl"
-test -n "$SKIP_CFFI" || langs="$langs cffi"
-test -n "$SKIP_CHICKEN" || langs="$langs chicken"
-test -n "$SKIP_CLISP" || langs="$langs clisp"
-test -n "$SKIP_CSHARP" || langs="$langs csharp"
-test -n "$SKIP_D" || langs="$langs d"
-test -n "$SKIP_GO" || langs="$langs go"
-test -n "$SKIP_GUILE" || langs="$langs guile"
-test -n "$SKIP_JAVA" || langs="$langs java"
-test -n "$SKIP_JAVASCRIPT" || langs="$langs javascript"
-test -n "$SKIP_LUA" || langs="$langs lua"
-test -n "$SKIP_MODULA3" || langs="$langs modula3"
-test -n "$SKIP_MZSCHEME" || langs="$langs mzscheme"
-test -n "$SKIP_OCAML" || langs="$langs ocaml"
-test -n "$SKIP_OCTAVE" || langs="$langs octave"
-test -n "$SKIP_PERL5" || langs="$langs perl5"
-test -n "$SKIP_PHP" || langs="$langs php"
-test -n "$SKIP_PIKE" || langs="$langs pike"
-test -n "$SKIP_PYTHON" || langs="$langs python"
-test -n "$SKIP_R" || langs="$langs r"
-test -n "$SKIP_RUBY" || langs="$langs ruby"
-test -n "$SKIP_TCL" || langs="$langs tcl"
-test -n "$SKIP_UFFI" || langs="$langs uffi"
+test -n "$SKIP_ALLEGROCL" || langs="${langs}allegrocl "
+test -n "$SKIP_CFFI" || langs="${langs}cffi "
+test -n "$SKIP_CHICKEN" || langs="${langs}chicken "
+test -n "$SKIP_CLISP" || langs="${langs}clisp "
+test -n "$SKIP_CSHARP" || langs="${langs}csharp "
+test -n "$SKIP_D" || langs="${langs}d "
+test -n "$SKIP_GO" || langs="${langs}go "
+test -n "$SKIP_GUILE" || langs="${langs}guile "
+test -n "$SKIP_JAVA" || langs="${langs}java "
+test -n "$SKIP_JAVASCRIPT" || langs="${langs}javascript "
+test -n "$SKIP_LUA" || langs="${langs}lua "
+test -n "$SKIP_MODULA3" || langs="${langs}modula3 "
+test -n "$SKIP_MZSCHEME" || langs="${langs}mzscheme "
+test -n "$SKIP_OCAML" || langs="${langs}ocaml "
+test -n "$SKIP_OCTAVE" || langs="${langs}octave "
+test -n "$SKIP_PERL5" || langs="${langs}perl5 "
+test -n "$SKIP_PHP" || langs="${langs}php "
+test -n "$SKIP_PIKE" || langs="${langs}pike "
+test -n "$SKIP_PYTHON" || langs="${langs}python "
+test -n "$SKIP_R" || langs="${langs}r "
+test -n "$SKIP_RUBY" || langs="${langs}ruby "
+test -n "$SKIP_TCL" || langs="${langs}tcl "
+test -n "$SKIP_UFFI" || langs="${langs}uffi "
echo "
-========================================================
-
-SWIG is configured for use with the following languages:
-
+The SWIG test-suite and examples are configured for the following languages:
$langs
-
-========================================================
"
dnl configure.ac ends here
From 2e0f6a21639f3a658126d49eb0e998a3f7b81a14 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Thu, 15 May 2014 23:55:36 +0100
Subject: [PATCH 029/152] Travis testing - add folding to less interesting
commands
See https://github.com/travis-ci/travis-ci/issues/2285 for fold syntax info.
---
.travis.yml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 26cb18910..95e433952 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -68,16 +68,22 @@ before_install:
- if test "$SWIGLANG" = "python" -a "$VER"; then sudo add-apt-repository -y ppa:fkrull/deadsnakes && sudo apt-get -qq update && sudo apt-get -qq install python${VER}-dev && export CONFIGOPTS="--with-python${PY3}=python${VER}"; fi
- if test "$SWIGLANG" = "tcl"; then sudo apt-get -qq install tcl8.4-dev; fi
script:
+ - echo 'Configuring...' && echo -en 'travis_fold:start:script.1\\r'
- ./autogen.sh && ./configure $CONFIGOPTS
+ - echo -en 'travis_fold:end:script.1\\r'
- make -s $SWIGJOBS
- ./swig -version && ./swig -pcreversion
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-ccache; fi
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-errors-test-suite; fi
+ - echo 'Installing...' && echo -en 'travis_fold:start:script.1\\r'
- if test -z "$SWIGLANG"; then sudo make -s install && swig -version && ccache-swig -V; fi
+ - echo -en 'travis_fold:end:script.2\\r'
- if test -n "$SWIGLANG"; then make -s check-$SWIGLANG-version; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-examples; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-test-suite; fi
+ - echo -n 'Cleaning...' && echo -en 'travis_fold:start:script.3\\r'
- make maintainer-clean
+ - echo -en 'travis_fold:end:script.3\\r'
branches:
only:
- master
From 3b0a549d72fc47616c62d28abeb9d3aafab0fbc0 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Fri, 16 May 2014 06:11:39 +0100
Subject: [PATCH 030/152] Travis folding correction
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 95e433952..5d42d3ac5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -75,7 +75,7 @@ script:
- ./swig -version && ./swig -pcreversion
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-ccache; fi
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-errors-test-suite; fi
- - echo 'Installing...' && echo -en 'travis_fold:start:script.1\\r'
+ - echo 'Installing...' && echo -en 'travis_fold:start:script.2\\r'
- if test -z "$SWIGLANG"; then sudo make -s install && swig -version && ccache-swig -V; fi
- echo -en 'travis_fold:end:script.2\\r'
- if test -n "$SWIGLANG"; then make -s check-$SWIGLANG-version; fi
From 06d2c79c2869b709fd6ea3bb646051319bf79e7a Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Fri, 16 May 2014 06:50:37 +0100
Subject: [PATCH 031/152] Another Travis folding correction
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 5d42d3ac5..a7a16f5fd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -81,7 +81,7 @@ script:
- if test -n "$SWIGLANG"; then make -s check-$SWIGLANG-version; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-examples; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-test-suite; fi
- - echo -n 'Cleaning...' && echo -en 'travis_fold:start:script.3\\r'
+ - echo 'Cleaning...' && echo -en 'travis_fold:start:script.3\\r'
- make maintainer-clean
- echo -en 'travis_fold:end:script.3\\r'
branches:
From 17abb00f2046bd4b52010bb6e0235cb5e13ffbd8 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Fri, 16 May 2014 06:55:11 +0100
Subject: [PATCH 032/152] Modify Travis builds to build out of source
Closes #167
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index a7a16f5fd..1e7d9c657 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -69,7 +69,7 @@ before_install:
- if test "$SWIGLANG" = "tcl"; then sudo apt-get -qq install tcl8.4-dev; fi
script:
- echo 'Configuring...' && echo -en 'travis_fold:start:script.1\\r'
- - ./autogen.sh && ./configure $CONFIGOPTS
+ - ./autogen.sh && mkdir -p build/build && cd build/build && ../../configure $CONFIGOPTS
- echo -en 'travis_fold:end:script.1\\r'
- make -s $SWIGJOBS
- ./swig -version && ./swig -pcreversion
From 8b19918a83d0a83c1b212fb1deedae4b965b6595 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Fri, 16 May 2014 08:02:11 +0100
Subject: [PATCH 033/152] Travis builds - add compiler version display
---
.travis.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 1e7d9c657..da5929e1e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,8 +50,8 @@ matrix:
# None
before_install:
- date -u
- - lsb_release -a
- uname -a
+ - lsb_release -a
- sudo apt-get -qq update
- time sudo apt-get -qq install libboost-dev
- if test -z "$SWIGLANG"; then sudo apt-get -qq install yodl; fi
@@ -67,6 +67,8 @@ before_install:
- if test "$SWIGLANG" = "python" -a "$PY3" -a -z "$VER"; then sudo apt-get install -qq python3-dev; fi
- if test "$SWIGLANG" = "python" -a "$VER"; then sudo add-apt-repository -y ppa:fkrull/deadsnakes && sudo apt-get -qq update && sudo apt-get -qq install python${VER}-dev && export CONFIGOPTS="--with-python${PY3}=python${VER}"; fi
- if test "$SWIGLANG" = "tcl"; then sudo apt-get -qq install tcl8.4-dev; fi
+ - $CC --version
+ - $CXX --version
script:
- echo 'Configuring...' && echo -en 'travis_fold:start:script.1\\r'
- ./autogen.sh && mkdir -p build/build && cd build/build && ../../configure $CONFIGOPTS
From 50f5b4f7f448e79d7460a14795d752a74b60eaaf Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Fri, 16 May 2014 20:46:35 +0100
Subject: [PATCH 034/152] Fix in source android examples clean
---
Examples/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index c47c075e9..954a41c07 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -782,7 +782,7 @@ android_version:
# -----------------------------------------------------------------
android_clean:
- cd $(SRCDIR) && ant -q -logfile /dev/null clean
+ test -n "$(SRCDIR)" && cd $(SRCDIR) ; ant -q -logfile /dev/null clean
rm -f $(INTERFACEDIR)$(TARGET)_wrap.*
rm -f `find $(PACKAGEDIR) -name \*.java | grep -v $(PROJECTNAME).java`
rm -rf obj
From 46e5f722c337320807deeacc0e20c6a598390936 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Fri, 16 May 2014 21:08:06 +0100
Subject: [PATCH 035/152] Travis testing: check configure still runs after make
maintainer-clean
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index da5929e1e..96e4fc9a7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -84,7 +84,7 @@ script:
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-examples; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-test-suite; fi
- echo 'Cleaning...' && echo -en 'travis_fold:start:script.3\\r'
- - make maintainer-clean
+ - make maintainer-clean && ../../configure $CONFIGOPTS
- echo -en 'travis_fold:end:script.3\\r'
branches:
only:
From b8b61be301a40521c2908e0236f04369e71749d3 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Sat, 17 May 2014 23:32:09 +0100
Subject: [PATCH 036/152] Detect Javascript v8 on 64 bit Linux
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index e2cbe9fca..2ff5dc8db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1259,7 +1259,7 @@ else
AC_MSG_CHECKING(for V8 Javascript library)
AC_ARG_WITH(jsv8lib,[ --with-v8lib=path Set location of V8 Javascript library directory],[JSV8LIBDIR="$withval"], [JSV8LIB=])
- v8libdirs="$JSV8LIBDIR /usr/lib/ /usr/local/lib/"
+ v8libdirs="$JSV8LIBDIR /usr/lib*/ /usr/local/lib*/"
for d in $v8libdirs ; do
if test -r $d/libv8.so; then
JSV8LIBDIR=$d
From ac89f7f7854907f8b45b42ef1f447234d5eb1c64 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Sun, 18 May 2014 00:59:47 +0100
Subject: [PATCH 037/152] Javascript examples tidy up
- Remove empty files
- Improve clean
---
.gitignore | 11 +++++++----
Examples/Makefile.in | 3 ++-
Examples/javascript/functor/Makefile | 2 +-
Examples/javascript/functor/binding.gyp.in | 2 +-
Examples/javascript/functor/example.cxx | 0
Examples/javascript/pointer/typemaps.i | 0
Examples/test-suite/javascript/Makefile.in | 9 +++------
7 files changed, 14 insertions(+), 13 deletions(-)
delete mode 100644 Examples/javascript/functor/example.cxx
delete mode 100644 Examples/javascript/pointer/typemaps.i
diff --git a/.gitignore b/.gitignore
index efb6cf096..c7961efd7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -124,16 +124,19 @@ Examples/test-suite/uffi/*/
*_wrap.c
*_wrap.cxx
+# C# generated files
+*_runme.exe.mdb
+*_runme.exe
+
+# Javascript generated files
+*.gyp
+
# Python generated files, based on:
# https://github.com/github/gitignore/blob/master/Python.gitignore
*.py[cod]
*/__pycache__/
/__pycache__/
-# C# generated files
-*_runme.exe.mdb
-*_runme.exe
-
# Scratch directories
Examples/scratch
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index 954a41c07..b22fd2e76 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -730,7 +730,8 @@ javascript_clean:
rm -f *_wrap* $(RUNME)
rm -f core @EXTRA_CLEAN@
rm -f *.@OBJEXT@ *@JSSO@ *.$(SO)
- (cd $(ROOT_DIR)/Tools/javascript && $(MAKE) -s clean)
+ rm -f binding.gyp
+ cd $(ROOT_DIR)/Tools/javascript && $(MAKE) -s clean
##################################################################
##### ANDROID ######
diff --git a/Examples/javascript/functor/Makefile b/Examples/javascript/functor/Makefile
index 54a8f7b03..0402f8d09 100644
--- a/Examples/javascript/functor/Makefile
+++ b/Examples/javascript/functor/Makefile
@@ -1,3 +1,3 @@
-SRCS = example.cxx
+SRCS =
include $(SRCDIR)../example.mk
diff --git a/Examples/javascript/functor/binding.gyp.in b/Examples/javascript/functor/binding.gyp.in
index c56a650e9..59779aef4 100644
--- a/Examples/javascript/functor/binding.gyp.in
+++ b/Examples/javascript/functor/binding.gyp.in
@@ -2,7 +2,7 @@
"targets": [
{
"target_name": "example",
- "sources": [ "$srcdir/example.cxx", "example_wrap.cxx" ],
+ "sources": [ "example_wrap.cxx" ],
"include_dirs": ["$srcdir"]
}
]
diff --git a/Examples/javascript/functor/example.cxx b/Examples/javascript/functor/example.cxx
deleted file mode 100644
index e69de29bb..000000000
diff --git a/Examples/javascript/pointer/typemaps.i b/Examples/javascript/pointer/typemaps.i
deleted file mode 100644
index e69de29bb..000000000
diff --git a/Examples/test-suite/javascript/Makefile.in b/Examples/test-suite/javascript/Makefile.in
index 87e4c6ecb..fc5255155 100644
--- a/Examples/test-suite/javascript/Makefile.in
+++ b/Examples/test-suite/javascript/Makefile.in
@@ -116,9 +116,6 @@ endif
%.clean:
rm -rf $*
-
-clean:
- rm -f *_wrap.cxx
- rm -f *_wrap.c
- rm -f *.so
- rm -f *.o
+ rm -f $*_wrap.*
+ rm -f $*.so
+ rm -f $*.o
From 176c697c8b50856de8c2be99e1674c4a82c9f800 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Sun, 18 May 2014 01:06:56 +0100
Subject: [PATCH 038/152] Remove PHP director_basic runtime test until fixed.
See #164
---
Examples/test-suite/php/director_basic_runme.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Examples/test-suite/php/director_basic_runme.php b/Examples/test-suite/php/director_basic_runme.php
index de6b50502..1458725f1 100644
--- a/Examples/test-suite/php/director_basic_runme.php
+++ b/Examples/test-suite/php/director_basic_runme.php
@@ -3,6 +3,7 @@
require "tests.php";
require "director_basic.php";
+/* Removed until runtime error is fixed, see https://github.com/swig/swig/issues/164
// No new functions
check::functions(array(foo_ping,foo_pong,foo_get_self,a_f,a_rg,a1_ff,myclass_method,myclass_vmethod,myclass_pmethod,myclass_cmethod,myclass_get_self,myclass_call_pmethod,myclasst_i_method));
// No new classes
@@ -53,6 +54,7 @@ $cc->method($b);
check::equal($bc->x, 34, "bc failed");
check::equal($bd->x, 16, "bd failed");
+*/
check::done();
?>
From 46cfdba5ca7c1385840005470ec433bef0ea8768 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Sun, 18 May 2014 01:36:29 +0100
Subject: [PATCH 039/152] Attempt to fix li_boost_intrusive_ptr C# compile
error
Using boost 1.36 and gcc-4.3.4
---
Examples/test-suite/li_boost_intrusive_ptr.i | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Examples/test-suite/li_boost_intrusive_ptr.i b/Examples/test-suite/li_boost_intrusive_ptr.i
index 4916d0285..01613be0e 100644
--- a/Examples/test-suite/li_boost_intrusive_ptr.i
+++ b/Examples/test-suite/li_boost_intrusive_ptr.i
@@ -14,13 +14,13 @@
%warnfilter(SWIGWARN_LANG_SMARTPTR_MISSING) KlassDerivedDerived;
%{
-template void intrusive_ptr_add_ref(const T* r) { r->addref(); }
-template void intrusive_ptr_release(const T* r) { r->release(); }
-
#include
#include
#include
+template void intrusive_ptr_add_ref(const T* r) { r->addref(); }
+template void intrusive_ptr_release(const T* r) { r->release(); }
+
// Uncomment macro below to turn on intrusive_ptr memory leak checking as described above
//#define INTRUSIVE_PTR_WRAPPER
From def3c08943ea533102dbb2b4b7a64607516f5d3b Mon Sep 17 00:00:00 2001
From: Olly Betts
Date: Sun, 18 May 2014 20:20:30 +1200
Subject: [PATCH 040/152] Fix comment typos
---
Examples/test-suite/lua/operator_overload_runme.lua | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Examples/test-suite/lua/operator_overload_runme.lua b/Examples/test-suite/lua/operator_overload_runme.lua
index 5ba06ff08..c34c09021 100644
--- a/Examples/test-suite/lua/operator_overload_runme.lua
+++ b/Examples/test-suite/lua/operator_overload_runme.lua
@@ -1,4 +1,4 @@
--- demo of lua swig capacilities (operator overloading)
+-- demo of lua swig capacities (operator overloading)
require("import") -- the import fn
import("operator_overload") -- import lib
@@ -33,7 +33,7 @@ assert(b>=c)
assert(b>d)
assert(b>=d)
--- lua does not support += operators: skiping
+-- lua does not support += operators: skipping
-- test +
f=Op(1)
@@ -50,7 +50,7 @@ assert(f/g==Op(1))
--lua 5.0.2 defines that unary - is __unm(self,nil)
--lua 5.1.2 defines that unary - is __unm(self,self)
---C++ expectes unary - as operator-()
+--C++ expects unary - as operator-()
--however the latest version of SWIG strictly checks the number of args
--and will complain if too many args are provided
--therefore disabling these tests for now
@@ -79,7 +79,7 @@ assert(tostring(Op(1))=="Op(1)")
assert(tostring(Op(-3))=="Op(-3)")
--- check that operator overloads are correctly propogated down inheritance hierarchy
+-- check that operator overloads are correctly propagated down inheritance hierarchy
a_d=OpDerived()
b_d=OpDerived(5)
From 95f09b49d2be5804501e5e1eafe3cf8f58ff3510 Mon Sep 17 00:00:00 2001
From: Olly Betts
Date: Sun, 18 May 2014 20:38:43 +1200
Subject: [PATCH 041/152] Don't use // comments in C code.
---
Lib/lua/luarun.swg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/lua/luarun.swg b/Lib/lua/luarun.swg
index d038f4af1..ad735a541 100644
--- a/Lib/lua/luarun.swg
+++ b/Lib/lua/luarun.swg
@@ -268,7 +268,7 @@ typedef struct swig_lua_class {
swig_lua_method *methods;
swig_lua_attribute *attributes;
swig_lua_namespace *cls_static;
- swig_lua_method *metatable; // 0 for -eluac
+ swig_lua_method *metatable; /* 0 for -eluac */
struct swig_lua_class **bases;
const char **base_names;
} swig_lua_class;
@@ -1629,7 +1629,7 @@ SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_cla
lua_pop(L,1);
assert(lua_gettop(L) == begin);
}
-#endif // elua && eluac
+#endif /* elua && eluac */
/* -----------------------------------------------------------------------------
* Class/structure conversion fns
From aa55154ccfa967297181e886a350a36b03c64e07 Mon Sep 17 00:00:00 2001
From: Eric Wing
Date: Sun, 18 May 2014 01:29:45 -0700
Subject: [PATCH 042/152] JavaScript: Added missing static modifiers to avoid
duplicate symbol problems with multiple SWIG modules.
---
Lib/javascript/jsc/javascriptcode.swg | 42 ++++++++++++------------
Lib/javascript/jsc/javascripthelpers.swg | 10 +++---
Lib/javascript/v8/javascripthelpers.swg | 12 +++----
3 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/Lib/javascript/jsc/javascriptcode.swg b/Lib/javascript/jsc/javascriptcode.swg
index 738b54d70..a5f395944 100644
--- a/Lib/javascript/jsc/javascriptcode.swg
+++ b/Lib/javascript/jsc/javascriptcode.swg
@@ -8,7 +8,7 @@
* ----------------------------------------------------------------------------- */
%fragment ("js_ctor", "templates")
%{
-JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
+static JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
{
$jslocals
if(argc != $jsargcount) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for $jswrapper.");
@@ -28,7 +28,7 @@ JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc
* ----------------------------------------------------------------------------- */
%fragment ("js_veto_ctor", "templates")
%{
-JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
+static JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
size_t argc, const JSValueRef argv[], JSValueRef* exception)
{
SWIG_exception(SWIG_ERROR, "Class $jsname can not be instantiated");
@@ -44,7 +44,7 @@ JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
* ----------------------------------------------------------------------------- */
%fragment ("js_ctor_dispatcher", "templates")
%{
-JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
+static JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
size_t argc, const JSValueRef argv[], JSValueRef* exception)
{
JSObjectRef thisObject = NULL;
@@ -70,7 +70,7 @@ JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
* ----------------------------------------------------------------------------- */
%fragment ("js_overloaded_ctor", "templates")
%{
-JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
+static JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
{
$jslocals
$jscode
@@ -105,7 +105,7 @@ JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc
* ----------------------------------------------------------------------------- */
%fragment ("js_dtor", "templates")
%{
-void $jswrapper(JSObjectRef thisObject)
+static void $jswrapper(JSObjectRef thisObject)
{
SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject);
if(t && t->swigCMemOwn) free (($jstype)t->swigCObject);
@@ -121,7 +121,7 @@ void $jswrapper(JSObjectRef thisObject)
* ----------------------------------------------------------------------------- */
%fragment ("js_dtoroverride", "templates")
%{
-void $jswrapper(JSObjectRef thisObject)
+static void $jswrapper(JSObjectRef thisObject)
{
SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject);
if(t && t->swigCMemOwn) {
@@ -140,7 +140,7 @@ void $jswrapper(JSObjectRef thisObject)
* ----------------------------------------------------------------------------- */
%fragment ("js_getter", "templates")
%{
-JSValueRef $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+static JSValueRef $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
{
$jslocals
JSValueRef jsresult;
@@ -162,7 +162,7 @@ JSValueRef $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef
* ----------------------------------------------------------------------------- */
%fragment ("js_setter", "templates")
%{
-bool $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
+static bool $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
{
$jslocals
$jscode
@@ -183,7 +183,7 @@ bool $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef proper
* ----------------------------------------------------------------------------- */
%fragment ("js_function", "templates")
%{
-JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
+static JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
{
$jslocals
JSValueRef jsresult;
@@ -208,7 +208,7 @@ JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef th
* ----------------------------------------------------------------------------- */
%fragment ("js_function_dispatcher", "templates")
%{
-JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
+static JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
{
$jslocals
JSValueRef jsresult;
@@ -232,7 +232,7 @@ JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef th
* ----------------------------------------------------------------------------- */
%fragment ("js_overloaded_function", "templates")
%{
-int $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception, JSValueRef* p_result)
+static int $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception, JSValueRef* p_result)
{
$jslocals
JSValueRef jsresult;
@@ -291,11 +291,11 @@ int $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObjec
* ----------------------------------------------------------------------------- */
%fragment ("jsc_class_declaration", "templates")
%{
-JSClassDefinition $jsmangledname_classDefinition;
+static JSClassDefinition $jsmangledname_classDefinition;
-JSClassDefinition $jsmangledname_objectDefinition;
+static JSClassDefinition $jsmangledname_objectDefinition;
-JSClassRef $jsmangledname_classRef;
+static JSClassRef $jsmangledname_classRef;
%}
/* -----------------------------------------------------------------------------
@@ -308,22 +308,22 @@ JSClassRef $jsmangledname_classRef;
* ----------------------------------------------------------------------------- */
%fragment ("jsc_class_tables", "templates")
%{
-JSStaticValue $jsmangledname_staticValues[] = {
+static JSStaticValue $jsmangledname_staticValues[] = {
$jsstaticclassvariables
{ 0, 0, 0, 0 }
};
-JSStaticFunction $jsmangledname_staticFunctions[] = {
+static JSStaticFunction $jsmangledname_staticFunctions[] = {
$jsstaticclassfunctions
{ 0, 0, 0 }
};
-JSStaticValue $jsmangledname_values[] = {
+static JSStaticValue $jsmangledname_values[] = {
$jsclassvariables
{ 0, 0, 0, 0 }
};
-JSStaticFunction $jsmangledname_functions[] = {
+static JSStaticFunction $jsmangledname_functions[] = {
$jsclassfunctions
{ 0, 0, 0 }
};
@@ -382,17 +382,17 @@ JSStaticFunction $jsmangledname_functions[] = {
* ----------------------------------------------------------------------------- */
%fragment ("jsc_nspace_declaration", "templates")
%{
-JSStaticValue $jsnspace_values[] = {
+static JSStaticValue $jsnspace_values[] = {
$jsglobalvariables
{ 0, 0, 0, 0 }
};
-JSStaticFunction $jsnspace_functions[] = {
+static JSStaticFunction $jsnspace_functions[] = {
$jsglobalfunctions
{ 0, 0, 0 }
};
-JSClassDefinition $jsnspace_classDefinition;
+static JSClassDefinition $jsnspace_classDefinition;
%}
/* -----------------------------------------------------------------------------
diff --git a/Lib/javascript/jsc/javascripthelpers.swg b/Lib/javascript/jsc/javascripthelpers.swg
index 820075ca6..405280161 100644
--- a/Lib/javascript/jsc/javascripthelpers.swg
+++ b/Lib/javascript/jsc/javascripthelpers.swg
@@ -1,6 +1,6 @@
%insert(wrapper) %{
-bool JS_registerClass(JSGlobalContextRef context, JSObjectRef parentObject,
+SWIGINTERN bool JS_registerClass(JSGlobalContextRef context, JSObjectRef parentObject,
const char* className,
JSClassDefinition* definition) {
@@ -14,7 +14,7 @@ bool JS_registerClass(JSGlobalContextRef context, JSObjectRef parentObject,
return true;
}
-bool JS_registerNamespace(JSGlobalContextRef context,
+SWIGINTERN bool JS_registerNamespace(JSGlobalContextRef context,
JSObjectRef namespaceObj, JSObjectRef parentNamespace,
const char* name)
{
@@ -28,7 +28,7 @@ bool JS_registerNamespace(JSGlobalContextRef context,
}
-bool JS_registerFunction(JSGlobalContextRef context, JSObjectRef object,
+SWIGINTERN bool JS_registerFunction(JSGlobalContextRef context, JSObjectRef object,
const char* functionName, JSObjectCallAsFunctionCallback callback)
{
JSStringRef js_functionName = JSStringCreateWithUTF8CString(functionName);
@@ -39,7 +39,7 @@ bool JS_registerFunction(JSGlobalContextRef context, JSObjectRef object,
return true;
}
-bool JS_veto_set_variable(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
+SWIGINTERN bool JS_veto_set_variable(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
{
char buffer[256];
char msg[512];
@@ -57,7 +57,7 @@ bool JS_veto_set_variable(JSContextRef context, JSObjectRef thisObject, JSString
return false;
}
-JSValueRef JS_CharPtrToJSValue(JSContextRef context, char* cstr) {
+SWIGINTERN JSValueRef JS_CharPtrToJSValue(JSContextRef context, char* cstr) {
JSValueRef val;
JSStringRef jsstring = JSStringCreateWithUTF8CString((char*) cstr);
diff --git a/Lib/javascript/v8/javascripthelpers.swg b/Lib/javascript/v8/javascripthelpers.swg
index 8da6627e2..f6303cced 100644
--- a/Lib/javascript/v8/javascripthelpers.swg
+++ b/Lib/javascript/v8/javascripthelpers.swg
@@ -16,7 +16,7 @@ typedef v8::PropertyCallbackInfo SwigV8PropertyCallbackInfoVoid;
/**
* Creates a class template for a class with specified initialization function.
*/
-v8::Handle SWIGV8_CreateClassTemplate(const char* symbol) {
+SWIGRUNTIME v8::Handle SWIGV8_CreateClassTemplate(const char* symbol) {
v8::HandleScope scope;
v8::Local class_templ = v8::FunctionTemplate::New();
class_templ->SetClassName(v8::String::NewSymbol(symbol));
@@ -36,7 +36,7 @@ v8::Handle SWIGV8_CreateClassTemplate(const char* symbol)
/**
* Registers a class method with given name for a given class template.
*/
-void SWIGV8_AddMemberFunction(v8::Handle class_templ, const char* symbol,
+SWIGRUNTIME void SWIGV8_AddMemberFunction(v8::Handle class_templ, const char* symbol,
SwigV8FunctionCallback _func) {
v8::Handle proto_templ = class_templ->PrototypeTemplate();
proto_templ->Set(v8::String::NewSymbol(symbol), v8::FunctionTemplate::New(_func));
@@ -45,7 +45,7 @@ void SWIGV8_AddMemberFunction(v8::Handle class_templ, cons
/**
* Registers a class property with given name for a given class template.
*/
-void SWIGV8_AddMemberVariable(v8::Handle class_templ, const char* symbol,
+SWIGRUNTIME void SWIGV8_AddMemberVariable(v8::Handle class_templ, const char* symbol,
SwigV8AccessorGetterCallback getter, SwigV8AccessorSetterCallback setter) {
v8::Handle proto_templ = class_templ->InstanceTemplate();
proto_templ->SetAccessor(v8::String::NewSymbol(symbol), getter, setter);
@@ -54,7 +54,7 @@ void SWIGV8_AddMemberVariable(v8::Handle class_templ, cons
/**
* Registers a class method with given name for a given object.
*/
-void SWIGV8_AddStaticFunction(v8::Handle obj, const char* symbol,
+SWIGRUNTIME void SWIGV8_AddStaticFunction(v8::Handle obj, const char* symbol,
const SwigV8FunctionCallback& _func) {
obj->Set(v8::String::NewSymbol(symbol), v8::FunctionTemplate::New(_func)->GetFunction());
}
@@ -62,12 +62,12 @@ void SWIGV8_AddStaticFunction(v8::Handle obj, const char* symbol,
/**
* Registers a class method with given name for a given object.
*/
-void SWIGV8_AddStaticVariable(v8::Handle obj, const char* symbol,
+SWIGRUNTIME void SWIGV8_AddStaticVariable(v8::Handle obj, const char* symbol,
SwigV8AccessorGetterCallback getter, SwigV8AccessorSetterCallback setter) {
obj->SetAccessor(v8::String::NewSymbol(symbol), getter, setter);
}
-void JS_veto_set_variable(v8::Local property, v8::Local value,
+SWIGRUNTIME void JS_veto_set_variable(v8::Local property, v8::Local value,
const SwigV8PropertyCallbackInfoVoid& info)
{
char buffer[256];
From b4534a481aa370a58d376522ea67072fcc446d8f Mon Sep 17 00:00:00 2001
From: Eric Wing
Date: Sun, 18 May 2014 01:32:26 -0700
Subject: [PATCH 043/152] JavaScriptCore: Bug fix for finalizer. The finalizer
needs to be set on the objectDefinition, not the classDefinition. Otherwise,
all the finalize callbacks get NULL back for the PrivateData and can't free
the SwigPrivData, causing massive leakage.
---
Lib/javascript/jsc/javascriptcode.swg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/javascript/jsc/javascriptcode.swg b/Lib/javascript/jsc/javascriptcode.swg
index a5f395944..da6130a6a 100644
--- a/Lib/javascript/jsc/javascriptcode.swg
+++ b/Lib/javascript/jsc/javascriptcode.swg
@@ -341,7 +341,7 @@ static JSStaticFunction $jsmangledname_functions[] = {
$jsmangledname_classDefinition.staticFunctions = $jsmangledname_staticFunctions;
$jsmangledname_classDefinition.staticValues = $jsmangledname_staticValues;
$jsmangledname_classDefinition.callAsConstructor = $jsctor;
- $jsmangledname_classDefinition.finalize = $jsdtor;
+ $jsmangledname_objectDefinition.finalize = $jsdtor;
$jsmangledname_objectDefinition.staticValues = $jsmangledname_values;
$jsmangledname_objectDefinition.staticFunctions = $jsmangledname_functions;
$jsclass_inheritance
From fcb48336605474e97e73ca2bc89076ee01e0b8fa Mon Sep 17 00:00:00 2001
From: Oliver Buchtala
Date: Sun, 18 May 2014 20:33:10 +0200
Subject: [PATCH 044/152] JavascriptCore: fix cleanup code.
---
Lib/javascript/jsc/javascriptcode.swg | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/Lib/javascript/jsc/javascriptcode.swg b/Lib/javascript/jsc/javascriptcode.swg
index da6130a6a..3fe9d49e9 100644
--- a/Lib/javascript/jsc/javascriptcode.swg
+++ b/Lib/javascript/jsc/javascriptcode.swg
@@ -108,8 +108,13 @@ static JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size
static void $jswrapper(JSObjectRef thisObject)
{
SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject);
- if(t && t->swigCMemOwn) free (($jstype)t->swigCObject);
- if(t) free(t);
+ if(t) {
+ if (t->swigCMemOwn) {
+ free (($jstype)t->swigCObject);
+ }
+ JSObjectSetPrivate(thisObject, NULL);
+ free(t);
+ }
}
%}
@@ -124,11 +129,15 @@ static void $jswrapper(JSObjectRef thisObject)
static void $jswrapper(JSObjectRef thisObject)
{
SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject);
- if(t && t->swigCMemOwn) {
- $jstype arg1 = ($jstype)t->swigCObject;
- ${destructor_action}
+ if(t) {
+ if (t->swigCMemOwn) {
+ $jstype arg1 = ($jstype)t->swigCObject;
+ ${destructor_action}
+ }
+ /* remove the private data to make sure that it isn't accessed elsewhere */
+ JSObjectSetPrivate(thisObject, NULL);
+ free(t);
}
- if(t) free(t);
}
%}
From 486e903de1bbf847a0a60aa85ab1e1a44c8ca159 Mon Sep 17 00:00:00 2001
From: Eric Wing
Date: Sun, 18 May 2014 01:35:46 -0700
Subject: [PATCH 045/152] JavaScriptCore: Bug fix for SWIGJSC_AppendOutput.
This function requires a return value. I think it should be arr, but somebody
should scrutinize this.
---
Lib/javascript/jsc/javascriptrun.swg | 1 +
1 file changed, 1 insertion(+)
diff --git a/Lib/javascript/jsc/javascriptrun.swg b/Lib/javascript/jsc/javascriptrun.swg
index 3463d2351..95f00659d 100644
--- a/Lib/javascript/jsc/javascriptrun.swg
+++ b/Lib/javascript/jsc/javascriptrun.swg
@@ -295,4 +295,5 @@ JSValueRef SWIGJSC_AppendOutput(JSContextRef context, JSValueRef value, JSValueR
length = SWIGJSC_ArrayLength(context, arr);
JSObjectSetPropertyAtIndex(context, arr, length, obj, 0);
+ return arr;
}
From fade0bcbdef3a1127d677f6ff72be064bcda5a57 Mon Sep 17 00:00:00 2001
From: Eric Wing
Date: Sun, 18 May 2014 01:50:05 -0700
Subject: [PATCH 046/152] JavaScriptCore: C89: declare variables at the top for
antiquated compilers like Microsoft Visual Studio.
---
Lib/javascript/jsc/javascriptrun.swg | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Lib/javascript/jsc/javascriptrun.swg b/Lib/javascript/jsc/javascriptrun.swg
index 95f00659d..fce22a452 100644
--- a/Lib/javascript/jsc/javascriptrun.swg
+++ b/Lib/javascript/jsc/javascriptrun.swg
@@ -128,11 +128,12 @@ int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef objRef, void**
}
int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, void** ptr, swig_type_info *info, int flags) {
+ JSObjectRef objRef;
if(!JSValueIsObject(context, valRef)) {
return SWIG_TypeError;
}
- JSObjectRef objRef = JSValueToObject(context, valRef, NULL);
+ objRef = JSValueToObject(context, valRef, NULL);
if(objRef == NULL) {
return SWIG_ERROR;
}
From 8498e4878d130a6ae24843084408339f3bf910ce Mon Sep 17 00:00:00 2001
From: Eric Wing
Date: Sun, 18 May 2014 03:03:46 -0700
Subject: [PATCH 047/152] JavaScriptCore: More missing static modifiers.
---
Lib/javascript/jsc/javascriptrun.swg | 36 ++++++++++++++--------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/Lib/javascript/jsc/javascriptrun.swg b/Lib/javascript/jsc/javascriptrun.swg
index fce22a452..813c7deb4 100644
--- a/Lib/javascript/jsc/javascriptrun.swg
+++ b/Lib/javascript/jsc/javascriptrun.swg
@@ -7,13 +7,13 @@
#define SWIG_exception(code, msg) SWIG_JSC_exception(context, exception, code, msg)
#define SWIG_fail goto fail
-void SWIG_Javascript_Raise(JSContextRef context, JSValueRef *exception, const char* type) {
+SWIGRUNTIME void SWIG_Javascript_Raise(JSContextRef context, JSValueRef *exception, const char* type) {
JSStringRef message = JSStringCreateWithUTF8CString(type);
*exception = JSValueMakeString(context, message);
JSStringRelease(message);
}
-void SWIG_JSC_exception(JSContextRef context, JSValueRef *exception, int code, const char* msg) {
+SWIGRUNTIME void SWIG_JSC_exception(JSContextRef context, JSValueRef *exception, int code, const char* msg) {
SWIG_Javascript_Raise(context, exception, msg);
}
@@ -28,7 +28,7 @@ typedef struct {
swig_type_info *info;
} SwigPrivData;
-JSValueRef _wrap_SwigObject_disown(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
+SWIGRUNTIME JSValueRef _wrap_SwigObject_disown(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
{
JSValueRef jsresult;
@@ -41,7 +41,7 @@ JSValueRef _wrap_SwigObject_disown(JSContextRef context, JSObjectRef function, J
return jsresult;
}
-JSValueRef _wrap_SwigObject_getCPtr(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
+SWIGRUNTIME JSValueRef _wrap_SwigObject_getCPtr(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
{
JSValueRef jsresult;
long result;
@@ -55,7 +55,7 @@ JSValueRef _wrap_SwigObject_getCPtr(JSContextRef context, JSObjectRef function,
return jsresult;
}
-JSValueRef _wrap_SwigObject_equals(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
+SWIGRUNTIME JSValueRef _wrap_SwigObject_equals(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
{
JSValueRef jsresult;
bool result;
@@ -72,13 +72,13 @@ JSValueRef _wrap_SwigObject_equals(JSContextRef context, JSObjectRef function, J
return jsresult;
}
-JSStaticValue _SwigObject_values[] = {
+SWIGRUNTIME JSStaticValue _SwigObject_values[] = {
{
0, 0, 0, 0
}
};
-JSStaticFunction _SwigObject_functions[] = {
+SWIGRUNTIME JSStaticFunction _SwigObject_functions[] = {
{
"disown",_wrap_SwigObject_disown, kJSPropertyAttributeNone
},
@@ -93,12 +93,12 @@ JSStaticFunction _SwigObject_functions[] = {
}
};
-JSClassDefinition _SwigObject_objectDefinition;
+SWIGRUNTIME JSClassDefinition _SwigObject_objectDefinition;
-JSClassRef _SwigObject_classRef;
+SWIGRUNTIME JSClassRef _SwigObject_classRef;
-int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef objRef, void** ptr, swig_type_info *info, int flags) {
+SWIGRUNTIME int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef objRef, void** ptr, swig_type_info *info, int flags) {
SwigPrivData *cdata = (SwigPrivData *) JSObjectGetPrivate(objRef);
if(cdata == NULL) {
return SWIG_ERROR;
@@ -127,7 +127,7 @@ int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef objRef, void**
return SWIG_OK;
}
-int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, void** ptr, swig_type_info *info, int flags) {
+SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, void** ptr, swig_type_info *info, int flags) {
JSObjectRef objRef;
if(!JSValueIsObject(context, valRef)) {
return SWIG_TypeError;
@@ -141,7 +141,7 @@ int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, void** ptr, swi
return SWIG_JSC_ConvertInstancePtr(context, objRef, ptr, info, flags);
}
-JSObjectRef SWIG_JSC_NewPointerObj(JSContextRef context, void *ptr, swig_type_info *info, int flags) {
+SWIGRUNTIME JSObjectRef SWIG_JSC_NewPointerObj(JSContextRef context, void *ptr, swig_type_info *info, int flags) {
JSClassRef classRef;
if(info->clientdata == NULL) {
@@ -182,18 +182,18 @@ typedef struct {
swig_type_info *type;
} SwigPackedData;
-JSStaticValue _SwigPackedData_values[] = {
+SWIGRUNTIME JSStaticValue _SwigPackedData_values[] = {
{
0, 0, 0, 0
}
};
-JSStaticFunction _SwigPackedData_functions[] = {
+SWIGRUNTIME JSStaticFunction _SwigPackedData_functions[] = {
{
0, 0, 0
}
};
-JSClassDefinition _SwigPackedData_objectDefinition;
-JSClassRef _SwigPackedData_classRef;
+SWIGRUNTIME JSClassDefinition _SwigPackedData_objectDefinition;
+SWIGRUNTIME JSClassRef _SwigPackedData_classRef;
SWIGRUNTIMEINLINE
int SwigJSCPacked_Check(JSContextRef context, JSValueRef valRef) {
@@ -244,7 +244,7 @@ JSValueRef SWIG_JSC_NewPackedObj(JSContextRef context, void *data, size_t size,
}
/* SwigPackedData wrappers */
-
+SWIGRUNTIME
void _wrap_SwigPackedData_delete(JSObjectRef obj)
{
SwigPackedData* cdata = (SwigPackedData*) JSObjectGetPrivate(obj);
@@ -263,7 +263,7 @@ void _wrap_SwigPackedData_delete(JSObjectRef obj)
* Support for IN/OUTPUT typemaps (see Lib/typemaps/inoutlist.swg)
*
* ---------------------------------------------------------------------------*/
-
+SWIGRUNTIME
unsigned int SWIGJSC_ArrayLength(JSContextRef context, JSObjectRef arr) {
static JSStringRef LENGTH = 0;
JSValueRef exception = NULL;
From 05ed0325dc4bd9ddc126d3dacc6b38686f7382cf Mon Sep 17 00:00:00 2001
From: Eric Wing
Date: Sun, 18 May 2014 03:43:47 -0700
Subject: [PATCH 048/152] JavaScriptCore: ConvertPtr should allow JavaScript
null to be a valid value.
It is common in C to accept NULL to functions for pointer parameters.
extern void DoSomething(struct Foo* foo);
...
DoSomething(NULL);
Thus, JavaScript null should be allowed:
module.DoSomething(null);
But the current ConvertPtr definition accepts only objects. This modifies it to allow null.
---
Lib/javascript/jsc/javascriptrun.swg | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Lib/javascript/jsc/javascriptrun.swg b/Lib/javascript/jsc/javascriptrun.swg
index 813c7deb4..9655b0eb6 100644
--- a/Lib/javascript/jsc/javascriptrun.swg
+++ b/Lib/javascript/jsc/javascriptrun.swg
@@ -129,6 +129,13 @@ SWIGRUNTIME int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef ob
SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, void** ptr, swig_type_info *info, int flags) {
JSObjectRef objRef;
+
+ /* special case: JavaScript null => C NULL pointer */
+ if(JSValueIsNull(context, valRef)) {
+ *ptr=0;
+ return SWIG_OK;
+ }
+
if(!JSValueIsObject(context, valRef)) {
return SWIG_TypeError;
}
From 7824322b146f67590c1a460f88379bce3a7d4d58 Mon Sep 17 00:00:00 2001
From: Oliver Buchtala
Date: Sun, 18 May 2014 22:40:22 +0200
Subject: [PATCH 049/152] Javascript: fix warnings in li_std_string test.
Old typemaps for std::string were in place instead of delegating to UTL.
---
Lib/javascript/jsc/std_string.i | 70 +----------------------------
Lib/javascript/v8/std_string.i | 80 +--------------------------------
2 files changed, 2 insertions(+), 148 deletions(-)
diff --git a/Lib/javascript/jsc/std_string.i b/Lib/javascript/jsc/std_string.i
index fb1bd62b5..dc1378ae6 100644
--- a/Lib/javascript/jsc/std_string.i
+++ b/Lib/javascript/jsc/std_string.i
@@ -1,69 +1 @@
-/* -----------------------------------------------------------------------------
- * std_string.i
- *
- * Typemaps for const std::string&.
- * To use non-const std::string references use the following %apply:
- * %apply const std::string & {std::string &};
- *
- * ----------------------------------------------------------------------------- */
-
-%{
-#include
-
-std::string SWIGJSC_valueToString(JSContextRef context, JSValueRef value) {
- JSStringRef jsstring = JSValueToStringCopy(context, value, /* JSValueRef *exception */ 0);
- unsigned int length = JSStringGetLength(jsstring);
- char *cstr = new char[length + 1];
- JSStringGetUTF8CString(jsstring, cstr, length + 1);
-
- // create a copy
- std::string result(cstr);
-
- JSStringRelease(jsstring);
- delete[] cstr;
-
- return result;
-}
-
-JSValueRef SWIGJSC_stringToValue(JSContextRef context, const std::string& s)
-{
- JSValueRef result;
- JSStringRef jsstring = JSStringCreateWithUTF8CString(s.c_str());
- result = JSValueMakeString(context, jsstring);
- JSStringRelease(jsstring);
- return result;
-}
-%}
-
-namespace std {
- %naturalvar string;
-
- class string;
-
-
- %typemap(in) string
- %{
- $1 = SWIGJSC_valueToString(context, $input);
- %}
-
- %typemap(in) const string &
- %{
- $1 = new std::string(SWIGJSC_valueToString(context, $input));
- %}
-
- %typemap(freearg) const string &
- %{
- delete $1;
- %}
-
- %typemap(out) string
- %{
- $result = SWIGJSC_stringToValue(context, $1);
- %}
-
- %typemap(out) const string &
- %{
- $result = SWIGJSC_stringToValue(context, *$1);
- %}
-
-}
+%include
diff --git a/Lib/javascript/v8/std_string.i b/Lib/javascript/v8/std_string.i
index 5ad1ead27..dc1378ae6 100644
--- a/Lib/javascript/v8/std_string.i
+++ b/Lib/javascript/v8/std_string.i
@@ -1,79 +1 @@
-/* -----------------------------------------------------------------------------
- * std_string.i
- *
- * Typemaps for std::string and const std::string&.
- *
- * To use non-const std::string references use the following %apply:
- * %apply const std::string & {std::string &};
- *
- * ----------------------------------------------------------------------------- */
-
-%{
-#include
-%}
-
-%fragment("SWIGV8_valueToString", "header", fragment="SWIG_AsCharPtrAndSize") {
-std::string* SWIGV8_valueToStringPtr(v8::Handle val) {
-
- if (!val->IsString()) return 0;
-
- int alloc;
- size_t size;
- char* chars;
- int res = SWIG_AsCharPtrAndSize(val, &chars, &size, &alloc);
-
- if(res != SWIG_OK) {
- v8::ThrowException(v8::Exception::TypeError(v8::String::New("Could not convert to string.")));
- return 0;
- }
-
- // copies the data (again)
- std::string *str = new std::string(chars);
-
- if (alloc) delete[] chars;
-
- return str;
-}
-}
-
-%fragment("SWIGV8_stringToValue", "header", fragment="SWIG_FromCharPtrAndSize") {
-v8::Handle SWIGV8_stringToValue(const std::string &str) {
- return SWIG_FromCharPtrAndSize(str.c_str(), str.length());
-}
-}
-
-namespace std {
- %naturalvar string;
-
- class string;
-
- %typemap(in, fragment="SWIGV8_valueToString") string (std::string* tmp)
- %{
- tmp = SWIGV8_valueToStringPtr($input);
- $1 = *tmp;
- if (tmp == 0) { v8::ThrowException(v8::Exception::TypeError(v8::String::New("Null pointer."))); goto fail; }
- if (tmp) delete tmp;
- %}
-
- %typemap(in, fragment="SWIGV8_valueToString") const string &
- %{
- $1 = SWIGV8_valueToStringPtr($input);
- if ($1 == 0) { v8::ThrowException(v8::Exception::TypeError(v8::String::New("Null pointer."))); goto fail; }
- %}
-
- %typemap(freearg) const string &
- %{
- if ($1) delete $1;
- %}
-
- %typemap(out, fragment="SWIGV8_stringToValue") string
- %{
- $result = SWIGV8_stringToValue($1);
- %}
-
- %typemap(out, fragment="SWIGV8_stringToValue") const string &
- %{
- $result = SWIGV8_stringToValue(*$1);
- %}
-
-}
+%include
From d2ab75f9071ae15d98dbf091f6461ef397d66ef5 Mon Sep 17 00:00:00 2001
From: Vladimir Kalinin
Date: Mon, 19 May 2014 02:05:23 +0400
Subject: [PATCH 050/152] obscure case workaround in std::set wrapper, where
ignored type still need to be processed
---
Source/Modules/typepass.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Source/Modules/typepass.cxx b/Source/Modules/typepass.cxx
index ec6f64587..3e323f910 100644
--- a/Source/Modules/typepass.cxx
+++ b/Source/Modules/typepass.cxx
@@ -661,15 +661,15 @@ class TypePass:private Dispatcher {
* ------------------------------------------------------------ */
virtual int cDeclaration(Node *n) {
- if (GetFlag(n, "feature:ignore")) {
- return SWIG_OK;
- }
if (NoExcept) {
Delattr(n, "throws");
}
/* Normalize types. */
SwigType *ty = Getattr(n, "type");
+ if (!ty) {
+ return SWIG_OK;
+ }
normalize_type(ty);
SwigType *decl = Getattr(n, "decl");
if (decl) {
From 0c42158723ad29ddd199fc1eeb959bf777f7062f Mon Sep 17 00:00:00 2001
From: Oliver Buchtala
Date: Mon, 19 May 2014 00:20:19 +0200
Subject: [PATCH 051/152] Javascript: preparations for using
Language::getNSpace().
---
Source/Modules/javascript.cxx | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/Source/Modules/javascript.cxx b/Source/Modules/javascript.cxx
index 20af76f9f..e535bc179 100644
--- a/Source/Modules/javascript.cxx
+++ b/Source/Modules/javascript.cxx
@@ -318,6 +318,10 @@ public:
**/
virtual int fragmentDirective(Node *n);
+public:
+
+ virtual String *getNSpace() const;
+
private:
JSEmitter *emitter;
@@ -467,6 +471,10 @@ int JAVASCRIPT::fragmentDirective(Node *n) {
return SWIG_OK;
}
+String *JAVASCRIPT::getNSpace() const {
+ return Language::getNSpace();
+}
+
/* ---------------------------------------------------------------------
* top()
*
@@ -1346,14 +1354,26 @@ int JSEmitter::switchNamespace(Node *n) {
return SWIG_OK;
}
- String *nspace = Getattr(n, "sym:nspace");
-
// if nspace is deactivated, everything goes into the global scope
if (!GetFlag(n, "feature:nspace")) {
current_namespace = Getattr(namespaces, "::");
return SWIG_OK;
}
+// EXPERIMENTAL: we want to use Language::getNSpace() here
+// However, it is not working yet.
+// For namespace functions Language::getNSpace() does not give a valid result
+#if 0
+ JAVASCRIPT *lang = static_cast(Language::instance());
+ String *_nspace = lang->getNSpace();
+ if (!Equal(nspace, _nspace)) {
+ Printf(stdout, "##### Custom vs Language::getNSpace(): %s | %s\n", nspace, _nspace);
+ Swig_print_node(n);
+ }
+#endif
+
+ String *nspace = Getattr(n, "sym:nspace");
+
if (nspace == NULL) {
// It seems that only classes have 'sym:nspace' set.
// We try to get the namespace from the qualified name (i.e., everything before the last '::')
From 11963788e0d008e1c6e997577086cd8dd584c03f Mon Sep 17 00:00:00 2001
From: Oliver Buchtala
Date: Mon, 19 May 2014 00:21:21 +0200
Subject: [PATCH 052/152] Javascript: support null pointers.
We allow to set pointer types using JS null.
---
.../javascript/null_pointer_runme.js | 9 +++++++++
Lib/javascript/jsc/javascriptrun.swg | 18 +++++++++++++-----
Lib/javascript/v8/javascriptrun.swg | 12 ++++++++++--
3 files changed, 32 insertions(+), 7 deletions(-)
create mode 100644 Examples/test-suite/javascript/null_pointer_runme.js
diff --git a/Examples/test-suite/javascript/null_pointer_runme.js b/Examples/test-suite/javascript/null_pointer_runme.js
new file mode 100644
index 000000000..7c0d61244
--- /dev/null
+++ b/Examples/test-suite/javascript/null_pointer_runme.js
@@ -0,0 +1,9 @@
+var null_pointer = require("null_pointer");
+
+if (!null_pointer.func(null)) {
+ throw new Error("Javascript 'null' should be converted into NULL.");
+}
+
+if (null_pointer.getnull() != null) {
+ throw new Error("NULL should be converted into Javascript 'null'.");
+}
diff --git a/Lib/javascript/jsc/javascriptrun.swg b/Lib/javascript/jsc/javascriptrun.swg
index 9655b0eb6..1ff10a183 100644
--- a/Lib/javascript/jsc/javascriptrun.swg
+++ b/Lib/javascript/jsc/javascriptrun.swg
@@ -99,7 +99,9 @@ SWIGRUNTIME JSClassRef _SwigObject_classRef;
SWIGRUNTIME int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef objRef, void** ptr, swig_type_info *info, int flags) {
- SwigPrivData *cdata = (SwigPrivData *) JSObjectGetPrivate(objRef);
+ SwigPrivData *cdata;
+
+ cdata = (SwigPrivData *) JSObjectGetPrivate(objRef);
if(cdata == NULL) {
return SWIG_ERROR;
}
@@ -135,7 +137,7 @@ SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, voi
*ptr=0;
return SWIG_OK;
}
-
+
if(!JSValueIsObject(context, valRef)) {
return SWIG_TypeError;
}
@@ -149,17 +151,23 @@ SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, voi
}
SWIGRUNTIME JSObjectRef SWIG_JSC_NewPointerObj(JSContextRef context, void *ptr, swig_type_info *info, int flags) {
-
JSClassRef classRef;
+ JSObjectRef result;
+ SwigPrivData *cdata;
+
+ if (ptr == NULL) {
+ return JSValueToObject(context, JSValueMakeNull(context), 0);
+ }
+
if(info->clientdata == NULL) {
classRef = _SwigObject_classRef;
} else {
classRef = (JSClassRef) info->clientdata;
}
- JSObjectRef result = JSObjectMake(context, classRef, NULL);
+ result = JSObjectMake(context, classRef, NULL);
- SwigPrivData* cdata = (SwigPrivData*) malloc(sizeof(SwigPrivData));
+ cdata = (SwigPrivData*) malloc(sizeof(SwigPrivData));
cdata->swigCObject = ptr;
cdata->swigCMemOwn = (flags & SWIG_POINTER_OWN) ? 1 : 0;
cdata->info = info;
diff --git a/Lib/javascript/v8/javascriptrun.swg b/Lib/javascript/v8/javascriptrun.swg
index 2e0a46717..f200f1520 100644
--- a/Lib/javascript/v8/javascriptrun.swg
+++ b/Lib/javascript/v8/javascriptrun.swg
@@ -220,7 +220,11 @@ void SWIGV8_SetPrivateData(v8::Handle obj, void* ptr, swig_type_info
int SWIG_V8_ConvertPtr(v8::Handle valRef, void** ptr, swig_type_info *info, int flags) {
v8::HandleScope scope;
-
+ /* special case: JavaScript null => C NULL pointer */
+ if(valRef->IsNull()) {
+ *ptr=0;
+ return SWIG_OK;
+ }
if(!valRef->IsObject()) {
return SWIG_TypeError;
}
@@ -228,10 +232,14 @@ int SWIG_V8_ConvertPtr(v8::Handle valRef, void** ptr, swig_type_info
return SWIG_V8_ConvertInstancePtr(objRef, ptr, info, flags);
}
-v8::Handle SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info, int flags) {
+v8::Handle SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info, int flags) {
v8::HandleScope scope;
v8::Handle class_templ;
+ if (ptr == NULL) {
+ return scope.Close(v8::Null());
+ }
+
#if (SWIG_V8_VERSION < 0x031900)
if(info->clientdata != 0) {
class_templ = ((SWIGV8_ClientData*) info->clientdata)->class_templ;
From 243671700fd8ac0e18880962c19bf10cf4d91e1b Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Sun, 18 May 2014 23:09:58 +0100
Subject: [PATCH 053/152] Fix li_boost_intrusive_ptr for various versions of
boost
Modify testcase to fix compile errors on various versions of boost.
Tested using various combinations from boost-1.33/gcc-3.4.2 to
boost-1.53/gcc-4.7.3. Originally noticed as broken on
boost-1.36/gcc-4.3.4 on SLE 11.
Add in some diagnostics when reference count is wrong... which does
still happen occasionally.
---
.../java/li_boost_intrusive_ptr_runme.java | 20 ++++++++++---------
Examples/test-suite/li_boost_intrusive_ptr.i | 15 +++++++++++---
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/Examples/test-suite/java/li_boost_intrusive_ptr_runme.java b/Examples/test-suite/java/li_boost_intrusive_ptr_runme.java
index 530008a87..750ec5067 100644
--- a/Examples/test-suite/java/li_boost_intrusive_ptr_runme.java
+++ b/Examples/test-suite/java/li_boost_intrusive_ptr_runme.java
@@ -33,7 +33,7 @@ public class li_boost_intrusive_ptr_runme {
// Change loop count to run for a long time to monitor memory
final int loopCount = 5000; //5000;
for (int i=0; i
#include
#include
-template void intrusive_ptr_add_ref(const T* r) { r->addref(); }
-template void intrusive_ptr_release(const T* r) { r->release(); }
-
// Uncomment macro below to turn on intrusive_ptr memory leak checking as described above
//#define INTRUSIVE_PTR_WRAPPER
@@ -132,6 +135,8 @@ struct Klass {
void release(void) const { if (--count == 0) delete this; }
int use_count(void) const { return count; }
static long getTotal_count() { return total_count; }
+ friend void intrusive_ptr_add_ref(const Klass* r) { r->addref(); }
+ friend void intrusive_ptr_release(const Klass* r) { r->release(); }
private:
static void increment() { ++total_count; if (debug_shared) cout << " ++xxxxx Klass::increment tot: " << total_count << endl;}
@@ -177,6 +182,8 @@ struct IgnoredRefCountingBase {
void addref(void) const { ++count; }
void release(void) const { if (--count == 0) delete this; }
int use_count(void) const { return count; }
+ inline friend void intrusive_ptr_add_ref(const IgnoredRefCountingBase* r) { r->addref(); }
+ inline friend void intrusive_ptr_release(const IgnoredRefCountingBase* r) { r->release(); }
static long getTotal_count() { return total_count; }
private:
@@ -414,6 +421,8 @@ template struct Base {
void addref(void) const { count++; }
void release(void) const { if (--count == 0) delete this; }
int use_count(void) const { return count; }
+ inline friend void intrusive_ptr_add_ref(const Base* r) { r->addref(); }
+ inline friend void intrusive_ptr_release(const Base* r) { r->release(); }
};
%}
From a64549034c5579a148c37c7f3e070c8704dca459 Mon Sep 17 00:00:00 2001
From: Oliver Buchtala
Date: Mon, 19 May 2014 00:58:32 +0200
Subject: [PATCH 054/152] Javascript: generalise test-case 'typemap_variables'
so that it can be used for Javascript V8.
The original version contains output typemaps that produced incompatible code.
Introduce a pre-processor macro that is set to a valid value for v8.
---
Examples/test-suite/javascript/Makefile.in | 8 -------
Examples/test-suite/typemap_variables.i | 27 +++++++++++++++-------
2 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/Examples/test-suite/javascript/Makefile.in b/Examples/test-suite/javascript/Makefile.in
index fc5255155..be4350d1e 100644
--- a/Examples/test-suite/javascript/Makefile.in
+++ b/Examples/test-suite/javascript/Makefile.in
@@ -28,14 +28,6 @@ _setup = \
echo "$(ACTION)ing $(LANGUAGE) ($(JSENGINE)) testcase $*" ; \
fi;
-ifneq (jsc,$(ENGINE))
-
- # This test can not be run with v8 as it uses v8 API incompatible output typemaps
- typemap_variables.cpptest:
- echo "skipping $(LANGUAGE) ($(JSENGINE)) testcase typemap_variables" ;
-
-endif
-
ifeq (node,$(JSENGINE))
SWIGOPT += -v8 -DBUILDING_NODE_EXTENSION=1
diff --git a/Examples/test-suite/typemap_variables.i b/Examples/test-suite/typemap_variables.i
index 142e35060..047007a1c 100644
--- a/Examples/test-suite/typemap_variables.i
+++ b/Examples/test-suite/typemap_variables.i
@@ -13,33 +13,44 @@
%}
#endif
+// For Javascript V8 we can not use '0' for out typemaps
+#if defined(SWIG_JAVASCRIPT_V8)
+%header %{
+#define OUT_NULL_VALUE v8::Null()
+%}
+#else
+%header %{
+#define OUT_NULL_VALUE 0
+%}
+#endif
+
// Scripting languages use varin/varout for variables (except non-static member variables where in/out are used ???)
%typemap(varin) int "this_will_not_compile_varin "
%typemap(varout) int "this_will_not_compile_varout"
%typemap(varin) int globul "/*int globul varin */ TYPEMAP_VARIABLES_FAIL"
-%typemap(varout) int globul "/*int globul varout*/ $result=0;"
+%typemap(varout) int globul "/*int globul varout*/ $result=OUT_NULL_VALUE;"
%typemap(varin) int Space::nspace "/*int nspace varin */ TYPEMAP_VARIABLES_FAIL"
-%typemap(varout) int Space::nspace "/*int nspace varout*/ $result=0;"
+%typemap(varout) int Space::nspace "/*int nspace varout*/ $result=OUT_NULL_VALUE;"
//%typemap(varin) int member "/*int member varin */"
-//%typemap(varout) int member "/*int member varout*/ $result=0;"
+//%typemap(varout) int member "/*int member varout*/ $result=OUT_NULL_VALUE;"
%typemap(varin) int Space::Struct::smember "/*int smember varin */ TYPEMAP_VARIABLES_FAIL"
-%typemap(varout) int Space::Struct::smember "/*int smember varout*/ $result=0;"
+%typemap(varout) int Space::Struct::smember "/*int smember varout*/ $result=OUT_NULL_VALUE;"
// Statically typed languages use in/out for variables
%typemap(in) int "this_will_not_compile_in "
%typemap(out) int "this_will_not_compile_out"
%typemap(in) int globul "/*int globul in */ $1=0;"
-%typemap(out) int globul "/*int globul out*/ $result=0;"
+%typemap(out) int globul "/*int globul out*/ $result=OUT_NULL_VALUE;"
%typemap(in) int Space::nspace "/*int nspace in */ $1=0;"
-%typemap(out) int Space::nspace "/*int nspace out*/ $result=0;"
+%typemap(out) int Space::nspace "/*int nspace out*/ $result=OUT_NULL_VALUE;"
%typemap(in) int member "/*int member in */ $1=0;"
#ifdef SWIGTCL
%typemap(out) int member "/*int member out*/"
#else
-%typemap(out) int member "/*int member out*/ $result=0;"
+%typemap(out) int member "/*int member out*/ $result=OUT_NULL_VALUE;"
#endif
%typemap(in) int Space::Struct::smember "/*int smember in */ $1=0;"
-%typemap(out) int Space::Struct::smember "/*int smember out*/ $result=0;"
+%typemap(out) int Space::Struct::smember "/*int smember out*/ $result=OUT_NULL_VALUE;"
%typemap(javain) int "this_will_not_compile_javain "
%typemap(javaout) int "this_will_not_compile_javaout"
From 7cc617a19d2c7834ee877af920a824cd29a92a89 Mon Sep 17 00:00:00 2001
From: Oliver Buchtala
Date: Mon, 19 May 2014 11:46:21 +0200
Subject: [PATCH 055/152] Revert "Javascript: support null pointers."
This reverts commit 11963788e0d008e1c6e997577086cd8dd584c03f.
---
.../javascript/null_pointer_runme.js | 9 ---------
Lib/javascript/jsc/javascriptrun.swg | 18 +++++-------------
Lib/javascript/v8/javascriptrun.swg | 12 ++----------
3 files changed, 7 insertions(+), 32 deletions(-)
delete mode 100644 Examples/test-suite/javascript/null_pointer_runme.js
diff --git a/Examples/test-suite/javascript/null_pointer_runme.js b/Examples/test-suite/javascript/null_pointer_runme.js
deleted file mode 100644
index 7c0d61244..000000000
--- a/Examples/test-suite/javascript/null_pointer_runme.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var null_pointer = require("null_pointer");
-
-if (!null_pointer.func(null)) {
- throw new Error("Javascript 'null' should be converted into NULL.");
-}
-
-if (null_pointer.getnull() != null) {
- throw new Error("NULL should be converted into Javascript 'null'.");
-}
diff --git a/Lib/javascript/jsc/javascriptrun.swg b/Lib/javascript/jsc/javascriptrun.swg
index 1ff10a183..9655b0eb6 100644
--- a/Lib/javascript/jsc/javascriptrun.swg
+++ b/Lib/javascript/jsc/javascriptrun.swg
@@ -99,9 +99,7 @@ SWIGRUNTIME JSClassRef _SwigObject_classRef;
SWIGRUNTIME int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef objRef, void** ptr, swig_type_info *info, int flags) {
- SwigPrivData *cdata;
-
- cdata = (SwigPrivData *) JSObjectGetPrivate(objRef);
+ SwigPrivData *cdata = (SwigPrivData *) JSObjectGetPrivate(objRef);
if(cdata == NULL) {
return SWIG_ERROR;
}
@@ -137,7 +135,7 @@ SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, voi
*ptr=0;
return SWIG_OK;
}
-
+
if(!JSValueIsObject(context, valRef)) {
return SWIG_TypeError;
}
@@ -151,23 +149,17 @@ SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, voi
}
SWIGRUNTIME JSObjectRef SWIG_JSC_NewPointerObj(JSContextRef context, void *ptr, swig_type_info *info, int flags) {
+
JSClassRef classRef;
- JSObjectRef result;
- SwigPrivData *cdata;
-
- if (ptr == NULL) {
- return JSValueToObject(context, JSValueMakeNull(context), 0);
- }
-
if(info->clientdata == NULL) {
classRef = _SwigObject_classRef;
} else {
classRef = (JSClassRef) info->clientdata;
}
- result = JSObjectMake(context, classRef, NULL);
+ JSObjectRef result = JSObjectMake(context, classRef, NULL);
- cdata = (SwigPrivData*) malloc(sizeof(SwigPrivData));
+ SwigPrivData* cdata = (SwigPrivData*) malloc(sizeof(SwigPrivData));
cdata->swigCObject = ptr;
cdata->swigCMemOwn = (flags & SWIG_POINTER_OWN) ? 1 : 0;
cdata->info = info;
diff --git a/Lib/javascript/v8/javascriptrun.swg b/Lib/javascript/v8/javascriptrun.swg
index f200f1520..2e0a46717 100644
--- a/Lib/javascript/v8/javascriptrun.swg
+++ b/Lib/javascript/v8/javascriptrun.swg
@@ -220,11 +220,7 @@ void SWIGV8_SetPrivateData(v8::Handle obj, void* ptr, swig_type_info
int SWIG_V8_ConvertPtr(v8::Handle valRef, void** ptr, swig_type_info *info, int flags) {
v8::HandleScope scope;
- /* special case: JavaScript null => C NULL pointer */
- if(valRef->IsNull()) {
- *ptr=0;
- return SWIG_OK;
- }
+
if(!valRef->IsObject()) {
return SWIG_TypeError;
}
@@ -232,14 +228,10 @@ int SWIG_V8_ConvertPtr(v8::Handle valRef, void** ptr, swig_type_info
return SWIG_V8_ConvertInstancePtr(objRef, ptr, info, flags);
}
-v8::Handle SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info, int flags) {
+v8::Handle SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info, int flags) {
v8::HandleScope scope;
v8::Handle class_templ;
- if (ptr == NULL) {
- return scope.Close(v8::Null());
- }
-
#if (SWIG_V8_VERSION < 0x031900)
if(info->clientdata != 0) {
class_templ = ((SWIGV8_ClientData*) info->clientdata)->class_templ;
From d9bb3a84150990cc9e1980398f3dc7afd2dead79 Mon Sep 17 00:00:00 2001
From: Oliver Buchtala
Date: Mon, 19 May 2014 11:46:29 +0200
Subject: [PATCH 056/152] Revert "JavaScriptCore: ConvertPtr should allow
JavaScript null to be a valid value."
This reverts commit 05ed0325dc4bd9ddc126d3dacc6b38686f7382cf.
---
Lib/javascript/jsc/javascriptrun.swg | 7 -------
1 file changed, 7 deletions(-)
diff --git a/Lib/javascript/jsc/javascriptrun.swg b/Lib/javascript/jsc/javascriptrun.swg
index 9655b0eb6..813c7deb4 100644
--- a/Lib/javascript/jsc/javascriptrun.swg
+++ b/Lib/javascript/jsc/javascriptrun.swg
@@ -129,13 +129,6 @@ SWIGRUNTIME int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef ob
SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, void** ptr, swig_type_info *info, int flags) {
JSObjectRef objRef;
-
- /* special case: JavaScript null => C NULL pointer */
- if(JSValueIsNull(context, valRef)) {
- *ptr=0;
- return SWIG_OK;
- }
-
if(!JSValueIsObject(context, valRef)) {
return SWIG_TypeError;
}
From 2471e4ad9f1b6b9f851cf359fd6fd6b9aa34e9b8 Mon Sep 17 00:00:00 2001
From: Oliver Buchtala
Date: Mon, 19 May 2014 12:11:15 +0200
Subject: [PATCH 057/152] Javascript: Use RUNTOOL for running tests.
---
Examples/test-suite/javascript/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Examples/test-suite/javascript/Makefile.in b/Examples/test-suite/javascript/Makefile.in
index be4350d1e..a54fcd7e7 100644
--- a/Examples/test-suite/javascript/Makefile.in
+++ b/Examples/test-suite/javascript/Makefile.in
@@ -85,7 +85,7 @@ else
run_testcase = \
if [ -f $(srcdir)/$*$(SCRIPTSUFFIX) ]; then \
- $(top_builddir)/Tools/javascript/javascript -$(JSENGINE) $(srcdir)/$*$(SCRIPTSUFFIX); \
+ $(RUNTOOL) $(top_builddir)/Tools/javascript/javascript -$(JSENGINE) $(srcdir)/$*$(SCRIPTSUFFIX); \
fi
%.ctest:
From d5ea32d7607c1991ae74293472d73740c90e5db8 Mon Sep 17 00:00:00 2001
From: Eric Wing
Date: Sun, 18 May 2014 03:43:47 -0700
Subject: [PATCH 058/152] JavaScriptCore: ConvertPtr should allow JavaScript
null to be a valid value.
It is common in C to accept NULL to functions for pointer parameters.
extern void DoSomething(struct Foo* foo);
...
DoSomething(NULL);
Thus, JavaScript null should be allowed:
module.DoSomething(null);
But the current ConvertPtr definition accepts only objects. This modifies it to allow null.
---
Lib/javascript/jsc/javascriptrun.swg | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Lib/javascript/jsc/javascriptrun.swg b/Lib/javascript/jsc/javascriptrun.swg
index 813c7deb4..9655b0eb6 100644
--- a/Lib/javascript/jsc/javascriptrun.swg
+++ b/Lib/javascript/jsc/javascriptrun.swg
@@ -129,6 +129,13 @@ SWIGRUNTIME int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef ob
SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, void** ptr, swig_type_info *info, int flags) {
JSObjectRef objRef;
+
+ /* special case: JavaScript null => C NULL pointer */
+ if(JSValueIsNull(context, valRef)) {
+ *ptr=0;
+ return SWIG_OK;
+ }
+
if(!JSValueIsObject(context, valRef)) {
return SWIG_TypeError;
}
From 3f0f58889131baacb23583a7deb35d9394bfc141 Mon Sep 17 00:00:00 2001
From: Oliver Buchtala
Date: Mon, 19 May 2014 00:21:21 +0200
Subject: [PATCH 059/152] Javascript: support null pointers.
We allow to set pointer types using JS null.
---
.../javascript/null_pointer_runme.js | 9 +++++++++
Lib/javascript/jsc/javascriptrun.swg | 18 +++++++++++++-----
Lib/javascript/v8/javascriptrun.swg | 12 ++++++++++--
3 files changed, 32 insertions(+), 7 deletions(-)
create mode 100644 Examples/test-suite/javascript/null_pointer_runme.js
diff --git a/Examples/test-suite/javascript/null_pointer_runme.js b/Examples/test-suite/javascript/null_pointer_runme.js
new file mode 100644
index 000000000..7c0d61244
--- /dev/null
+++ b/Examples/test-suite/javascript/null_pointer_runme.js
@@ -0,0 +1,9 @@
+var null_pointer = require("null_pointer");
+
+if (!null_pointer.func(null)) {
+ throw new Error("Javascript 'null' should be converted into NULL.");
+}
+
+if (null_pointer.getnull() != null) {
+ throw new Error("NULL should be converted into Javascript 'null'.");
+}
diff --git a/Lib/javascript/jsc/javascriptrun.swg b/Lib/javascript/jsc/javascriptrun.swg
index 9655b0eb6..1ff10a183 100644
--- a/Lib/javascript/jsc/javascriptrun.swg
+++ b/Lib/javascript/jsc/javascriptrun.swg
@@ -99,7 +99,9 @@ SWIGRUNTIME JSClassRef _SwigObject_classRef;
SWIGRUNTIME int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef objRef, void** ptr, swig_type_info *info, int flags) {
- SwigPrivData *cdata = (SwigPrivData *) JSObjectGetPrivate(objRef);
+ SwigPrivData *cdata;
+
+ cdata = (SwigPrivData *) JSObjectGetPrivate(objRef);
if(cdata == NULL) {
return SWIG_ERROR;
}
@@ -135,7 +137,7 @@ SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, voi
*ptr=0;
return SWIG_OK;
}
-
+
if(!JSValueIsObject(context, valRef)) {
return SWIG_TypeError;
}
@@ -149,17 +151,23 @@ SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, voi
}
SWIGRUNTIME JSObjectRef SWIG_JSC_NewPointerObj(JSContextRef context, void *ptr, swig_type_info *info, int flags) {
-
JSClassRef classRef;
+ JSObjectRef result;
+ SwigPrivData *cdata;
+
+ if (ptr == NULL) {
+ return JSValueToObject(context, JSValueMakeNull(context), 0);
+ }
+
if(info->clientdata == NULL) {
classRef = _SwigObject_classRef;
} else {
classRef = (JSClassRef) info->clientdata;
}
- JSObjectRef result = JSObjectMake(context, classRef, NULL);
+ result = JSObjectMake(context, classRef, NULL);
- SwigPrivData* cdata = (SwigPrivData*) malloc(sizeof(SwigPrivData));
+ cdata = (SwigPrivData*) malloc(sizeof(SwigPrivData));
cdata->swigCObject = ptr;
cdata->swigCMemOwn = (flags & SWIG_POINTER_OWN) ? 1 : 0;
cdata->info = info;
diff --git a/Lib/javascript/v8/javascriptrun.swg b/Lib/javascript/v8/javascriptrun.swg
index 2e0a46717..f200f1520 100644
--- a/Lib/javascript/v8/javascriptrun.swg
+++ b/Lib/javascript/v8/javascriptrun.swg
@@ -220,7 +220,11 @@ void SWIGV8_SetPrivateData(v8::Handle obj, void* ptr, swig_type_info
int SWIG_V8_ConvertPtr(v8::Handle valRef, void** ptr, swig_type_info *info, int flags) {
v8::HandleScope scope;
-
+ /* special case: JavaScript null => C NULL pointer */
+ if(valRef->IsNull()) {
+ *ptr=0;
+ return SWIG_OK;
+ }
if(!valRef->IsObject()) {
return SWIG_TypeError;
}
@@ -228,10 +232,14 @@ int SWIG_V8_ConvertPtr(v8::Handle valRef, void** ptr, swig_type_info
return SWIG_V8_ConvertInstancePtr(objRef, ptr, info, flags);
}
-v8::Handle SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info, int flags) {
+v8::Handle SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info, int flags) {
v8::HandleScope scope;
v8::Handle class_templ;
+ if (ptr == NULL) {
+ return scope.Close(v8::Null());
+ }
+
#if (SWIG_V8_VERSION < 0x031900)
if(info->clientdata != 0) {
class_templ = ((SWIGV8_ClientData*) info->clientdata)->class_templ;
From 61b7da1671f5d88127eae0cde4561cd7883c825b Mon Sep 17 00:00:00 2001
From: Oliver Buchtala
Date: Mon, 19 May 2014 15:59:14 +0200
Subject: [PATCH 060/152] JavascriptCore: Bugfix for null-pointer support.
This solution must be considered as a preliminary workaround.
---
Lib/javascript/jsc/javascriptrun.swg | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Lib/javascript/jsc/javascriptrun.swg b/Lib/javascript/jsc/javascriptrun.swg
index 1ff10a183..ae1567e87 100644
--- a/Lib/javascript/jsc/javascriptrun.swg
+++ b/Lib/javascript/jsc/javascriptrun.swg
@@ -156,7 +156,11 @@ SWIGRUNTIME JSObjectRef SWIG_JSC_NewPointerObj(JSContextRef context, void *ptr,
SwigPrivData *cdata;
if (ptr == NULL) {
- return JSValueToObject(context, JSValueMakeNull(context), 0);
+ // HACK: it is not possible to use JSValueToObject (causing seg-fault)
+ // This static cast turned out to be a workaround
+ // In future, we should change the interface of this method
+ // to return JSValueRef instead of JSObjectRef.
+ return (JSObjectRef) JSValueMakeNull(context);
}
if(info->clientdata == NULL) {
From 71e72c45ed89457e2a17f412219d37aad67040be Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Wed, 21 May 2014 19:16:15 +0100
Subject: [PATCH 061/152] Create separate extetnd.c file for handling
extensions / %extend
This is just a simple code refactor, moving and function renaming to
remove the %extend code out of the parser into its own file now
that it isn't just used in the parser.
---
Source/CParse/cparse.h | 2 +-
Source/CParse/parser.y | 179 ++++++++------------------------------
Source/CParse/util.c | 14 +++
Source/Makefile.am | 1 +
Source/Modules/main.cxx | 3 +-
Source/Modules/nested.cxx | 16 ++--
Source/Swig/extend.c | 141 ++++++++++++++++++++++++++++++
Source/Swig/swig.h | 7 ++
8 files changed, 205 insertions(+), 158 deletions(-)
create mode 100644 Source/Swig/extend.c
diff --git a/Source/CParse/cparse.h b/Source/CParse/cparse.h
index 6d7342a45..5a0d52d23 100644
--- a/Source/CParse/cparse.h
+++ b/Source/CParse/cparse.h
@@ -59,7 +59,7 @@ extern "C" {
extern void cparse_normalize_void(Node *);
extern Parm *Swig_cparse_parm(String *s);
extern ParmList *Swig_cparse_parms(String *s, Node *file_line_node);
-
+ extern Node *new_node(const_String_or_char_ptr tag);
/* templ.c */
extern int Swig_cparse_template_expand(Node *n, String *rname, ParmList *tparms, Symtab *tscope);
diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y
index a1a62cb62..4ce8f0e6d 100644
--- a/Source/CParse/parser.y
+++ b/Source/CParse/parser.y
@@ -41,7 +41,6 @@ int yyparse();
static Node *top = 0; /* Top of the generated parse tree */
static int unnamed = 0; /* Unnamed datatype counter */
-Hash *extendhash = 0; /* Hash table of added methods */
static Hash *classes = 0; /* Hash table of classes */
static Hash *classes_typedefs = 0; /* Hash table of typedef classes: typedef struct X {...} Y; */
static Symtab *prev_symtab = 0;
@@ -71,14 +70,6 @@ static void yyerror (const char *e) {
(void)e;
}
-static Node *new_node(const_String_or_char_ptr tag) {
- Node *n = NewHash();
- set_nodeType(n,tag);
- Setfile(n,cparse_file);
- Setline(n,cparse_line);
- return n;
-}
-
/* Copies a node. Does not copy tree links or symbol table data (except for
sym:name) */
@@ -650,106 +641,6 @@ static void add_symbols_copy(Node *n) {
}
}
-/* Extension merge. This function is used to handle the %extend directive
- when it appears before a class definition. To handle this, the %extend
- actually needs to take precedence. Therefore, we will selectively nuke symbols
- from the current symbol table, replacing them with the added methods */
-
-void merge_extensions(Node *cls, Node *am) {
- Node *n;
- Node *csym;
-
- n = firstChild(am);
- while (n) {
- String *symname;
- if (Strcmp(nodeType(n),"constructor") == 0) {
- symname = Getattr(n,"sym:name");
- if (symname) {
- if (Strcmp(symname,Getattr(n,"name")) == 0) {
- /* If the name and the sym:name of a constructor are the same,
- then it hasn't been renamed. However---the name of the class
- itself might have been renamed so we need to do a consistency
- check here */
- if (Getattr(cls,"sym:name")) {
- Setattr(n,"sym:name", Getattr(cls,"sym:name"));
- }
- }
- }
- }
-
- symname = Getattr(n,"sym:name");
- DohIncref(symname);
- if ((symname) && (!Getattr(n,"error"))) {
- /* Remove node from its symbol table */
- Swig_symbol_remove(n);
- csym = Swig_symbol_add(symname,n);
- if (csym != n) {
- /* Conflict with previous definition. Nuke previous definition */
- String *e = NewStringEmpty();
- String *en = NewStringEmpty();
- String *ec = NewStringEmpty();
- Printf(ec,"Identifier '%s' redefined by %%extend (ignored),",symname);
- Printf(en,"%%extend definition of '%s'.",symname);
- SWIG_WARN_NODE_BEGIN(n);
- Swig_warning(WARN_PARSE_REDEFINED,Getfile(csym),Getline(csym),"%s\n",ec);
- Swig_warning(WARN_PARSE_REDEFINED,Getfile(n),Getline(n),"%s\n",en);
- SWIG_WARN_NODE_END(n);
- Printf(e,"%s:%d:%s\n%s:%d:%s\n",Getfile(csym),Getline(csym),ec,
- Getfile(n),Getline(n),en);
- Setattr(csym,"error",e);
- Delete(e);
- Delete(en);
- Delete(ec);
- Swig_symbol_remove(csym); /* Remove class definition */
- Swig_symbol_add(symname,n); /* Insert extend definition */
- }
- }
- n = nextSibling(n);
- }
-}
-
-void append_previous_extension(Node *cls, Node *am) {
- Node *n, *ne;
- Node *pe = 0;
- Node *ae = 0;
-
- if (!am) return;
-
- n = firstChild(am);
- while (n) {
- ne = nextSibling(n);
- set_nextSibling(n,0);
- /* typemaps and fragments need to be prepended */
- if (((Cmp(nodeType(n),"typemap") == 0) || (Cmp(nodeType(n),"fragment") == 0))) {
- if (!pe) pe = new_node("extend");
- appendChild(pe, n);
- } else {
- if (!ae) ae = new_node("extend");
- appendChild(ae, n);
- }
- n = ne;
- }
- if (pe) prependChild(cls,pe);
- if (ae) appendChild(cls,ae);
-}
-
-
-/* Check for unused %extend. Special case, don't report unused
- extensions for templates */
-
-void check_extensions() {
- Iterator ki;
-
- if (!extendhash) return;
- for (ki = First(extendhash); ki.key; ki = Next(ki)) {
- if (!Strchr(ki.key,'<')) {
- SWIG_WARN_NODE_BEGIN(ki.item);
- Swig_warning(WARN_PARSE_EXTEND_UNDEF,Getfile(ki.item), Getline(ki.item), "%%extend defined for an undeclared class %s.\n", SwigType_namestr(ki.key));
- SWIG_WARN_NODE_END(ki.item);
- }
- }
-}
-
/* Check a set of declarations to see if any are pure-abstract */
static List *pure_abstracts(Node *n) {
@@ -1682,14 +1573,13 @@ extend_directive : EXTEND options idcolon LBRACE {
cplus_mode = CPLUS_PUBLIC;
if (!classes) classes = NewHash();
if (!classes_typedefs) classes_typedefs = NewHash();
- if (!extendhash) extendhash = NewHash();
clsname = make_class_name($3);
cls = Getattr(classes,clsname);
if (!cls) {
cls = Getattr(classes_typedefs, clsname);
if (!cls) {
/* No previous definition. Create a new scope */
- Node *am = Getattr(extendhash,clsname);
+ Node *am = Getattr(Swig_extend_hash(),clsname);
if (!am) {
Swig_symbol_newscope();
Swig_symbol_setscopename($3);
@@ -1735,13 +1625,13 @@ extend_directive : EXTEND options idcolon LBRACE {
appendChild(current_class,$$);
} else {
/* We store the extensions in the extensions hash */
- Node *am = Getattr(extendhash,clsname);
+ Node *am = Getattr(Swig_extend_hash(),clsname);
if (am) {
/* Append the members to the previous extend methods */
appendChild(am,$6);
} else {
appendChild($$,$6);
- Setattr(extendhash,clsname,$$);
+ Setattr(Swig_extend_hash(),clsname,$$);
}
}
current_class = 0;
@@ -2824,8 +2714,7 @@ template_directive: SWIGTEMPLATE LPAREN idstringopt RPAREN idcolonnt LESSTHAN va
/* !!! This may be broken. We may have to add the
%extend methods at the beginning of the class */
-
- if (extendhash) {
+ {
String *stmp = 0;
String *clsname;
Node *am;
@@ -2834,32 +2723,32 @@ template_directive: SWIGTEMPLATE LPAREN idstringopt RPAREN idcolonnt LESSTHAN va
} else {
clsname = Getattr(templnode,"name");
}
- am = Getattr(extendhash,clsname);
+ am = Getattr(Swig_extend_hash(),clsname);
if (am) {
Symtab *st = Swig_symbol_current();
Swig_symbol_setscope(Getattr(templnode,"symtab"));
/* Printf(stdout,"%s: %s %p %p\n", Getattr(templnode,"name"), clsname, Swig_symbol_current(), Getattr(templnode,"symtab")); */
- merge_extensions(templnode,am);
+ Swig_extend_merge(templnode,am);
Swig_symbol_setscope(st);
- append_previous_extension(templnode,am);
- Delattr(extendhash,clsname);
+ Swig_extend_append_previous(templnode,am);
+ Delattr(Swig_extend_hash(),clsname);
}
if (stmp) Delete(stmp);
}
- /* Add to classes hash */
- if (!classes) classes = NewHash();
- {
- if (Namespaceprefix) {
- String *temp = NewStringf("%s::%s", Namespaceprefix, Getattr(templnode,"name"));
- Setattr(classes,temp,templnode);
- Delete(temp);
- } else {
- String *qs = Swig_symbol_qualifiedscopename(templnode);
- Setattr(classes, qs,templnode);
- Delete(qs);
- }
- }
+ /* Add to classes hash */
+ if (!classes)
+ classes = NewHash();
+
+ if (Namespaceprefix) {
+ String *temp = NewStringf("%s::%s", Namespaceprefix, Getattr(templnode,"name"));
+ Setattr(classes,temp,templnode);
+ Delete(temp);
+ } else {
+ String *qs = Swig_symbol_qualifiedscopename(templnode);
+ Setattr(classes, qs,templnode);
+ Delete(qs);
+ }
}
}
@@ -3571,13 +3460,12 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
Setattr($$,"abstracts", pure_abstracts($7));
/* This bit of code merges in a previously defined %extend directive (if any) */
-
- if (extendhash) {
+ {
String *clsname = Swig_symbol_qualifiedscopename(0);
- am = Getattr(extendhash, clsname);
+ am = Getattr(Swig_extend_hash(), clsname);
if (am) {
- merge_extensions($$, am);
- Delattr(extendhash, clsname);
+ Swig_extend_merge($$, am);
+ Delattr(Swig_extend_hash(), clsname);
}
Delete(clsname);
}
@@ -3588,7 +3476,7 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
appendChild($$, $7);
if (am)
- append_previous_extension($$, am);
+ Swig_extend_append_previous($$, am);
p = $9;
if (p && !nscope_inner) {
@@ -3787,15 +3675,16 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
n = nextSibling(n);
}
n = $8;
- /* Check for previous extensions */
- if (extendhash) {
+
+ /* Check for previous extensions */
+ {
String *clsname = Swig_symbol_qualifiedscopename(0);
- Node *am = Getattr(extendhash,clsname);
+ Node *am = Getattr(Swig_extend_hash(),clsname);
if (am) {
- /* Merge the extension into the symbol table */
- merge_extensions($$,am);
- append_previous_extension($$,am);
- Delattr(extendhash,clsname);
+ /* Merge the extension into the symbol table */
+ Swig_extend_merge($$,am);
+ Swig_extend_append_previous($$,am);
+ Delattr(Swig_extend_hash(),clsname);
}
Delete(clsname);
}
diff --git a/Source/CParse/util.c b/Source/CParse/util.c
index 7572dff10..320671d9a 100644
--- a/Source/CParse/util.c
+++ b/Source/CParse/util.c
@@ -88,3 +88,17 @@ void cparse_normalize_void(Node *n) {
}
}
}
+
+/* -----------------------------------------------------------------------------
+ * new_node()
+ *
+ * Create an empty parse node, setting file and line number information
+ * ----------------------------------------------------------------------------- */
+
+Node *new_node(const_String_or_char_ptr tag) {
+ Node *n = NewHash();
+ set_nodeType(n,tag);
+ Setfile(n,cparse_file);
+ Setline(n,cparse_line);
+ return n;
+}
diff --git a/Source/Makefile.am b/Source/Makefile.am
index d5331cba1..da65b2326 100644
--- a/Source/Makefile.am
+++ b/Source/Makefile.am
@@ -77,6 +77,7 @@ eswig_SOURCES = CParse/cscanner.c \
Swig/cwrap.c \
Swig/deprecate.c \
Swig/error.c \
+ Swig/extend.c \
Swig/fragment.c \
Swig/getopt.c \
Swig/include.c \
diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
index d8f20c207..47d0d374b 100644
--- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx
@@ -198,7 +198,6 @@ static String *external_runtime_name = 0;
enum { STAGE1=1, STAGE2=2, STAGE3=4, STAGE4=8, STAGEOVERFLOW=16 };
static List *libfiles = 0;
static List *all_output_files = 0;
-extern "C" void check_extensions();
/* -----------------------------------------------------------------------------
* check_extension()
@@ -1173,7 +1172,7 @@ int SWIG_main(int argc, char *argv[], Language *l) {
Printf(stdout, "Processing unnamed structs...\n");
Swig_nested_name_unnamed_c_structs(top);
}
- check_extensions();
+ Swig_extend_unused_check();
if (Verbose) {
Printf(stdout, "Processing types...\n");
diff --git a/Source/Modules/nested.cxx b/Source/Modules/nested.cxx
index ca1c79a31..9ec52ead1 100644
--- a/Source/Modules/nested.cxx
+++ b/Source/Modules/nested.cxx
@@ -338,9 +338,7 @@ static void insertNodeAfter(Node *n, Node *c) {
set_nextSibling(n, c);
set_previousSibling(c, n);
}
-extern "C" Hash *extendhash;
-extern "C" void merge_extensions(Node *cls, Node *am);
-extern "C" void append_previous_extension(Node *cls, Node *am);
+
void Swig_nested_name_unnamed_c_structs(Node *n) {
if (!classhash)
classhash = Getattr(n, "classes");
@@ -378,13 +376,11 @@ void Swig_nested_name_unnamed_c_structs(Node *n) {
decl = nextSibling(decl);
}
Delete(ty);
- if (extendhash) {
- if (Node *am = Getattr(extendhash, name)) {
- // Merge the extension into the symbol table
- merge_extensions(c, am);
- append_previous_extension(c, am);
- Delattr(extendhash, name);
- }
+ if (Node *am = Getattr(Swig_extend_hash(), name)) {
+ // Merge the extension into the symbol table
+ Swig_extend_merge(c, am);
+ Swig_extend_append_previous(c, am);
+ Delattr(Swig_extend_hash(), name);
}
Swig_symbol_setscope(Swig_symbol_global_scope());
add_symbols_c(c);
diff --git a/Source/Swig/extend.c b/Source/Swig/extend.c
new file mode 100644
index 000000000..30097b434
--- /dev/null
+++ b/Source/Swig/extend.c
@@ -0,0 +1,141 @@
+/* -----------------------------------------------------------------------------
+ * This file is part of SWIG, which is licensed as a whole under version 3
+ * (or any later version) of the GNU General Public License. Some additional
+ * terms also apply to certain portions of SWIG. The full details of the SWIG
+ * license and copyrights can be found in the LICENSE and COPYRIGHT files
+ * included with the SWIG source code as distributed by the SWIG developers
+ * and at http://www.swig.org/legal.html.
+ *
+ * extend.c
+ *
+ * Extensions support (%extend)
+ * ----------------------------------------------------------------------------- */
+
+#include "swig.h"
+#include "cparse.h"
+
+static Hash *extendhash = 0; /* Hash table of added methods */
+
+/* -----------------------------------------------------------------------------
+ * Swig_extend_hash()
+ *
+ * Access the extend hash
+ * ----------------------------------------------------------------------------- */
+Hash *Swig_extend_hash(void) {
+ if (!extendhash)
+ extendhash = NewHash();
+ return extendhash;
+}
+
+/* -----------------------------------------------------------------------------
+ * Swig_extend_merge()
+ *
+ * Extension merge. This function is used to handle the %extend directive
+ * when it appears before a class definition. To handle this, the %extend
+ * actually needs to take precedence. Therefore, we will selectively nuke symbols
+ * from the current symbol table, replacing them with the added methods.
+ * ----------------------------------------------------------------------------- */
+
+void Swig_extend_merge(Node *cls, Node *am) {
+ Node *n;
+ Node *csym;
+
+ n = firstChild(am);
+ while (n) {
+ String *symname;
+ if (Strcmp(nodeType(n),"constructor") == 0) {
+ symname = Getattr(n,"sym:name");
+ if (symname) {
+ if (Strcmp(symname,Getattr(n,"name")) == 0) {
+ /* If the name and the sym:name of a constructor are the same,
+ then it hasn't been renamed. However---the name of the class
+ itself might have been renamed so we need to do a consistency
+ check here */
+ if (Getattr(cls,"sym:name")) {
+ Setattr(n,"sym:name", Getattr(cls,"sym:name"));
+ }
+ }
+ }
+ }
+
+ symname = Getattr(n,"sym:name");
+ DohIncref(symname);
+ if ((symname) && (!Getattr(n,"error"))) {
+ /* Remove node from its symbol table */
+ Swig_symbol_remove(n);
+ csym = Swig_symbol_add(symname,n);
+ if (csym != n) {
+ /* Conflict with previous definition. Nuke previous definition */
+ String *e = NewStringEmpty();
+ String *en = NewStringEmpty();
+ String *ec = NewStringEmpty();
+ Printf(ec,"Identifier '%s' redefined by %%extend (ignored),",symname);
+ Printf(en,"%%extend definition of '%s'.",symname);
+ SWIG_WARN_NODE_BEGIN(n);
+ Swig_warning(WARN_PARSE_REDEFINED,Getfile(csym),Getline(csym),"%s\n",ec);
+ Swig_warning(WARN_PARSE_REDEFINED,Getfile(n),Getline(n),"%s\n",en);
+ SWIG_WARN_NODE_END(n);
+ Printf(e,"%s:%d:%s\n%s:%d:%s\n",Getfile(csym),Getline(csym),ec,
+ Getfile(n),Getline(n),en);
+ Setattr(csym,"error",e);
+ Delete(e);
+ Delete(en);
+ Delete(ec);
+ Swig_symbol_remove(csym); /* Remove class definition */
+ Swig_symbol_add(symname,n); /* Insert extend definition */
+ }
+ }
+ n = nextSibling(n);
+ }
+}
+
+/* -----------------------------------------------------------------------------
+ * Swig_extend_append_previous()
+ * ----------------------------------------------------------------------------- */
+
+void Swig_extend_append_previous(Node *cls, Node *am) {
+ Node *n, *ne;
+ Node *pe = 0;
+ Node *ae = 0;
+
+ if (!am) return;
+
+ n = firstChild(am);
+ while (n) {
+ ne = nextSibling(n);
+ set_nextSibling(n,0);
+ /* typemaps and fragments need to be prepended */
+ if (((Cmp(nodeType(n),"typemap") == 0) || (Cmp(nodeType(n),"fragment") == 0))) {
+ if (!pe) pe = new_node("extend");
+ appendChild(pe, n);
+ } else {
+ if (!ae) ae = new_node("extend");
+ appendChild(ae, n);
+ }
+ n = ne;
+ }
+ if (pe) prependChild(cls,pe);
+ if (ae) appendChild(cls,ae);
+}
+
+
+/* -----------------------------------------------------------------------------
+ * Swig_extend_unused_check()
+ *
+ * Check for unused %extend. Special case, don't report unused
+ * extensions for templates
+ * ----------------------------------------------------------------------------- */
+
+void Swig_extend_unused_check(void) {
+ Iterator ki;
+
+ if (!extendhash) return;
+ for (ki = First(extendhash); ki.key; ki = Next(ki)) {
+ if (!Strchr(ki.key,'<')) {
+ SWIG_WARN_NODE_BEGIN(ki.item);
+ Swig_warning(WARN_PARSE_EXTEND_UNDEF,Getfile(ki.item), Getline(ki.item), "%%extend defined for an undeclared class %s.\n", SwigType_namestr(ki.key));
+ SWIG_WARN_NODE_END(ki.item);
+ }
+ }
+}
+
diff --git a/Source/Swig/swig.h b/Source/Swig/swig.h
index 5334a29f0..5ee7f8d95 100644
--- a/Source/Swig/swig.h
+++ b/Source/Swig/swig.h
@@ -420,6 +420,13 @@ extern int ParmList_is_compactdefargs(ParmList *p);
extern void Swig_fragment_emit(String *name);
extern void Swig_fragment_clear(String *section);
+/* --- Extension support --- */
+
+ extern Hash *Swig_extend_hash(void);
+ extern void Swig_extend_merge(Node *cls, Node *am);
+ extern void Swig_extend_append_previous(Node *cls, Node *am);
+ extern void Swig_extend_unused_check(void);
+
/* hacks defined in C++ ! */
extern int Swig_director_mode(void);
extern int Swig_director_protected_mode(void);
From d9cac664620d282aa423d3f0ef55ab9a677156a4 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Wed, 21 May 2014 20:04:48 +0100
Subject: [PATCH 062/152] Add missing entries into changes files.
---
CHANGES.current | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/CHANGES.current b/CHANGES.current
index 8b67392b2..e73a91c3f 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -5,6 +5,18 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.1 (in progress)
===========================
+2014-05-18: vkalinin
+ Bug #175 - Restore %extend to work for unnamed nested structures by using a C
+ symbol comprising the outer structure name and unnamed variable instance name.
+
+2014-05-15: kwwette
+ Add #166 - 'make check' now works out of source. This required te examples to build
+ out of source. The main languages have been tested - C#, Go, Guile, Java, Javascript,
+ Lua, Octave, Perl, PHP, Python, Ruby and Tcl.
+
+2014-05-01: Oliver Buchtala
+ Javascript support added, see Javascript chapter in the documentation.
+
2014-05-01: olly
[PHP] The generated __isset() method now returns true for read-only properties.
From 9846f3f1eac0835e9d1870f41ea0c03f3006a687 Mon Sep 17 00:00:00 2001
From: Harvey Falcic
Date: Wed, 16 Apr 2014 11:13:21 -0400
Subject: [PATCH 063/152] Python 3 byte string output: use
errors="surrogateescape"
... if available on the version of Python that's in use. This allows
obtaining the original byte string (and potentially trying a fallback
encoding) if the bytes can't be decoded as UTF-8.
Previously, a UnicodeDecodeError would be raised with no way to treat
the data as bytes or try another codec.
---
Lib/python/pystrings.swg | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Lib/python/pystrings.swg b/Lib/python/pystrings.swg
index f6a4eba8a..2b14547ad 100644
--- a/Lib/python/pystrings.swg
+++ b/Lib/python/pystrings.swg
@@ -89,7 +89,11 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
SWIG_InternalNewPointerObj(%const_cast(carray,char *), pchar_descriptor, 0) : SWIG_Py_Void();
} else {
%#if PY_VERSION_HEX >= 0x03000000
+%#if PY_VERSION_HEX >= 0x03010000
+ return PyUnicode_DecodeUTF8(carray, %numeric_cast(size,int), "surrogateescape");
+%#else
return PyUnicode_FromStringAndSize(carray, %numeric_cast(size,int));
+%#endif
%#else
return PyString_FromStringAndSize(carray, %numeric_cast(size,int));
%#endif
From 791f070e66ee4cf96f0df0a4d00e1fe688f6bb80 Mon Sep 17 00:00:00 2001
From: Harvey Falcic
Date: Thu, 22 May 2014 22:53:07 -0400
Subject: [PATCH 064/152] Add "unicode_strings" test case for new Python 3
behavior
---
Examples/test-suite/common.mk | 1 +
.../test-suite/python/unicode_strings_runme.py | 4 ++++
Examples/test-suite/unicode_strings.i | 15 +++++++++++++++
3 files changed, 20 insertions(+)
create mode 100644 Examples/test-suite/python/unicode_strings_runme.py
create mode 100644 Examples/test-suite/unicode_strings.i
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index bfb960fe5..bc1ca5cb8 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -473,6 +473,7 @@ CPP_TEST_CASES += \
typemap_various \
typename \
types_directive \
+ unicode_strings \
union_scope \
using1 \
using2 \
diff --git a/Examples/test-suite/python/unicode_strings_runme.py b/Examples/test-suite/python/unicode_strings_runme.py
new file mode 100644
index 000000000..2d26599aa
--- /dev/null
+++ b/Examples/test-suite/python/unicode_strings_runme.py
@@ -0,0 +1,4 @@
+import unicode_strings
+
+unicode_strings.test_c_str()
+unicode_strings.test_std_string()
diff --git a/Examples/test-suite/unicode_strings.i b/Examples/test-suite/unicode_strings.i
new file mode 100644
index 000000000..f4a8b8b50
--- /dev/null
+++ b/Examples/test-suite/unicode_strings.i
@@ -0,0 +1,15 @@
+%module unicode_strings
+
+%include
+
+%inline %{
+
+const char* test_c_str(void) {
+ return "h\xe9llo";
+}
+
+std::string test_std_string(void) {
+ return std::string("h\xe9llo");
+}
+
+%}
From 5fc851a1e0928d5c179c2b9336e76d5e19324d25 Mon Sep 17 00:00:00 2001
From: Harvey Falcic
Date: Fri, 23 May 2014 15:24:35 -0400
Subject: [PATCH 065/152] Add Python 3 'surrogateescape' documentation
---
Doc/Manual/Python.html | 87 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 87 insertions(+)
diff --git a/Doc/Manual/Python.html b/Doc/Manual/Python.html
index bdb1ada30..45725065d 100644
--- a/Doc/Manual/Python.html
+++ b/Doc/Manual/Python.html
@@ -116,6 +116,7 @@
Function annotation
Buffer interface
Abstract base classes
+Byte string output conversion
@@ -5928,6 +5929,92 @@ For details of abstract base class, please see
PEP 3119.
+35.12.4 Byte string output conversion
+
+
+
+By default, any byte string (char* or std::string) returned
+from C or C++ code is decoded to text as UTF-8. This decoding uses the
+surrogateescape error handler under Python 3.1 or higher -- this
+error handler decodes invalid byte sequences to high surrogate characters
+in the range U+DC80 to U+DCFF.
+
+As an example, consider the following SWIG interface, which exposes a byte
+string that cannot be completely decoded as UTF-8:
+
+
+
+%module example
+
+%include <std_string.i>
+
+%inline %{
+
+const char* non_utf8_c_str(void) {
+ return "h\xe9llo w\xc3\xb6rld";
+}
+
+%}
+
+
+
+When this method is called from Python 3, the return value is the following
+text string:
+
+
+
+>>> s = test.non_utf8_c_str()
+>>> s
+'h\udce9llo wörld'
+
+
+
+Since the C string contains bytes that cannot be decoded as UTF-8, those raw
+bytes are represented as high surrogate characters that can be used to obtain
+the original byte sequence:
+
+
+
+>>> b = s.encode('utf-8', errors='surrogateescape')
+>>> b
+b'h\xe9llo w\xc3\xb6rld'
+
+
+
+One can then attempt a different encoding, if desired (or simply leave the
+byte string as a raw sequence of bytes for use in binary protocols):
+
+
+
+>>> b.decode('latin-1')
+'héllo wörld'
+
+
+
+Note, however, that text strings containing surrogate characters are rejected
+with the default strict codec error handler. For example:
+
+
+
+>>> with open('test', 'w') as f:
+... print(s, file=f)
+...
+Traceback (most recent call last):
+ File "<stdin>", line 2, in <module>
+UnicodeEncodeError: 'utf-8' codec can't encode character '\udce9' in position 1: surrogates not allowed
+
+
+
+This requires the user to check most strings returned by SWIG bindings, but
+the alternative is for a non-UTF8 byte string to be completely inaccessible
+in Python 3 code.
+
+
+
+For more details about the surrogateescape error handler, please see
+PEP 383.
+
+
From 8d3902a6666799a01ff23ee501c478b1371d19a1 Mon Sep 17 00:00:00 2001
From: Olly Betts
Date: Sat, 24 May 2014 11:10:57 +1200
Subject: [PATCH 066/152] Work towards C90 compatibility for Lua
---
Lib/lua/luarun.swg | 49 ++++++++++++++++++++++++++--------------------
1 file changed, 28 insertions(+), 21 deletions(-)
diff --git a/Lib/lua/luarun.swg b/Lib/lua/luarun.swg
index ad735a541..dd668587f 100644
--- a/Lib/lua/luarun.swg
+++ b/Lib/lua/luarun.swg
@@ -392,8 +392,9 @@ static int swig_lua_elua_emulate_unique_key;
/* This function emulates eLua rotables behaviour. It loads a rotable definition into the usual lua table. */
SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table)
{
+ int i, table_parsed, parsed_tables_array, target_table;
assert(lua_istable(L,-1));
- int target_table = lua_gettop(L);
+ target_table = lua_gettop(L);
/* Get the registry where we put all parsed tables to avoid loops */
lua_rawgetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
if(lua_isnil(L,-1)) {
@@ -402,11 +403,10 @@ SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_ent
lua_pushvalue(L,-1);
lua_rawsetp(L,LUA_REGISTRYINDEX,(void*)(&swig_lua_elua_emulate_unique_key));
}
- int parsed_tables_array = lua_gettop(L);
+ parsed_tables_array = lua_gettop(L);
lua_pushvalue(L,target_table);
lua_rawsetp(L, parsed_tables_array, table);
- int i;
- int table_parsed = 0;
+ table_parsed = 0;
const int SWIGUNUSED pairs_start = lua_gettop(L);
for(i = 0;table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL;i++)
{
@@ -606,7 +606,7 @@ SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss);
/* helper function - register namespace methods and attributes into namespace */
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns)
{
- int i = 0;
+ int i;
/* There must be namespace table (not metatable) at the top of the stack */
assert(lua_istable(L,-1));
SWIG_Lua_InstallConstants(L, ns->ns_constants);
@@ -753,11 +753,13 @@ SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED
/* first_arg - position of the object in stack. Everything that is above are arguments
* and is passed to every evocation of the func */
int last_arg = lua_gettop(L);/* position of last argument */
- lua_getmetatable(L,first_arg);
- int original_metatable = last_arg + 1;
+ int original_metatable;
size_t bases_count;
+ int result;
+ lua_getmetatable(L,first_arg);
+ original_metatable = last_arg + 1;
SWIG_LUA_INIT_BASE_SEARCH(bases_count);
- int result = SWIG_ERROR;
+ result = SWIG_ERROR;
if(ret)
*ret = 0;
if(bases_count>0)
@@ -766,10 +768,11 @@ SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED
int j;
int subcall_first_arg = lua_gettop(L) + 1;/* Here a copy of first_arg and arguments begin */
int valid = 1;
+ int subcall_last_arg;
+ swig_type_info *base_swig_type = 0;
for(j=first_arg;j<=last_arg;j++)
lua_pushvalue(L,j);
- int subcall_last_arg = lua_gettop(L);
- swig_type_info *base_swig_type = 0;
+ subcall_last_arg = lua_gettop(L);
/* Trick: temporarily replacing original metatable with metatable for base class and call getter */
for(i=0;ifqname); /* get the name */
@@ -1499,7 +1507,6 @@ SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L,swig_lua_class *c
}
lua_pop(L,2); /* tidy stack */
/* Recursively initialize all bases */
- int i = 0;
for(i=0;clss->bases[i];i++)
{
SWIG_Lua_class_register_instance(L,clss->bases[i]);
@@ -1604,6 +1611,7 @@ SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss)
SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss)
{
const int SWIGUNUSED begin = lua_gettop(L);
+ int i;
/* if name already there (class is already registered) then do nothing */
SWIG_Lua_get_class_registry(L); /* get the registry */
lua_pushstring(L,clss->fqname); /* get the name */
@@ -1615,7 +1623,6 @@ SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_cla
}
lua_pop(L,2); /* tidy stack */
/* Recursively initialize all bases */
- int i = 0;
for(i=0;clss->bases[i];i++)
{
SWIG_Lua_elua_class_register_instance(L,clss->bases[i]);
From 1a0b8abec735ec0db088a1c4c2da1b71cad7ff0e Mon Sep 17 00:00:00 2001
From: Olly Betts
Date: Sat, 24 May 2014 11:11:51 +1200
Subject: [PATCH 067/152] Fix comment typo
---
Lib/lua/luarun.swg | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/lua/luarun.swg b/Lib/lua/luarun.swg
index dd668587f..7cfcff212 100644
--- a/Lib/lua/luarun.swg
+++ b/Lib/lua/luarun.swg
@@ -1838,8 +1838,8 @@ SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]) {
#endif
/* Executes a C string in Lua which is a really simple way of calling lua from C
Unfortunately lua keeps changing its APIs, so we need a conditional compile
-In lua 5.0.X its lua_dostring()
-In lua 5.1.X its luaL_dostring()
+In lua 5.0.X it's lua_dostring()
+In lua 5.1.X it's luaL_dostring()
*/
SWIGINTERN int
SWIG_Lua_dostring(lua_State *L, const char *str) {
From 879296f71bcfd56a7659355942c784176ae06e6c Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Sat, 24 May 2014 00:12:27 +0100
Subject: [PATCH 068/152] Correct CFLAGS CXXFLAGS for Javascript and guile
examples
---
Examples/Makefile.in | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index b22fd2e76..3a91cddd3 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -498,7 +498,7 @@ guile_externalhdr:
guile_augmented: $(SRCDIR_SRCS)
$(SWIG) -guile $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) -o $(TARGET)
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(GUILE_CFLAGS) $(GUILE_LIBS) $(LIBS) -o $(TARGET)
# -----------------------------------------------------------------
# Build statically linked Guile interpreter
@@ -656,8 +656,8 @@ ifeq (node,$(JSENGINE))
sed -e 's|$$srcdir|./$(SRCDIR)|g' $(SRCDIR)binding.gyp.in > binding.gyp
$(NODEGYP) --loglevel=silent configure build 1>>/dev/null
else
- $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
- $(CXXSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
endif
@@ -669,14 +669,14 @@ ifeq (jsc, $(ENGINE))
$(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(INCLUDES) $(JSINCLUDES)
$(LDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
else # (v8 | node) # v8 and node must be compiled as c++
- $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
- $(CXXSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(ISRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
endif
javascript_cpp: $(SRCDIR_SRCS) javascript_custom_interpreter
$(SWIG) -javascript -c++ $(SWIGOPT) $(INTERFACEPATH)
- $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
- $(CXXSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
+ $(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(INCLUDES) $(JSINCLUDES)
+ $(CXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JSDYNAMICLINKING) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(SO)
# -----------------------------------------------------------------
# Running a Javascript example
From f39ed94419e4a30b8b2ba1d49c138fd245010262 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Sat, 24 May 2014 00:14:01 +0100
Subject: [PATCH 069/152] Fix compiler warnings in examples when using
-std=c++98 -std=gnu89 -pedantic -Wreturn-type
---
Examples/csharp/extend/example.h | 2 +-
Examples/csharp/reference/example.cxx | 2 +-
Examples/csharp/variables/example.c | 4 ++--
Examples/d/extend/example.h | 2 +-
Examples/d/variables/example.c | 4 ++--
Examples/go/extend/example.h | 2 +-
Examples/go/reference/reference.cxx | 2 +-
Examples/java/extend/example.h | 2 +-
Examples/java/reference/example.cxx | 2 +-
Examples/java/variables/example.c | 4 ++--
Examples/javascript/reference/example.cxx | 2 +-
Examples/javascript/variables/example.cxx | 4 ++--
Examples/lua/arrays/example.c | 2 +-
Examples/lua/dual/dual.cpp | 6 +++---
Examples/lua/embed2/embed2.c | 10 +++++-----
Examples/lua/functest/example.i | 13 ++++++-------
Examples/lua/owner/example.cxx | 11 +++++++----
Examples/lua/variables/example.c | 4 ++--
Examples/modula3/reference/example.cxx | 2 +-
Examples/octave/extend/example.h | 2 +-
Examples/octave/reference/example.cxx | 2 +-
Examples/octave/variables/example.c | 4 ++--
Examples/perl5/extend/example.h | 2 +-
Examples/perl5/reference/example.cxx | 2 +-
Examples/perl5/value/example.i | 2 +-
Examples/perl5/variables/example.c | 4 ++--
Examples/php/extend/example.h | 2 +-
Examples/php/reference/example.cxx | 10 +++++-----
Examples/php/reference/example.i | 2 +-
Examples/php/sync/example.cxx | 2 +-
Examples/php/value/example.i | 2 +-
Examples/php/variables/example.c | 4 ++--
Examples/python/extend/example.h | 2 +-
Examples/python/reference/example.cxx | 2 +-
Examples/python/swigrun/example.cxx | 2 +-
Examples/python/swigrun/example.h | 2 +-
Examples/python/variables/example.c | 4 ++--
Examples/ruby/reference/example.cxx | 2 +-
Examples/ruby/value/example.i | 2 +-
Examples/ruby/variables/example.c | 4 ++--
Examples/tcl/reference/example.cxx | 2 +-
Examples/tcl/value/example.i | 2 +-
Examples/tcl/variables/example.c | 4 ++--
43 files changed, 75 insertions(+), 73 deletions(-)
diff --git a/Examples/csharp/extend/example.h b/Examples/csharp/extend/example.h
index b27ab9711..ca1aed28f 100644
--- a/Examples/csharp/extend/example.h
+++ b/Examples/csharp/extend/example.h
@@ -14,7 +14,7 @@ public:
virtual std::string getTitle() { return getPosition() + " " + getName(); }
virtual std::string getName() { return name; }
virtual std::string getPosition() const { return "Employee"; }
- virtual ~Employee() { printf("~Employee() @ %p\n", this); }
+ virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); }
};
diff --git a/Examples/csharp/reference/example.cxx b/Examples/csharp/reference/example.cxx
index 8a513bf49..9dbaed2ee 100644
--- a/Examples/csharp/reference/example.cxx
+++ b/Examples/csharp/reference/example.cxx
@@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::print() {
static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
diff --git a/Examples/csharp/variables/example.c b/Examples/csharp/variables/example.c
index 05e17c8c5..85685fe72 100644
--- a/Examples/csharp/variables/example.c
+++ b/Examples/csharp/variables/example.c
@@ -52,9 +52,9 @@ void print_vars() {
printf("cvar = %c\n", cvar);
printf("strvar = %s\n", strvar ? strvar : "(null)");
printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", iptrvar);
+ printf("iptrvar = %p\n", (void *)iptrvar);
printf("name = %s\n", name);
- printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
+ printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}
diff --git a/Examples/d/extend/example.h b/Examples/d/extend/example.h
index 7ad93fbc1..7a8c04c33 100644
--- a/Examples/d/extend/example.h
+++ b/Examples/d/extend/example.h
@@ -14,7 +14,7 @@ public:
virtual std::string getTitle() { return getPosition() + " " + getName(); }
virtual std::string getName() { return name; }
virtual std::string getPosition() const { return "Employee"; }
- virtual ~Employee() { printf("~Employee() @ %p\n", this); }
+ virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); }
};
diff --git a/Examples/d/variables/example.c b/Examples/d/variables/example.c
index 3b4e9f346..f5356c755 100644
--- a/Examples/d/variables/example.c
+++ b/Examples/d/variables/example.c
@@ -52,9 +52,9 @@ void print_vars() {
printf("cvar = %c\n", cvar);
printf("strvar = %s\n", strvar ? strvar : "(null)");
printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", iptrvar);
+ printf("iptrvar = %p\n", (void *)iptrvar);
printf("name = %s\n", name);
- printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
+ printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}
diff --git a/Examples/go/extend/example.h b/Examples/go/extend/example.h
index b27ab9711..ca1aed28f 100644
--- a/Examples/go/extend/example.h
+++ b/Examples/go/extend/example.h
@@ -14,7 +14,7 @@ public:
virtual std::string getTitle() { return getPosition() + " " + getName(); }
virtual std::string getName() { return name; }
virtual std::string getPosition() const { return "Employee"; }
- virtual ~Employee() { printf("~Employee() @ %p\n", this); }
+ virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); }
};
diff --git a/Examples/go/reference/reference.cxx b/Examples/go/reference/reference.cxx
index 8a513bf49..9dbaed2ee 100644
--- a/Examples/go/reference/reference.cxx
+++ b/Examples/go/reference/reference.cxx
@@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::print() {
static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
diff --git a/Examples/java/extend/example.h b/Examples/java/extend/example.h
index b27ab9711..ca1aed28f 100644
--- a/Examples/java/extend/example.h
+++ b/Examples/java/extend/example.h
@@ -14,7 +14,7 @@ public:
virtual std::string getTitle() { return getPosition() + " " + getName(); }
virtual std::string getName() { return name; }
virtual std::string getPosition() const { return "Employee"; }
- virtual ~Employee() { printf("~Employee() @ %p\n", this); }
+ virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); }
};
diff --git a/Examples/java/reference/example.cxx b/Examples/java/reference/example.cxx
index 8a513bf49..9dbaed2ee 100644
--- a/Examples/java/reference/example.cxx
+++ b/Examples/java/reference/example.cxx
@@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::print() {
static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
diff --git a/Examples/java/variables/example.c b/Examples/java/variables/example.c
index 05e17c8c5..85685fe72 100644
--- a/Examples/java/variables/example.c
+++ b/Examples/java/variables/example.c
@@ -52,9 +52,9 @@ void print_vars() {
printf("cvar = %c\n", cvar);
printf("strvar = %s\n", strvar ? strvar : "(null)");
printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", iptrvar);
+ printf("iptrvar = %p\n", (void *)iptrvar);
printf("name = %s\n", name);
- printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
+ printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}
diff --git a/Examples/javascript/reference/example.cxx b/Examples/javascript/reference/example.cxx
index 8a513bf49..9dbaed2ee 100644
--- a/Examples/javascript/reference/example.cxx
+++ b/Examples/javascript/reference/example.cxx
@@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::print() {
static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
diff --git a/Examples/javascript/variables/example.cxx b/Examples/javascript/variables/example.cxx
index f10390a9e..15314b383 100644
--- a/Examples/javascript/variables/example.cxx
+++ b/Examples/javascript/variables/example.cxx
@@ -57,9 +57,9 @@ void print_vars() {
printf("cvar = %c\n", cvar);
printf("strvar = %s\n", strvar ? strvar : "(null)");
printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", iptrvar);
+ printf("iptrvar = %p\n", (void *)iptrvar);
printf("name = %s\n", name);
- printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
+ printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}
diff --git a/Examples/lua/arrays/example.c b/Examples/lua/arrays/example.c
index ed23738c8..da1bd755a 100644
--- a/Examples/lua/arrays/example.c
+++ b/Examples/lua/arrays/example.c
@@ -13,7 +13,7 @@ void sort_int(int* arr, int len)
qsort(arr, len, sizeof(int), compare_int);
}
-// ditto doubles
+/* ditto doubles */
int compare_double(const void * a, const void * b)
{
return (int)( *(double*)a - *(double*)b );
diff --git a/Examples/lua/dual/dual.cpp b/Examples/lua/dual/dual.cpp
index b54e44de1..2108a7275 100644
--- a/Examples/lua/dual/dual.cpp
+++ b/Examples/lua/dual/dual.cpp
@@ -45,14 +45,14 @@ void testModule(lua_State *L)
swig_type_info *pTypeInfo=0,*pTypeInfo2=0;
swig_module_info *pModule=0;
pModule=SWIG_GetModule(L);
- DEBUG2(" SWIG_GetModule() returns %p\n",pModule)
+ DEBUG2(" SWIG_GetModule() returns %p\n", (void *)pModule)
if(pModule==0) return;
pTypeInfo = SWIG_TypeQuery(L,"Foo *");
DEBUG2(" Type (Foo*) is %s\n",pTypeInfo==0?"unknown":"known");
- DEBUG3(" Module %p typeinfo(Foo*) %p\n",pModule,pTypeInfo);
+ DEBUG3(" Module %p typeinfo(Foo*) %p\n", (void *)pModule, (void *)pTypeInfo);
pTypeInfo2 = SWIG_TypeQuery(L,"Bar *");
DEBUG2(" Type (Bar*) is %s\n",pTypeInfo2==0?"unknown":"known");
- DEBUG3(" Module %p typeinfo(Bar*) %p\n",pModule,pTypeInfo2);
+ DEBUG3(" Module %p typeinfo(Bar*) %p\n", (void *)pModule, (void *)pTypeInfo2);
}
int main(int argc,char* argv[])
diff --git a/Examples/lua/embed2/embed2.c b/Examples/lua/embed2/embed2.c
index 7b2ca9b67..0ce9f8f7f 100644
--- a/Examples/lua/embed2/embed2.c
+++ b/Examples/lua/embed2/embed2.c
@@ -53,7 +53,7 @@ int call_add(lua_State *L,int a,int b,int* res) {
lua_getglobal(L, "add"); /* function to be called */
if (!lua_isfunction(L,-1)) {
printf("[C] error: cannot find function 'add'\n");
- lua_settop(L,top); // reset
+ lua_settop(L,top);
return 0;
}
lua_pushnumber(L,a);
@@ -61,18 +61,18 @@ int call_add(lua_State *L,int a,int b,int* res) {
if (lua_pcall(L, 2, 1, 0) != 0) /* call function with 2 arguments and 1 result */
{
printf("[C] error running function `add': %s\n",lua_tostring(L, -1));
- lua_settop(L,top); // reset
+ lua_settop(L,top);
return 0;
}
- // check results
+ /* check results */
if (!lua_isnumber(L,-1)) {
printf("[C] error: returned value is not a number\n");
- lua_settop(L,top); // reset
+ lua_settop(L,top);
return 0;
}
*res=(int)lua_tonumber(L,-1);
lua_settop(L,top); /* reset stack */
- return 1; // ok
+ return 1;
}
/* This is a variargs call function for calling from C into Lua.
diff --git a/Examples/lua/functest/example.i b/Examples/lua/functest/example.i
index 631e0602d..9bb64cbf5 100644
--- a/Examples/lua/functest/example.i
+++ b/Examples/lua/functest/example.i
@@ -1,13 +1,12 @@
/* File : example.i */
%module example
-%include "typemaps.i" // you must have this for the typemaps for ptrs
-// basic function testing
-//
+%include "typemaps.i"
+
%inline %{
-extern int add1(int x, int y); // return x+y -- basic function test
-extern void add2(int x, int *INPUT, int *OUTPUT); // *z = x+*y -- argin and argout test
-extern int add3(int x, int y, int *OUTPUT); // return x+y, *z=x-y -- returning 2 values
-extern void add4(int x, int *INOUT); // *y += x -- INOUT dual purpose variable
+extern int add1(int x, int y); /* return x+y -- basic function test */
+extern void add2(int x, int *INPUT, int *OUTPUT); /* *z = x+*y -- argin and argout test */
+extern int add3(int x, int y, int *OUTPUT); /* return x+y, *z=x-y -- returning 2 values */
+extern void add4(int x, int *INOUT); /* *y += x -- INOUT dual purpose variable */
%}
diff --git a/Examples/lua/owner/example.cxx b/Examples/lua/owner/example.cxx
index bce484aea..c2c073d79 100644
--- a/Examples/lua/owner/example.cxx
+++ b/Examples/lua/owner/example.cxx
@@ -39,12 +39,15 @@ Square* createSquare(double w)
return new Square(w);
}
-ShapeOwner::ShapeOwner() {printf(" ShapeOwner(%p)\n",this);}
+ShapeOwner::ShapeOwner() {
+ printf(" ShapeOwner(%p)\n", (void *)this);
+}
+
ShapeOwner::~ShapeOwner()
{
- printf(" ~ShapeOwner(%p)\n",this);
- for(unsigned i=0;ix : 0, ptptr ? ptptr->y : 0);
+ printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}
diff --git a/Examples/modula3/reference/example.cxx b/Examples/modula3/reference/example.cxx
index 649b0169c..9dbaed2ee 100644
--- a/Examples/modula3/reference/example.cxx
+++ b/Examples/modula3/reference/example.cxx
@@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::print() {
static char temp[512];
- sprintf(temp,"Vector %x (%g,%g,%g)", (int)this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
diff --git a/Examples/octave/extend/example.h b/Examples/octave/extend/example.h
index 9e15cf8e4..77a26ec95 100644
--- a/Examples/octave/extend/example.h
+++ b/Examples/octave/extend/example.h
@@ -14,7 +14,7 @@ public:
virtual std::string getTitle() { return getPosition() + " " + getName(); }
virtual std::string getName() { return name; }
virtual std::string getPosition() const { return "Employee"; }
- virtual ~Employee() { printf("~Employee() @ %p\n", this); }
+ virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); }
};
diff --git a/Examples/octave/reference/example.cxx b/Examples/octave/reference/example.cxx
index 9b72ca6a2..632a03a5b 100644
--- a/Examples/octave/reference/example.cxx
+++ b/Examples/octave/reference/example.cxx
@@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::print() {
static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
diff --git a/Examples/octave/variables/example.c b/Examples/octave/variables/example.c
index e2b72e0ea..a9102a9d5 100644
--- a/Examples/octave/variables/example.c
+++ b/Examples/octave/variables/example.c
@@ -52,9 +52,9 @@ void print_vars() {
printf("cvar = %c\n", cvar);
printf("strvar = %s\n", strvar ? strvar : "(null)");
printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", iptrvar);
+ printf("iptrvar = %p\n", (void *)iptrvar);
printf("name = %s\n", name);
- printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
+ printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}
diff --git a/Examples/perl5/extend/example.h b/Examples/perl5/extend/example.h
index b27ab9711..ca1aed28f 100644
--- a/Examples/perl5/extend/example.h
+++ b/Examples/perl5/extend/example.h
@@ -14,7 +14,7 @@ public:
virtual std::string getTitle() { return getPosition() + " " + getName(); }
virtual std::string getName() { return name; }
virtual std::string getPosition() const { return "Employee"; }
- virtual ~Employee() { printf("~Employee() @ %p\n", this); }
+ virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); }
};
diff --git a/Examples/perl5/reference/example.cxx b/Examples/perl5/reference/example.cxx
index 8a513bf49..9dbaed2ee 100644
--- a/Examples/perl5/reference/example.cxx
+++ b/Examples/perl5/reference/example.cxx
@@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::print() {
static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
diff --git a/Examples/perl5/value/example.i b/Examples/perl5/value/example.i
index 98fd60ed5..39663c6b8 100644
--- a/Examples/perl5/value/example.i
+++ b/Examples/perl5/value/example.i
@@ -26,7 +26,7 @@ Vector *new_Vector(double x, double y, double z) {
}
void vector_print(Vector *v) {
- printf("Vector %p = (%g, %g, %g)\n", v, v->x, v->y, v->z);
+ printf("Vector %p = (%g, %g, %g)\n", (void *)v, v->x, v->y, v->z);
}
%}
diff --git a/Examples/perl5/variables/example.c b/Examples/perl5/variables/example.c
index 05e17c8c5..85685fe72 100644
--- a/Examples/perl5/variables/example.c
+++ b/Examples/perl5/variables/example.c
@@ -52,9 +52,9 @@ void print_vars() {
printf("cvar = %c\n", cvar);
printf("strvar = %s\n", strvar ? strvar : "(null)");
printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", iptrvar);
+ printf("iptrvar = %p\n", (void *)iptrvar);
printf("name = %s\n", name);
- printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
+ printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}
diff --git a/Examples/php/extend/example.h b/Examples/php/extend/example.h
index b27ab9711..ca1aed28f 100644
--- a/Examples/php/extend/example.h
+++ b/Examples/php/extend/example.h
@@ -14,7 +14,7 @@ public:
virtual std::string getTitle() { return getPosition() + " " + getName(); }
virtual std::string getName() { return name; }
virtual std::string getPosition() const { return "Employee"; }
- virtual ~Employee() { printf("~Employee() @ %p\n", this); }
+ virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); }
};
diff --git a/Examples/php/reference/example.cxx b/Examples/php/reference/example.cxx
index 13e47eade..7ead7fbf6 100644
--- a/Examples/php/reference/example.cxx
+++ b/Examples/php/reference/example.cxx
@@ -19,23 +19,23 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::as_string() {
static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
VectorArray::VectorArray(int size) {
items = new Vector[size];
maxsize = size;
- printf("VectorArray new: self=%p\n",this);
+ printf("VectorArray new: self=%p\n", (void *)this);
}
VectorArray::~VectorArray() {
- printf("VectorArray delete: self=%p\n",this);
+ printf("VectorArray delete: self=%p\n", (void *)this);
delete [] items;
}
Vector &VectorArray::operator[](int index) {
- printf("VectorArray: read[%d] self=%p\n",index,this);
+ printf("VectorArray: read[%d] self=%p\n", index, (void *)this);
if ((index < 0) || (index >= maxsize)) {
printf("Panic! Array index out of bounds.\n");
exit(1);
@@ -44,6 +44,6 @@ Vector &VectorArray::operator[](int index) {
}
int VectorArray::size() {
- printf("VectorArray: size %d self=%p\n",maxsize,this);
+ printf("VectorArray: size %d self=%p\n", maxsize, (void *)this);
return maxsize;
}
diff --git a/Examples/php/reference/example.i b/Examples/php/reference/example.i
index d6122866b..a372439b1 100644
--- a/Examples/php/reference/example.i
+++ b/Examples/php/reference/example.i
@@ -37,7 +37,7 @@ public:
/* This wrapper provides an alternative to the [] operator */
%extend {
Vector &get(int index) {
- printf("VectorArray extended get: %p %d\n",$self,index);
+ printf("VectorArray extended get: %p %d\n", (void *)$self, index);
return (*$self)[index];
}
void set(int index, Vector &a) {
diff --git a/Examples/php/sync/example.cxx b/Examples/php/sync/example.cxx
index 31ed2021b..0942279b2 100644
--- a/Examples/php/sync/example.cxx
+++ b/Examples/php/sync/example.cxx
@@ -10,4 +10,4 @@ void Sync::printer(void) {
printf("The value of global x is %d\n", x);
printf("The value of class s is %s\n", s);
printf("The value of class x is %d\n", x);
-};
+}
diff --git a/Examples/php/value/example.i b/Examples/php/value/example.i
index 386fa3b84..20a453468 100644
--- a/Examples/php/value/example.i
+++ b/Examples/php/value/example.i
@@ -11,7 +11,7 @@
%inline %{
void vector_print(Vector *v) {
- printf("Vector %p = (%g, %g, %g)\n", v, v->x, v->y, v->z);
+ printf("Vector %p = (%g, %g, %g)\n", (void *)v, v->x, v->y, v->z);
}
%}
diff --git a/Examples/php/variables/example.c b/Examples/php/variables/example.c
index b21dee32d..d4c6d026d 100644
--- a/Examples/php/variables/example.c
+++ b/Examples/php/variables/example.c
@@ -52,9 +52,9 @@ void print_vars() {
printf("cvar = %c\n", cvar);
printf("strvar = %s\n", strvar ? strvar : "(null)");
printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", iptrvar);
+ printf("iptrvar = %p\n", (void *)iptrvar);
printf("name = %c%c%c%c%c\n", name[0],name[1],name[2],name[3],name[4]);
- printf("ptptr = %p %s\n", ptptr, Point_print( ptptr ) );
+ printf("ptptr = %p %s\n", (void *)ptptr, Point_print( ptptr ) );
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}
diff --git a/Examples/python/extend/example.h b/Examples/python/extend/example.h
index b27ab9711..ca1aed28f 100644
--- a/Examples/python/extend/example.h
+++ b/Examples/python/extend/example.h
@@ -14,7 +14,7 @@ public:
virtual std::string getTitle() { return getPosition() + " " + getName(); }
virtual std::string getName() { return name; }
virtual std::string getPosition() const { return "Employee"; }
- virtual ~Employee() { printf("~Employee() @ %p\n", this); }
+ virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); }
};
diff --git a/Examples/python/reference/example.cxx b/Examples/python/reference/example.cxx
index 8a513bf49..9dbaed2ee 100644
--- a/Examples/python/reference/example.cxx
+++ b/Examples/python/reference/example.cxx
@@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::print() {
static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
diff --git a/Examples/python/swigrun/example.cxx b/Examples/python/swigrun/example.cxx
index 25906a559..2d2471301 100644
--- a/Examples/python/swigrun/example.cxx
+++ b/Examples/python/swigrun/example.cxx
@@ -9,7 +9,7 @@ Manager* convert_to_Manager(PyObject *py_obj)
{
Manager* c_ptr;
swig_type_info *ty = SWIG_TypeQuery("Manager *");
- printf("manager ty %p \n", ty);
+ printf("manager ty %p \n", (void *)ty);
if (SWIG_ConvertPtr(py_obj, (void **) &c_ptr, ty, 0) == -1) {
c_ptr = 0;
} else {
diff --git a/Examples/python/swigrun/example.h b/Examples/python/swigrun/example.h
index 69e6fe4de..e89f7baaa 100644
--- a/Examples/python/swigrun/example.h
+++ b/Examples/python/swigrun/example.h
@@ -14,7 +14,7 @@ public:
virtual std::string getTitle() { return getPosition() + " " + getName(); }
virtual std::string getName() { return name; }
virtual std::string getPosition() const { return "Employee"; }
- virtual ~Employee() { printf("~Employee() @ %p\n", this); }
+ virtual ~Employee() { printf("~Employee() @ %p\n", (void *)this); }
};
diff --git a/Examples/python/variables/example.c b/Examples/python/variables/example.c
index 05e17c8c5..85685fe72 100644
--- a/Examples/python/variables/example.c
+++ b/Examples/python/variables/example.c
@@ -52,9 +52,9 @@ void print_vars() {
printf("cvar = %c\n", cvar);
printf("strvar = %s\n", strvar ? strvar : "(null)");
printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", iptrvar);
+ printf("iptrvar = %p\n", (void *)iptrvar);
printf("name = %s\n", name);
- printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
+ printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}
diff --git a/Examples/ruby/reference/example.cxx b/Examples/ruby/reference/example.cxx
index 8a513bf49..9dbaed2ee 100644
--- a/Examples/ruby/reference/example.cxx
+++ b/Examples/ruby/reference/example.cxx
@@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::print() {
static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
diff --git a/Examples/ruby/value/example.i b/Examples/ruby/value/example.i
index 98fd60ed5..39663c6b8 100644
--- a/Examples/ruby/value/example.i
+++ b/Examples/ruby/value/example.i
@@ -26,7 +26,7 @@ Vector *new_Vector(double x, double y, double z) {
}
void vector_print(Vector *v) {
- printf("Vector %p = (%g, %g, %g)\n", v, v->x, v->y, v->z);
+ printf("Vector %p = (%g, %g, %g)\n", (void *)v, v->x, v->y, v->z);
}
%}
diff --git a/Examples/ruby/variables/example.c b/Examples/ruby/variables/example.c
index 05e17c8c5..85685fe72 100644
--- a/Examples/ruby/variables/example.c
+++ b/Examples/ruby/variables/example.c
@@ -52,9 +52,9 @@ void print_vars() {
printf("cvar = %c\n", cvar);
printf("strvar = %s\n", strvar ? strvar : "(null)");
printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", iptrvar);
+ printf("iptrvar = %p\n", (void *)iptrvar);
printf("name = %s\n", name);
- printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
+ printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}
diff --git a/Examples/tcl/reference/example.cxx b/Examples/tcl/reference/example.cxx
index 8a513bf49..9dbaed2ee 100644
--- a/Examples/tcl/reference/example.cxx
+++ b/Examples/tcl/reference/example.cxx
@@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::print() {
static char temp[512];
- sprintf(temp,"Vector %p (%g,%g,%g)", this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
diff --git a/Examples/tcl/value/example.i b/Examples/tcl/value/example.i
index 98fd60ed5..39663c6b8 100644
--- a/Examples/tcl/value/example.i
+++ b/Examples/tcl/value/example.i
@@ -26,7 +26,7 @@ Vector *new_Vector(double x, double y, double z) {
}
void vector_print(Vector *v) {
- printf("Vector %p = (%g, %g, %g)\n", v, v->x, v->y, v->z);
+ printf("Vector %p = (%g, %g, %g)\n", (void *)v, v->x, v->y, v->z);
}
%}
diff --git a/Examples/tcl/variables/example.c b/Examples/tcl/variables/example.c
index 05e17c8c5..85685fe72 100644
--- a/Examples/tcl/variables/example.c
+++ b/Examples/tcl/variables/example.c
@@ -52,9 +52,9 @@ void print_vars() {
printf("cvar = %c\n", cvar);
printf("strvar = %s\n", strvar ? strvar : "(null)");
printf("cstrvar = %s\n", cstrvar);
- printf("iptrvar = %p\n", iptrvar);
+ printf("iptrvar = %p\n", (void *)iptrvar);
printf("name = %s\n", name);
- printf("ptptr = %p (%d, %d)\n", ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
+ printf("ptptr = %p (%d, %d)\n", (void *)ptptr, ptptr ? ptptr->x : 0, ptptr ? ptptr->y : 0);
printf("pt = (%d, %d)\n", pt.x, pt.y);
printf("status = %d\n", status);
}
From 3191473523de629d75181b134c75a83f7fd7297b Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Sat, 24 May 2014 00:14:18 +0100
Subject: [PATCH 070/152] Fix compiler warnings in generated code when using
-std=c++98 -std=gnu89 -pedantic -Wreturn-type
---
Lib/guile/guile_scm_run.swg | 3 +-
Lib/javascript/v8/javascriptinit.swg | 2 +-
Lib/lua/lua_fnptr.i | 1 -
Lib/lua/luarun.swg | 122 ++++++++++++++++-----------
Lib/lua/luaruntime.swg | 2 +-
Lib/lua/typemaps.i | 2 +-
Lib/php/const.i | 4 +-
Lib/php/utils.i | 2 +-
Lib/ruby/file.i | 2 +-
9 files changed, 80 insertions(+), 60 deletions(-)
diff --git a/Lib/guile/guile_scm_run.swg b/Lib/guile/guile_scm_run.swg
index 322d660c5..94cf4d101 100644
--- a/Lib/guile/guile_scm_run.swg
+++ b/Lib/guile/guile_scm_run.swg
@@ -27,8 +27,7 @@ scm_module_variable (SCM module, SCM sym)
#endif
#if SCM_MAJOR_VERSION >= 2
-// scm_c_define_gsubr takes a different parameter type
-// depending on the guile version
+/* scm_c_define_gsubr takes a different parameter type depending on the guile version */
typedef scm_t_subr swig_guile_proc;
#else
diff --git a/Lib/javascript/v8/javascriptinit.swg b/Lib/javascript/v8/javascriptinit.swg
index de1fe91f4..b428d4af9 100644
--- a/Lib/javascript/v8/javascriptinit.swg
+++ b/Lib/javascript/v8/javascriptinit.swg
@@ -113,6 +113,6 @@ void SWIGV8_INIT (v8::Handle exports, v8::Handle /*modul
}
#if defined(BUILDING_NODE_EXTENSION)
-NODE_MODULE($jsname, $jsname_initialize);
+NODE_MODULE($jsname, $jsname_initialize)
#endif
%}
diff --git a/Lib/lua/lua_fnptr.i b/Lib/lua/lua_fnptr.i
index 4e2c8dc6a..481cfafa6 100644
--- a/Lib/lua/lua_fnptr.i
+++ b/Lib/lua/lua_fnptr.i
@@ -103,7 +103,6 @@ void swiglua_ref_clear(SWIGLUA_REF* pref){
}
void swiglua_ref_set(SWIGLUA_REF* pref,lua_State* L,int idx){
-// swiglua_ref_clear(pref); /* just in case */
pref->L=L;
lua_pushvalue(L,idx); /* copy obj to top */
pref->ref=luaL_ref(L,LUA_REGISTRYINDEX); /* remove obj from top & put into registry */
diff --git a/Lib/lua/luarun.swg b/Lib/lua/luarun.swg
index 7cfcff212..1dd3b9f09 100644
--- a/Lib/lua/luarun.swg
+++ b/Lib/lua/luarun.swg
@@ -630,10 +630,12 @@ SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *
/* Register all classes in the namespace */
SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace *ns)
{
+ swig_lua_class **classes;
+
/* There must be a module/namespace table at the top of the stack */
assert(lua_istable(L,-1));
- swig_lua_class **classes = ns->ns_classes;
+ classes = ns->ns_classes;
if( classes != 0 ) {
while(*classes != 0) {
@@ -650,6 +652,7 @@ SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace
*/
SWIGINTERN void SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns, int reg)
{
+ swig_lua_namespace **sub_namespace;
/* 1 argument - table on the top of the stack */
const int SWIGUNUSED begin = lua_gettop(L);
assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table or parent namespace table */
@@ -681,7 +684,7 @@ SWIGINTERN void SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns
/* Register classes */
SWIG_Lua_add_namespace_classes(L,ns);
- swig_lua_namespace **sub_namespace = ns->ns_namespaces;
+ sub_namespace = ns->ns_namespaces;
if( sub_namespace != 0) {
while(*sub_namespace != 0) {
SWIG_Lua_namespace_register(L, *sub_namespace, 1);
@@ -753,22 +756,21 @@ SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED
/* first_arg - position of the object in stack. Everything that is above are arguments
* and is passed to every evocation of the func */
int last_arg = lua_gettop(L);/* position of last argument */
- int original_metatable;
+ int original_metatable = last_arg + 1;
size_t bases_count;
- int result;
+ int result = SWIG_ERROR;
lua_getmetatable(L,first_arg);
- original_metatable = last_arg + 1;
SWIG_LUA_INIT_BASE_SEARCH(bases_count);
- result = SWIG_ERROR;
if(ret)
*ret = 0;
if(bases_count>0)
{
+ int to_remove;
size_t i;
int j;
+ int subcall_last_arg;
int subcall_first_arg = lua_gettop(L) + 1;/* Here a copy of first_arg and arguments begin */
int valid = 1;
- int subcall_last_arg;
swig_type_info *base_swig_type = 0;
for(j=first_arg;j<=last_arg;j++)
lua_pushvalue(L,j);
@@ -792,7 +794,7 @@ SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED
lua_pushvalue(L,original_metatable);
lua_setmetatable(L,first_arg);
/* Clear - remove everything between last_arg and subcall_last_arg including */
- const int to_remove = subcall_last_arg - last_arg;
+ to_remove = subcall_last_arg - last_arg;
for(j=0;jtype;
+ int result;
+ swig_lua_userdata *usr;
+ swig_type_info *type;
int ret = 0;
- int result = SWIG_Lua_class_do_get(L,type,1,&ret);
+ assert(lua_isuserdata(L,1));
+ usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
+ type = usr->type;
+ result = SWIG_Lua_class_do_get(L,type,1,&ret);
if(result == SWIG_OK)
return ret;
@@ -902,6 +905,7 @@ SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int fi
(3) any for the new value
*/
+ int bases_search_result;
int substack_start = lua_gettop(L) - 3;
lua_checkstack(L,5);
assert(lua_isuserdata(L,substack_start+1)); /* just in case */
@@ -944,14 +948,12 @@ SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int fi
lua_pop(L,1); /* remove value */
lua_pop(L,1); /* remove metatable */
- {
- /* Search among bases */
- int bases_search_result = SWIG_Lua_iterate_bases(L,type,first_arg,SWIG_Lua_class_do_set,ret);
- if(ret)
- assert(*ret == 0);
- assert(lua_gettop(L) == substack_start + 3);
- return bases_search_result;
- }
+ /* Search among bases */
+ bases_search_result = SWIG_Lua_iterate_bases(L,type,first_arg,SWIG_Lua_class_do_set,ret);
+ if(ret)
+ assert(*ret == 0);
+ assert(lua_gettop(L) == substack_start + 3);
+ return bases_search_result;
}
/* This is the actual method exported to Lua. It calls SWIG_Lua_class_do_set and correctly
@@ -964,11 +966,14 @@ SWIGINTERN int SWIG_Lua_class_set(lua_State *L)
(2) string name of the attribute
(3) any for the new value
*/
- assert(lua_isuserdata(L,1));
- swig_lua_userdata *usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
- swig_type_info *type = usr->type;
int ret = 0;
- int result = SWIG_Lua_class_do_set(L,type,1,&ret);
+ int result;
+ swig_lua_userdata *usr;
+ swig_type_info *type;
+ assert(lua_isuserdata(L,1));
+ usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
+ type = usr->type;
+ result = SWIG_Lua_class_do_set(L,type,1,&ret);
if(result != SWIG_OK) {
SWIG_Lua_pushferrstring(L,"Assignment not possible. No setter/member with this name. For custom assignments implement __setitem method.");
lua_error(L);
@@ -1004,13 +1009,15 @@ SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L)
{
/* there should be 1 param passed in
(1) userdata (not the metatable) */
+ const char *className;
+ void* userData;
assert(lua_isuserdata(L,1)); /* just in case */
- void* userData = lua_touserdata(L,1); /* get the userdata address for later */
+ userData = lua_touserdata(L,1); /* get the userdata address for later */
lua_getmetatable(L,1); /* get the meta table */
assert(lua_istable(L,-1)); /* just in case */
lua_getfield(L, -1, ".type");
- const char *className = lua_tostring(L, -1);
+ className = lua_tostring(L, -1);
lua_pushfstring(L, "<%s userdata: %p>", className, userData);
return 1;
@@ -1238,10 +1245,10 @@ SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class
SWIGINTERN void SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_class *clss)
{
int i;
+ size_t bases_count = 0;
/* Add bases to .bases table */
SWIG_Lua_get_table(L,".bases");
assert(lua_istable(L,-1)); /* just in case */
- size_t bases_count = 0;
for(i=0;clss->bases[i];i++)
{
SWIG_Lua_get_class_metatable(L,clss->bases[i]->fqname);
@@ -1296,7 +1303,7 @@ SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration
/* The real function that resolves a metamethod.
* Function searches given class and all it's bases(recursively) for first instance of something that is
- * not equal to SWIG_Lua_resolve_metatmethod. (Almost always this 'something' is actuall metamethod implementation
+ * not equal to SWIG_Lua_resolve_metatmethod. (Almost always this 'something' is actual metamethod implementation
* and it is a SWIG-generated C function.). It returns value on the top of the L and there is no garbage below the
* answer.
* Returns 1 if found, 0 otherwise.
@@ -1310,6 +1317,9 @@ SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class
int skip_check)
{
/* This function is called recursively */
+ int result = 0;
+ int i = 0;
+
if (!skip_check) {
SWIG_Lua_get_class_metatable(L, clss->fqname);
lua_pushvalue(L, metamethod_name_idx);
@@ -1326,8 +1336,6 @@ SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class
}
/* Forwarding calls to bases */
- int result = 0;
- int i = 0;
for(i=0;clss->bases[i];i++)
{
result = SWIG_Lua_do_resolve_metamethod(L, clss->bases[i], metamethod_name_idx, 0);
@@ -1342,21 +1350,26 @@ SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class
* and calls it */
SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L)
{
+ int numargs;
+ int metamethod_name_idx;
+ const swig_lua_class* clss;
+ int result;
+
lua_checkstack(L,5);
- const int numargs = lua_gettop(L); /* number of arguments to pass to actuall metamethod */
+ numargs = lua_gettop(L); /* number of arguments to pass to actual metamethod */
/* Get upvalues from closure */
lua_pushvalue(L, lua_upvalueindex(1)); /*Get function name*/
- const int metamethod_name_idx = lua_gettop(L);
+ metamethod_name_idx = lua_gettop(L);
lua_pushvalue(L, lua_upvalueindex(2));
- const swig_lua_class* clss = (const swig_lua_class*)(lua_touserdata(L,-1));
+ clss = (const swig_lua_class*)(lua_touserdata(L,-1));
lua_pop(L,1); /* remove lightuserdata with clss from stack */
- /* Actuall work */
- const int result = SWIG_Lua_do_resolve_metamethod(L, clss, metamethod_name_idx, 1);
+ /* Actual work */
+ result = SWIG_Lua_do_resolve_metamethod(L, clss, metamethod_name_idx, 1);
if (!result) {
- SWIG_Lua_pushferrstring(L,"The metamethod proxy is set, but it failed to find actuall metamethod. Memory corruption is most likely explanation.");
+ SWIG_Lua_pushferrstring(L,"The metamethod proxy is set, but it failed to find actual metamethod. Memory corruption is most likely explanation.");
lua_error(L);
return 0;
}
@@ -1374,10 +1387,14 @@ SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L)
*/
SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
{
+ int key_index;
+ int success = 0;
+ int i = 0;
+
/* metamethod name - on the top of the stack */
assert(lua_isstring(L,-1));
- const int key_index = lua_gettop(L);
+ key_index = lua_gettop(L);
/* Check whether method is already defined in metatable */
lua_pushvalue(L,key_index); /* copy of the key */
@@ -1389,8 +1406,6 @@ SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *
lua_pop(L,1);
/* Iterating over immediate bases */
- int success = 0;
- int i = 0;
for(i=0;clss->bases[i];i++)
{
const swig_lua_class *base = clss->bases[i];
@@ -1420,11 +1435,15 @@ SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *
SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss)
{
+ int metatable_index;
+ int metamethods_info_index;
+ int tostring_undefined;
+
SWIG_Lua_get_class_metatable(L, clss->fqname);
- const int metatable_index = lua_gettop(L);
+ metatable_index = lua_gettop(L);
SWIG_Lua_get_inheritable_metamethods(L);
assert(lua_istable(L,-1));
- const int metamethods_info_index = lua_gettop(L);
+ metamethods_info_index = lua_gettop(L);
lua_pushnil(L); /* first key */
while(lua_next(L, metamethods_info_index) != 0 ) {
/* key at index -2, value at index -1 */
@@ -1442,7 +1461,7 @@ SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class
lua_pushstring(L, "__tostring");
lua_pushvalue(L,-1);
lua_rawget(L,metatable_index);
- const int tostring_undefined = lua_isnil(L,-1);
+ tostring_undefined = lua_isnil(L,-1);
lua_pop(L,1);
if( tostring_undefined ) {
lua_pushcfunction(L, SWIG_Lua_class_tostring);
@@ -1494,6 +1513,7 @@ SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *cls
*/
SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L,swig_lua_class *clss)
{
+ int new_metatable_index;
const int SWIGUNUSED begin = lua_gettop(L);
int i;
/* if name already there (class is already registered) then do nothing */
@@ -1520,11 +1540,12 @@ SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L,swig_lua_class *c
* It would get us all special methods: __getitem, __add etc.
* This would set .fn, .type, and other .xxx incorrectly, but we will overwrite it right away
*/
- const int new_metatable_index = lua_absindex(L,-1);
+ new_metatable_index = lua_absindex(L,-1);
for(i=0;clss->bases[i];i++)
{
+ int base_metatable;
SWIG_Lua_get_class_metatable(L,clss->bases[i]->fqname);
- const int base_metatable = lua_absindex(L,-1);
+ base_metatable = lua_absindex(L,-1);
SWIG_Lua_merge_tables_by_index(L,new_metatable_index, base_metatable);
lua_pop(L,1);
}
@@ -1573,6 +1594,7 @@ SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L,swig_lua_class *c
SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss)
{
+ int SWIGUNUSED begin;
assert(lua_istable(L,-1)); /* This is a table (module or namespace) where classes will be added */
SWIG_Lua_class_register_instance(L,clss);
SWIG_Lua_class_register_static(L,clss);
@@ -1587,7 +1609,7 @@ SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss)
* | ".set" --> ....
* |=============================== ".instance"
*/
- const int SWIGUNUSED begin = lua_gettop(L);
+ begin = lua_gettop(L);
lua_pushstring(L,clss->cls_static->name);
lua_rawget(L,-2); /* get class static table */
assert(lua_istable(L,-1));
diff --git a/Lib/lua/luaruntime.swg b/Lib/lua/luaruntime.swg
index 26dab93f6..89908044b 100644
--- a/Lib/lua/luaruntime.swg
+++ b/Lib/lua/luaruntime.swg
@@ -29,6 +29,7 @@ SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
{
#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
int i;
+ int globalRegister = 0;
/* start with global table */
lua_pushglobaltable (L);
/* SWIG's internal initialisation */
@@ -49,7 +50,6 @@ SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
}
}
- int globalRegister = 0;
#ifdef SWIG_LUA_MODULE_GLOBAL
globalRegister = 1;
#endif
diff --git a/Lib/lua/typemaps.i b/Lib/lua/typemaps.i
index 7a095a1e0..c662cd31e 100644
--- a/Lib/lua/typemaps.i
+++ b/Lib/lua/typemaps.i
@@ -296,7 +296,7 @@ This is one giant macro to define the typemaps & the helpers
for array handling
*/
%define SWIG_TYPEMAP_NUM_ARR(NAME,TYPE)
-%{SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE);%}
+%{SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)%}
// fixed size array's
%typemap(in) TYPE INPUT[ANY]
diff --git a/Lib/php/const.i b/Lib/php/const.i
index 82c48022b..329b0cf07 100644
--- a/Lib/php/const.i
+++ b/Lib/php/const.i
@@ -34,12 +34,12 @@
SWIGTYPE &&,
SWIGTYPE [] {
zval *z_var;
+ zend_constant c;
+ size_t len = sizeof("$symname") - 1;
MAKE_STD_ZVAL(z_var);
SWIG_SetPointerZval(z_var, (void*)$value, $1_descriptor, 0);
- zend_constant c;
c.value = *z_var;
zval_copy_ctor(&c.value);
- size_t len = sizeof("$symname") - 1;
c.name = zend_strndup("$symname", len);
c.name_len = len+1;
c.flags = CONST_CS | CONST_PERSISTENT;
diff --git a/Lib/php/utils.i b/Lib/php/utils.i
index 4e53e25a7..408a3b366 100644
--- a/Lib/php/utils.i
+++ b/Lib/php/utils.i
@@ -92,6 +92,7 @@
%fragment("t_output_helper","header") %{
static void
t_output_helper(zval **target, zval *o TSRMLS_DC) {
+ zval *tmp;
if ( (*target)->type == IS_ARRAY ) {
/* it's already an array, just append */
add_next_index_zval( *target, o );
@@ -102,7 +103,6 @@ t_output_helper(zval **target, zval *o TSRMLS_DC) {
FREE_ZVAL(o);
return;
}
- zval *tmp;
ALLOC_INIT_ZVAL(tmp);
*tmp = **target;
zval_copy_ctor(tmp);
diff --git a/Lib/ruby/file.i b/Lib/ruby/file.i
index d64937ed1..f9aaa2754 100644
--- a/Lib/ruby/file.i
+++ b/Lib/ruby/file.i
@@ -4,7 +4,7 @@
extern "C" {
#endif
-// Ruby 1.9 changed the file name of this header
+/* Ruby 1.9 changed the file name of this header */
#ifdef HAVE_RUBY_IO_H
#include "ruby/io.h"
#else
From c2368a40b244e3454a0300e5c671ebe6e98048ab Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Sat, 24 May 2014 09:30:37 +0100
Subject: [PATCH 071/152] Javascript warnings for c++98 - remove vla
---
Lib/javascript/jsc/javascriptstrings.swg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/javascript/jsc/javascriptstrings.swg b/Lib/javascript/jsc/javascriptstrings.swg
index 10a0e252a..b3f46ae41 100644
--- a/Lib/javascript/jsc/javascriptstrings.swg
+++ b/Lib/javascript/jsc/javascriptstrings.swg
@@ -53,7 +53,7 @@ SWIG_JSC_FromCharPtrAndSize(JSContextRef context, const char* carray, size_t siz
} else {
JSStringRef jsstring;
if(size < 2) {
- char c[size+1];
+ char c[2];
int i;
for(i=0;i
Date: Sat, 24 May 2014 10:12:06 +0100
Subject: [PATCH 072/152] Refactor Lua class base search to make ISO c/c++
compliant
---
Lib/lua/luarun.swg | 85 +++++++++++++++++++++++-----------------------
1 file changed, 43 insertions(+), 42 deletions(-)
diff --git a/Lib/lua/luarun.swg b/Lib/lua/luarun.swg
index 1dd3b9f09..6f2068e7a 100644
--- a/Lib/lua/luarun.swg
+++ b/Lib/lua/luarun.swg
@@ -708,46 +708,6 @@ SWIGINTERN void SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns
SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname);
-/* Macros for iteration among class bases */
-#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
-#define SWIG_LUA_INIT_BASE_SEARCH(bases_count)\
- (void)swig_type;\
- SWIG_Lua_get_table(L,".bases");\
- assert(lua_istable(L,-1));\
- bases_count = lua_rawlen(L,-1);\
- const int bases_table = lua_gettop(L);
-#define SWIG_LUA_GET_BASE_METATABLE(i,base_swig_type, valid)\
- lua_rawgeti(L,bases_table,i+1);\
- base_swig_type = 0;\
- if(lua_isnil(L,-1)) {\
- valid = 0;\
- lua_pop(L,1);\
- } else\
- valid = 1;
-
-#else /* In elua .bases table doesn't exist. Use table from swig_lua_class */
-
-#define SWIG_LUA_INIT_BASE_SEARCH(bases_count)\
- assert(swig_type!=0);\
- swig_module_info *module=SWIG_GetModule(L);\
- swig_lua_class **bases= ((swig_lua_class*)(swig_type->clientdata))->bases;\
- const char **base_names= ((swig_lua_class*)(swig_type->clientdata))->base_names;\
- bases_count = 0;\
- for(;base_names[bases_count];bases_count++);/* get length of bases */
-
-#define SWIG_LUA_GET_BASE_METATABLE(i,base_swig_type, valid)\
- swig_lua_class *base_class = bases[i];\
- if(!base_class)\
- valid = 0;\
- else {\
- valid = 1;\
- SWIG_Lua_get_class_metatable(L,base_class->fqname);\
- base_swig_type = SWIG_TypeQueryModule(module,module,base_names[i]);\
- assert(base_swig_type != 0);\
- }
-
-#endif
-
typedef int (*swig_lua_base_iterator_func)(lua_State*,swig_type_info*, int, int *ret);
SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED swig_type,
@@ -759,8 +719,28 @@ SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED
int original_metatable = last_arg + 1;
size_t bases_count;
int result = SWIG_ERROR;
+ int bases_table;
+ (void)swig_type;
lua_getmetatable(L,first_arg);
- SWIG_LUA_INIT_BASE_SEARCH(bases_count);
+
+ /* initialise base search */
+#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
+ SWIG_Lua_get_table(L,".bases");
+ assert(lua_istable(L,-1));
+ bases_count = lua_rawlen(L,-1);
+ bases_table = lua_gettop(L);
+#else
+ /* In elua .bases table doesn't exist. Use table from swig_lua_class */
+ (void)bases_table;
+ assert(swig_type!=0);
+ swig_module_info *module=SWIG_GetModule(L);
+ swig_lua_class **bases= ((swig_lua_class*)(swig_type->clientdata))->bases;
+ const char **base_names= ((swig_lua_class*)(swig_type->clientdata))->base_names;
+ bases_count = 0;
+ for(;base_names[bases_count];
+ bases_count++);/* get length of bases */
+#endif
+
if(ret)
*ret = 0;
if(bases_count>0)
@@ -778,7 +758,28 @@ SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info * SWIGUNUSED
/* Trick: temporarily replacing original metatable with metatable for base class and call getter */
for(i=0;ifqname);
+ base_swig_type = SWIG_TypeQueryModule(module,module,base_names[i]);
+ assert(base_swig_type != 0);
+ }
+#endif
+
if(!valid)
continue;
assert(lua_isuserdata(L, subcall_first_arg));
From ab86f8a8f51a877615f173c37cd9da34f8bd5905 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Sat, 24 May 2014 10:29:34 +0100
Subject: [PATCH 073/152] Warning fixes in test-suite
---
.../test-suite/smart_pointer_templatemethods.i | 2 +-
Examples/test-suite/struct_initialization.i | 2 +-
Examples/test-suite/typemap_array_qualifiers.i | 14 +++++++-------
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Examples/test-suite/smart_pointer_templatemethods.i b/Examples/test-suite/smart_pointer_templatemethods.i
index f79bbcc9d..bd8808aff 100644
--- a/Examples/test-suite/smart_pointer_templatemethods.i
+++ b/Examples/test-suite/smart_pointer_templatemethods.i
@@ -45,7 +45,7 @@ public:
%template(QueryInterfaceObjct) Objct::QueryInterface;
#endif
-}; // namespace
+} // namespace
%}
diff --git a/Examples/test-suite/struct_initialization.i b/Examples/test-suite/struct_initialization.i
index c378ba31d..da1604f1b 100644
--- a/Examples/test-suite/struct_initialization.i
+++ b/Examples/test-suite/struct_initialization.i
@@ -3,7 +3,7 @@
%inline %{
-// Named types
+/* Named types */
struct StructA {
int x;
} instanceA1;
diff --git a/Examples/test-suite/typemap_array_qualifiers.i b/Examples/test-suite/typemap_array_qualifiers.i
index 14df649d3..cbc6c95ff 100644
--- a/Examples/test-suite/typemap_array_qualifiers.i
+++ b/Examples/test-suite/typemap_array_qualifiers.i
@@ -43,8 +43,8 @@ $1 = 0;
/* Correct typemap for $symname: $type */
}
%inline %{
- void func1a(myarray x) {};
- void func1b(volatile myarray x) {};
+ void func1a(myarray x) {}
+ void func1b(volatile myarray x) {}
%}
CLEAR_SWIGTYPE_TYPEMAPS;
@@ -57,9 +57,9 @@ $1 = 0;
/* Correct typemap for $symname: $type */
}
%inline %{
- void func2a(const myarray x) {};
- void func2b(const myconstarray x) {};
- void func2c(const volatile myconstarray x) {};
+ void func2a(const myarray x) {}
+ void func2b(const myconstarray x) {}
+ void func2c(const volatile myconstarray x) {}
%}
CLEAR_SWIGTYPE_TYPEMAPS;
@@ -72,7 +72,7 @@ $1 = 0;
/* Correct typemap for $symname: $type */
}
%inline %{
- void func3a(const mycrazyarray x, const mycrazyarray y[7]) {};
+ void func3a(const mycrazyarray x, const mycrazyarray y[7]) {}
%}
CLEAR_SWIGTYPE_TYPEMAPS;
@@ -81,5 +81,5 @@ $1 = 0;
/* Correct typemap for $symname: $type */
}
%inline %{
- void func4a(mycrazyfunc *const x, const mycrazyfuncptr y) {};
+ void func4a(mycrazyfunc *const x, const mycrazyfuncptr y) {}
%}
From 5990872cf741fa31523e2b72ee66fdc8d27da442 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Sat, 24 May 2014 00:12:00 +0100
Subject: [PATCH 074/152] Travis testing - examples use stricter CFLAGS and
CXXFLAGS
---
.travis.yml | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 96e4fc9a7..5859c946f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -67,6 +67,35 @@ before_install:
- if test "$SWIGLANG" = "python" -a "$PY3" -a -z "$VER"; then sudo apt-get install -qq python3-dev; fi
- if test "$SWIGLANG" = "python" -a "$VER"; then sudo add-apt-repository -y ppa:fkrull/deadsnakes && sudo apt-get -qq update && sudo apt-get -qq install python${VER}-dev && export CONFIGOPTS="--with-python${PY3}=python${VER}"; fi
- if test "$SWIGLANG" = "tcl"; then sudo apt-get -qq install tcl8.4-dev; fi
+ # Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic.
+ - declare -A CFLAGS_EXAMPLES && CFLAGS_EXAMPLES=(
+ ["csharp"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ ["go"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ ["guile"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ ["java"]="-Werror -std=gnu89 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["javascript"]="-Werror -std=gnu89 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["lua"]="-Werror -std=gnu89 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["octave"]="-Werror -std=gnu89 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["perl5"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ ["php"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ ["python"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ ["ruby"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ ["tcl"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ )
+ - declare -A CXXFLAGS_EXAMPLES && CXXFLAGS_EXAMPLES=(
+ ["csharp"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["go"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["guile"]="-Werror -std=c++98 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ ["java"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["javascript"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["lua"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["octave"]="-Werror -std=c++98 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ ["perl5"]="-Werror -std=c++98 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ ["php"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["python"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["ruby"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
+ ["tcl"]="-Werror -std=c++98 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
+ )
- $CC --version
- $CXX --version
script:
@@ -81,7 +110,7 @@ script:
- if test -z "$SWIGLANG"; then sudo make -s install && swig -version && ccache-swig -V; fi
- echo -en 'travis_fold:end:script.2\\r'
- if test -n "$SWIGLANG"; then make -s check-$SWIGLANG-version; fi
- - if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-examples; fi
+ - if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-examples CFLAGS="${CFLAGS_EXAMPLES[$SWIGLANG]}" CXXFLAGS="${CXXFLAGS_EXAMPLES[$SWIGLANG]}"; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-test-suite; fi
- echo 'Cleaning...' && echo -en 'travis_fold:start:script.3\\r'
- make maintainer-clean && ../../configure $CONFIGOPTS
From 20ddfb7fcded992bd0e98b9ef8797104fe0900fd Mon Sep 17 00:00:00 2001
From: Harvey Falcic
Date: Sat, 24 May 2014 13:22:41 -0400
Subject: [PATCH 075/152] Python 3 'surrogateescape' docs: fix div class for
Python code
---
Doc/Manual/Python.html | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Doc/Manual/Python.html b/Doc/Manual/Python.html
index 45725065d..6dc0ff9ba 100644
--- a/Doc/Manual/Python.html
+++ b/Doc/Manual/Python.html
@@ -5962,8 +5962,8 @@ When this method is called from Python 3, the return value is the following
text string: