Don't unlink(t) before building; always rebuild the target if it was locked.
Don't unlink(t) before building; always rebuild the target if it was locked.

The 'redo' command is supposed to *always* rebuild, not just if nobody else
rebuilt it.  (If you want "rebuild sometimes" behaviour, use redo-ifchange.)
Thus, we shouldn't be short circuiting it just because a file was previously
locked and then built okay.

However, there's still a race condition in parallel builds, because
redo-ifchange only checks the build stamp of each file once, then passes it
to redo.  Thus, we end up trying to build the same stuff over and over.
This change actually makes it build *more* times, which seems dumb, but is
one step closer to right.

Doing this broke 'make test', however, because we were unlinking the target
right before building it, rather than replacing it atomically as djb's
original design suggested we should do.  Thus, because of the combination of
the above two bugs, CC would appear and then disappear even as people were
trying to actually use it.  Now it gets replaced atomically so it should
at least work at all times... even though we're still building it more than
once, which is incorrect.

apenwarr/redo,pombredanne/redo,pombredanne/redo,pombredanne/redo,apenwarr/redo,dinkelk/redo-python,apenwarr/redo,apenwarr/redo,dinkelk/redo-python,dinkelk/redo-python,pombredanne/redo,rowhit/redo,rowhit/redo,dinkelk/redo-python,rowhit/redo,rowhit/redo