Just check it once after running a subprocess: that's the only way it ought to be able to disappear (ie. in a 'make clean' setup).
16 lines
356 B
Python
Executable file
16 lines
356 B
Python
Executable file
#!/usr/bin/python
|
|
import sys, os
|
|
import vars, state
|
|
from helpers import err
|
|
|
|
|
|
try:
|
|
me = state.File(name=vars.TARGET)
|
|
for t in sys.argv[1:]:
|
|
if os.path.exists(t):
|
|
err('redo-ifcreate: error: %r already exists\n' % t)
|
|
sys.exit(1)
|
|
else:
|
|
me.add_dep('c', t)
|
|
except KeyboardInterrupt:
|
|
sys.exit(200)
|