diff options
author | Nathan Binkert <binkertn@umich.edu> | 2006-12-21 15:58:38 -0800 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2006-12-21 15:58:38 -0800 |
commit | 3f03e5f65658d78406ac545c041faa602b837dac (patch) | |
tree | 54430586b5ea62a5b4937d0af8c157c90cfcf4f3 /src/python | |
parent | 2cb2b508020bfcdaccbf7225f621bcdfd330c7bd (diff) | |
download | gem5-3f03e5f65658d78406ac545c041faa602b837dac.tar.xz |
Create a wrapper function to more easily add swig stuff to the build
--HG--
extra : convert_revision : 3aaf540a9e314a88a8945579398f0d79aa85d5cf
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/SConscript | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/python/SConscript b/src/python/SConscript index be6248bab..1e49a18b2 100644 --- a/src/python/SConscript +++ b/src/python/SConscript @@ -98,18 +98,15 @@ 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') # Action function to build the zip archive. Uses the PyZipFile module # included in the standard Python library. |