summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2007-04-12 08:35:19 -0700
committerNathan Binkert <binkertn@umich.edu>2007-04-12 08:35:19 -0700
commitfa2a93a236f42d5b70061f3f8b2b65457eb5f836 (patch)
treeee1a8036fc27ce40a1fd8111684ae8e3f8e8611f /src
parent6ec510385dd23f339f86f3ace4339c791affba89 (diff)
downloadgem5-fa2a93a236f42d5b70061f3f8b2b65457eb5f836.tar.xz
Add a scons hack to force symlinks to the swig .i files
to be created --HG-- extra : convert_revision : 826cc692614528f987c80c3410cb025190f0a4e0
Diffstat (limited to 'src')
-rw-r--r--src/python/SConscript7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/python/SConscript b/src/python/SConscript
index 6662c8a45..fc0b12f85 100644
--- a/src/python/SConscript
+++ b/src/python/SConscript
@@ -101,8 +101,11 @@ pyzip_files.append(join(env['ROOT'], 'src/base/traceflags.py'))
swig_modules = []
def swig_it(module):
- env.Command(['swig/%s_wrap.cc' % module, 'm5/internal/%s.py' % module],
- 'swig/%s.i' % module,
+ cc_file = 'swig/%s_wrap.cc' % module
+ py_file = 'm5/internal/%s.py' % module
+ source = File('swig/%s.i' % module)
+ source.rfile() # Hack to cause the symlink to the .i file to be created
+ env.Command([cc_file, py_file], source,
'$SWIG $SWIGFLAGS -outdir ${TARGETS[1].dir} '
'-o ${TARGETS[0]} $SOURCES')
swig_modules.append(module)