From 3c2fc49c631a6891ccabc61cb02280cf200497ce Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Fri, 12 Nov 2010 22:15:34 -0800 Subject: [PATCH] Complicate the test build a bit to show unnecessary dependency re-checking. './redo -d test' reveals that we check and re-check things like CC and LD even when they're children of objects that don't need to be rebuilt, and who we've already checked earlier in the build cycle. We need to be a little smarter about pruning if we want dependency checking to be fast. --- TODO | 8 ++++++-- clean.do | 2 +- t/bellow.do | 2 ++ t/it.do | 3 ++- t/yellow.do | 2 ++ t/yellow.o.do | 2 ++ 6 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 t/bellow.do create mode 100644 t/yellow.do create mode 100644 t/yellow.o.do diff --git a/TODO b/TODO index 8ea1c92..d707d90 100644 --- a/TODO +++ b/TODO @@ -3,7 +3,11 @@ jwack jobserver make compatibility sockety interface - sqlite .redo database + sqlite .redo database? rename --ifchange/--ifcreate to separate programs rewrite ifchange/ifcreate in C - \ No newline at end of file + always update database atomically? + find the right .repo dir automatically + cd into subdir automatically + 'redo clean' should work + aggressively mark stuff as done in the .redo database \ No newline at end of file diff --git a/clean.do b/clean.do index 97f6955..b1ae425 100644 --- a/clean.do +++ b/clean.do @@ -1 +1 @@ -rm -f t/hello t/*.o *~ .*~ t/*~ t/.*~ *.pyc t/CC t/LD +rm -f t/hello t/[by]ellow t/*.o *~ .*~ t/*~ t/.*~ *.pyc t/CC t/LD diff --git a/t/bellow.do b/t/bellow.do new file mode 100644 index 0000000..9ab2cf2 --- /dev/null +++ b/t/bellow.do @@ -0,0 +1,2 @@ +redo --ifchange LD yellow.o +./LD bellow yellow.o diff --git a/t/it.do b/t/it.do index 22e2266..9489b33 100644 --- a/t/it.do +++ b/t/it.do @@ -1 +1,2 @@ -redo --ifchange hello +redo --ifchange hello yellow bellow + diff --git a/t/yellow.do b/t/yellow.do new file mode 100644 index 0000000..7faac8f --- /dev/null +++ b/t/yellow.do @@ -0,0 +1,2 @@ +redo --ifchange LD yellow.o +./LD yellow yellow.o diff --git a/t/yellow.o.do b/t/yellow.o.do new file mode 100644 index 0000000..331c775 --- /dev/null +++ b/t/yellow.o.do @@ -0,0 +1,2 @@ +redo --ifchange CC hello.c +gcc -o $3 -c hello.c