Commit graph

69 commits

Author SHA1 Message Date
Avery Pennarun
63c596ac61 Move log stuff into a separate log.py. 2010-11-13 00:11:34 -08:00
Avery Pennarun
440af04821 Move creation of .redo directory.
This fixes "./redo clean test", since clean.do deletes .redo.
2010-11-12 23:58:39 -08:00
Avery Pennarun
903793ecd9 Colourize redo's output. 2010-11-12 23:58:32 -08:00
Avery Pennarun
2e71e20ce2 When auto-choosing a .redo dir, prefer ones uphill that already exist.
So if we're in redo/t/ and running 'redo hello', we'll detect redo/.redo and
use that one rather than creating a new redo/t/.redo directory.

The downside of this is we get slightly different behaviour if the *first*
thing you build isn't from the root.  Probably that's bad, but it should
hopefully be rare.
2010-11-12 23:23:06 -08:00
Avery Pennarun
690d1dd7f0 Makefile: use a .PHONY rule to force everything to forward to redo. 2010-11-12 23:19:27 -08:00
Avery Pennarun
3c16056c21 When running x/y/z/whatever.do, first cd to x/y/z.
That way it's exactly equivalent to
	cd x/y/z; redo whatever
2010-11-12 23:14:58 -08:00
Avery Pennarun
45c6aad649 use os.environ[] instead of os.getenv/os.putenv.
Oddly, in python, os.putenv() does not make changes that os.getenv() can see.
2010-11-12 23:14:02 -08:00
Avery Pennarun
f43187b73a 'make clean' can now safely remove .redo dirs. 2010-11-12 22:50:23 -08:00
Avery Pennarun
425a295d6f Use a single .redo dir for the entire build. 2010-11-12 22:47:03 -08:00
Avery Pennarun
3c2fc49c63 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.
2010-11-12 22:15:34 -08:00
Avery Pennarun
2ed0511094 Cleaner environment variable management in redo.py. 2010-11-12 22:14:39 -08:00
Avery Pennarun
7cbf39d52a Make jwack... mostly... work with GNU make.
But it seems to be pretty unsolvable in the current form; the problem is
that when you're nesting one jwack inside the other and the jobserver is GNU
make, there's no way to tell the parent jwack not to use up a token.  Thus,
if you nest too deeply, it just deadlocks.

So this approach isn't really going to work the way it is.
2010-11-12 21:09:29 -08:00
Avery Pennarun
f77e4b5c91 Add jwack, a GNU make-like jobserver.
Theoretically compatible with GNU make's jobserver pipes.  Haven't tested
that yet.
2010-11-12 20:10:21 -08:00
Avery Pennarun
07d3e3b13c Extremely basic integration of wvtest for testing.
And move test scripts into t/ subdir to keep things clean.

As part of that, make sure redo adds itself to the PATH on startup so that
subscripts can find it.
2010-11-12 17:19:42 -08:00
Avery Pennarun
ae5b71fbc1 Add a -v (verbose) option. 2010-11-12 07:10:55 -08:00
Avery Pennarun
9a45f066f8 Add actual dependency checking. 2010-11-12 07:03:06 -08:00
Avery Pennarun
ee8a3c8c6e More comprehensible output as we produce stuff. 2010-11-12 05:32:38 -08:00
Avery Pennarun
7c14f21613 A Makefile that just forwards everything to redo. 2010-11-12 05:32:35 -08:00
Avery Pennarun
a51764c907 Extremely basic first crack at implementing djb's redo.
And a test program.
2010-11-12 05:25:03 -08:00