From cd853fccfb8f0060a213ad7148537dd1f879ba84 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Tue, 23 Nov 2010 01:01:51 -0800 Subject: [PATCH] test.do would run all its subtasks even though it used 'redo-ifchange'. The behaviour is what we wanted, but it shouldn't have worked. So fix the bug in redo-ifchange, then change test.do to use 'redo' instead so it continues to do what we want, only for the right reason. (The bug is that 'redo-ifchange dirname', which runs dirname/all.do, didn't result in stamps getting checked correctly.) --- redo-ifchange.py | 2 ++ test.do | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/redo-ifchange.py b/redo-ifchange.py index 15d418e..542ce24 100755 --- a/redo-ifchange.py +++ b/redo-ifchange.py @@ -5,6 +5,8 @@ from helpers import debug, err, mkdirp, unlink def dirty_deps(t, depth): + if os.path.exists('%s/.' % t): + t = '%s/all' % t debug('%s?%s\n' % (depth, t)) if state.isbuilt(t): debug('%s-- DIRTY (built)\n' % depth) diff --git a/test.do b/test.do index cdb6580..b5b0d6b 100644 --- a/test.do +++ b/test.do @@ -1,2 +1,2 @@ -redo-ifchange t/c.c t/test - +redo-ifchange t/c.c +redo t/test