From fa2a93a236f42d5b70061f3f8b2b65457eb5f836 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Thu, 12 Apr 2007 08:35:19 -0700 Subject: [PATCH] Add a scons hack to force symlinks to the swig .i files to be created --HG-- extra : convert_revision : 826cc692614528f987c80c3410cb025190f0a4e0 --- src/python/SConscript | 7 +++++-- 1 file 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)