diff options
author | Andreas Sandberg <Andreas.Sandberg@arm.com> | 2012-09-25 11:49:40 -0500 |
---|---|---|
committer | Andreas Sandberg <Andreas.Sandberg@arm.com> | 2012-09-25 11:49:40 -0500 |
commit | 1b29352dd554668fdd14460350094ee7c65bb626 (patch) | |
tree | 0c24cbd530f62bf1a73e4150a693bce3559a6775 | |
parent | 4f8ad7aa05ac063597707bb01b73dca42102d153 (diff) | |
download | gem5-1b29352dd554668fdd14460350094ee7c65bb626.tar.xz |
build: Add missing dependencies when building param SWIG interfaces
This patch adds an explicit dependency between param_%s.i and the
Python source file defining the object. Previously, the build system
didn't rebuild SWIG interfaces correctly when an object's Python
sources were updated.
-rwxr-xr-x | src/SConscript | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/SConscript b/src/SConscript index 8c407f4c7..69a452ac6 100755 --- a/src/SConscript +++ b/src/SConscript @@ -634,11 +634,14 @@ for name,enum in sorted(all_enums.iteritems()): SwigSource('m5.internal', i_file) # Generate SimObject SWIG wrapper files -for name in sim_objects.iterkeys(): +for name,simobj in sim_objects.iteritems(): + py_source = PySource.modules[simobj.__module__] + extra_deps = [ py_source.tnode ] + i_file = File('python/m5/internal/param_%s.i' % name) env.Command(i_file, Value(name), MakeAction(createSimObjectSwigWrapper, Transform("SO SWIG"))) - env.Depends(i_file, depends) + env.Depends(i_file, depends + extra_deps) SwigSource('m5.internal', i_file) # Generate the main swig init file |