summaryrefslogtreecommitdiff
path: root/src/python/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/SConscript')
-rw-r--r--src/python/SConscript22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/python/SConscript b/src/python/SConscript
index be6248bab..df1464809 100644
--- a/src/python/SConscript
+++ b/src/python/SConscript
@@ -98,18 +98,16 @@ pyzip_files.append('m5/defines.py')
pyzip_files.append('m5/info.py')
pyzip_files.append(join(env['ROOT'], 'util/pbs/jobfile.py'))
-env.Command(['swig/debug_wrap.cc', 'm5/internal/debug.py'],
- 'swig/debug.i',
- '$SWIG $SWIGFLAGS -outdir ${TARGETS[1].dir} '
- '-o ${TARGETS[0]} $SOURCES')
-
-env.Command(['swig/main_wrap.cc', 'm5/internal/main.py'],
- 'swig/main.i',
- '$SWIG $SWIGFLAGS -outdir ${TARGETS[1].dir} '
- '-o ${TARGETS[0]} $SOURCES')
-
-pyzip_dep_files.append('m5/internal/debug.py')
-pyzip_dep_files.append('m5/internal/main.py')
+def swig_it(basename):
+ env.Command(['swig/%s_wrap.cc' % basename, 'm5/internal/%s.py' % basename],
+ 'swig/%s.i' % basename,
+ '$SWIG $SWIGFLAGS -outdir ${TARGETS[1].dir} '
+ '-o ${TARGETS[0]} $SOURCES')
+ pyzip_dep_files.append('m5/internal/%s.py' % basename)
+
+swig_it('main')
+swig_it('debug')
+swig_it('event')
# Action function to build the zip archive. Uses the PyZipFile module
# included in the standard Python library.