apenwarr-redo/clean.do
Avery Pennarun fb5275938d minimal/do: use ".did" stamp files instead of empty target files.
If all.do runs and creates no output, we shouldn't create a file called
'all', but we should remember that 'all' has been run successfully.  We do
this by creating 'all.did' during the build.

Since minimal/do always just wipes everything out every time it runs, we can
safely remove the .did files after minimal/do terminates, so this doesn't
clutter things too much in normal use.

This fixes some edge cases, particularly that 'minimal/do clean' no longer
leaves stupid files named "clean" lying around, and the redo-sh directory
can now be rebuilt correctly since we rebuild it as long as redo-sh.did
doesn't exist.  (We don't want to "rm -rf redo-sh" because it makes me
nervous.)
2011-01-01 04:11:20 -08:00

10 lines
272 B
Text

rm -rf t/.redo redo-sh
if [ -e .do_built ]; then
while read x; do
rm -f "$x"
done <.do_built
fi
[ -z "$DO_BUILT" ] && rm -rf .do_built .do_built.dir
redo t/clean Documentation/clean
rm -f *~ .*~ */*~ */.*~ *.pyc install.wrapper
find . -name '*.tmp' -exec rm -fv {} \;