Slightly improve the "if target already existed" rule to ignore directories.
So if you have a default.do, it might be used to build mydir, even if mydir already existed when we started. This might be useful if you have a mydir.setup.do and a mydir.do; mydir.do depends on mydir.setup.do, but mydir.setup.do creates mydir, it just doesn't *finish* with mydir. Still, my the time mydir.do runs, mydir already exists, and redo would get confused. I think directories are fundamentally special in this way, because it makes sense to "create" a directory even if that directory isn't "done" at this phase.
This commit is contained in:
parent
66e7c0db5e
commit
66187e879e
1 changed files with 2 additions and 1 deletions
|
|
@ -57,7 +57,8 @@ class BuildJob:
|
|||
if not self.shouldbuildfunc(t):
|
||||
# target doesn't need to be built; skip the whole task
|
||||
return self._after2(0)
|
||||
if (os.path.exists(t) and not state.is_generated(t)
|
||||
if (os.path.exists(t) and not os.path.exists(t + '/.')
|
||||
and not state.is_generated(t)
|
||||
and not os.path.exists('%s.do' % t)):
|
||||
# an existing source file that is not marked as a generated file.
|
||||
# This step is mentioned by djb in his notes. It turns out to be
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue