'make clean' can now safely remove .redo dirs.
This commit is contained in:
parent
425a295d6f
commit
f43187b73a
3 changed files with 10 additions and 0 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,3 +1,9 @@
|
|||
*~
|
||||
*.pyc
|
||||
*.tmp
|
||||
.redo
|
||||
t/CC
|
||||
t/LD
|
||||
t/[yb]ellow
|
||||
t/hello
|
||||
t/*.o
|
||||
|
|
|
|||
1
clean.do
1
clean.do
|
|
@ -1 +1,2 @@
|
|||
rm -f t/hello t/[by]ellow t/*.o *~ .*~ t/*~ t/.*~ *.pyc t/CC t/LD
|
||||
rm -rf .redo
|
||||
|
|
|
|||
3
redo.py
3
redo.py
|
|
@ -103,6 +103,9 @@ def dirty_deps(t, depth):
|
|||
|
||||
def stamp(t):
|
||||
stampfile = sname('stamp', t)
|
||||
if not os.path.exists(REDO_BASE + '/.redo'):
|
||||
# .redo might not exist in a 'make clean' target
|
||||
return
|
||||
open(stampfile, 'w').close()
|
||||
try:
|
||||
mtime = os.stat(t).st_mtime
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue