apenwarr/redo — pull request #12 by mildred (2012-12-28 11:04:57+00:00)
Title: Fix simple branch

Hi,

Attached two commits for the simple branch.

The first one add a test for a problem I found when I had a target depending on two redo-stamp targets that were also marked with redo-always. Basically, the use case for this is:

cflags.do:

redo-always
echo $CFLAGS >$3
redo-stamp <$3

config.do:

redo-always
echo $CONFIG >$3
redo-stamp <$3

compile.do

redo-ifchange cflags config
. ./cflags
. ./config
cc-$CONFIG $CFLAGS -o $3
...

This was a very useful technique I found to be able to depend on environment variables.

The problem was that compile.do was always rebuilt even if neither cflags or config changed. I should have fixed that.

The other problem is that the test 130 failed because ls -l shown `-rw-r--r--.` instead of just `-rw-r--r--` making the test fail. I don't know if the correction is ideal but it works on my computer. You might want to drop this find a workaround (such as `tr -d .`).

Mildred