[Scons-users] Treating all files as out of date
Remko Tronçon
remko at el-tramo.be
Tue Jul 9 16:58:56 EDT 2013
On 9 July 2013 20:44, Remko Tronçon <remko at el-tramo.be> wrote:
> Is there another way of achieving what I want?
FYI, what I currently have is a patch that adds a make-compatible '-B'
option to always build files.
However, I don't like keeping a patched SCons, and I don't know if
there's interest in having this change upstream, so I'll be glad to
hear of a better way.
thanks!
Remko
diff --git a/scons-local-2.0.0.final.0/SCons/Script/Main.py
b/scons-local-2.0.0.final.0/SCons/Script/Main.py
index 2bd1560..c3f0749 100644
--- a/scons-local-2.0.0.final.0/SCons/Script/Main.py
+++ b/scons-local-2.0.0.final.0/SCons/Script/Main.py
@@ -167,7 +167,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask):
return SCons.Taskmaster.OutOfDateTask.prepare(self)
def needs_execute(self):
- if SCons.Taskmaster.OutOfDateTask.needs_execute(self):
+ if self.options.always_make or
SCons.Taskmaster.OutOfDateTask.needs_execute(self):
return True
if self.top and self.targets[0].has_builder():
display("scons: `%s' is up to date." % str(self.node))
diff --git a/scons-local-2.0.0.final.0/SCons/Script/SConsOptions.py
b/scons-local-2.0.0.final.0/SCons/Script/SConsOptions.py
index 913a6ee..0324ac0 100644
--- a/scons-local-2.0.0.final.0/SCons/Script/SConsOptions.py
+++ b/scons-local-2.0.0.final.0/SCons/Script/SConsOptions.py
@@ -720,6 +720,11 @@ def Parser(version):
action="store_true",
help="Keep going when a target can't be made.")
+ op.add_option('-B', '--always-make',
+ dest='always_make', default=False,
+ action="store_true",
+ help="Unconditionally build all targets.")
+
op.add_option('--max-drift',
nargs=1, type="int",
dest='max_drift', default=SCons.Node.FS.default_max_drift,
More information about the Scons-users
mailing list