redo-ifcreate: barf if the file already exists.
I'm pretty sure this must be the intended behaviour. It's kind of meaningless to use this to declare a dependency on a file that might start to exist later, if the file already exists.
This commit is contained in:
parent
0bd6d07155
commit
5417d0165a
2 changed files with 3 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ if not vars.TARGET:
|
||||||
for t in sys.argv[1:]:
|
for t in sys.argv[1:]:
|
||||||
mkdirp('%s/.redo' % vars.BASE)
|
mkdirp('%s/.redo' % vars.BASE)
|
||||||
if os.path.exists(t):
|
if os.path.exists(t):
|
||||||
add_dep(vars.TARGET, 'm', t)
|
err('redo-ifcreate: error: %r already exists\n' % t)
|
||||||
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
add_dep(vars.TARGET, 'c', t)
|
add_dep(vars.TARGET, 'c', t)
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
redo-ifchange CC hello.c /usr/include/stdio.h
|
redo-ifchange CC hello.c /usr/include/stdio.h
|
||||||
|
redo-ifcreate stdio.h
|
||||||
./CC hello.c
|
./CC hello.c
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue