write config after the build of each module
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Sun, 03 Apr 2011 14:36:20 +0200
changeset 27 df78ebec3911
parent 26 145c7648d34c
child 28 2fa4b5e6097f
write config after the build of each module
bake/Bake.py
--- a/bake/Bake.py	Sun Apr 03 14:23:36 2011 +0200
+++ b/bake/Bake.py	Sun Apr 03 14:36:20 2011 +0200
@@ -133,7 +133,6 @@
             else:
                 print 'Error: invalid variable specification: ' + variable
                 sys.exit(1)
-        configuration.write()
 
     def _iterate(self, configuration, functor, targets):
         deps = Dependencies()
@@ -141,7 +140,9 @@
             def __init__(self, module):
                 self._module = module
             def function(self):
-                return functor(self._module)
+                retval = functor(self._module)
+                configuration.write()
+                return retval
         for m in configuration.modules():
             wrapper = Wrapper(m)
             deps.add_dst(m, wrapper.function)