summaryrefslogtreecommitdiff
path: root/engine/SCons/Tool/swig.py
diff options
context:
space:
mode:
Diffstat (limited to 'engine/SCons/Tool/swig.py')
-rw-r--r--engine/SCons/Tool/swig.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/engine/SCons/Tool/swig.py b/engine/SCons/Tool/swig.py
index 414d0cb..83cd315 100644
--- a/engine/SCons/Tool/swig.py
+++ b/engine/SCons/Tool/swig.py
@@ -31,7 +31,7 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/swig.py rel_2.3.5:3347:d31d5a4e74b6 2015/07/31 14:36:10 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/swig.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
import os.path
import re
@@ -42,6 +42,7 @@ import SCons.Defaults
import SCons.Scanner
import SCons.Tool
import SCons.Util
+import SCons.Node
SwigAction = SCons.Action.Action('$SWIGCOM', '$SWIGCOMSTR')
@@ -117,9 +118,13 @@ def _swigEmitter(target, source, env):
if outdir:
java_files = [os.path.join(outdir, j) for j in java_files]
java_files = list(map(env.fs.File, java_files))
+ def t_from_s(t, p, s, x):
+ return t.dir
+ tsm = SCons.Node._target_from_source_map
+ tkey = len(tsm)
+ tsm[tkey] = t_from_s
for jf in java_files:
- t_from_s = lambda t, p, s, x: t.dir
- SCons.Util.AddMethod(jf, t_from_s, 'target_from_source')
+ jf._func_target_from_source = tkey
target.extend(java_files)
return (target, source)