redo.py: report when you're trying to rebuild a static file.
In redo-ifchange, this might be a good idea, since you might just want to set a dependency on it, so we won't say anything from inside builder.py. But if you're calling redo.py, that means you expect it to be rebuilt, since there's no other reason to try. So print a warning. (This is what make does, more or less.)
This commit is contained in:
parent
49f0a041b2
commit
1cb000ece1
3 changed files with 13 additions and 5 deletions
9
redo.py
9
redo.py
|
|
@ -39,9 +39,16 @@ import vars_init
|
|||
vars_init.init(targets)
|
||||
|
||||
import vars, state, builder, jwack
|
||||
from log import err
|
||||
from log import warn, err
|
||||
|
||||
try:
|
||||
for t in targets:
|
||||
if os.path.exists(t):
|
||||
f = state.File(name=t)
|
||||
if not f.is_generated:
|
||||
warn('%s: exists and not marked as generated; not redoing.\n'
|
||||
% f.nicename())
|
||||
|
||||
j = atoi(opt.jobs or 1)
|
||||
if j < 1 or j > 1000:
|
||||
err('invalid --jobs value: %r\n' % opt.jobs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue