Remove special case for "dirname" -> "dirname/all"
It actually decreases readability of the .do files - by not making it explicit when you're going into a subdir. Plus it adds ambiguity: what if there's a dirname.do *and* a dirname/all? We could resolve the ambiguity if we wanted, but that adds more code, while taking out this special case makes *less* code and improves readability. I think it's the right way to go.
This commit is contained in:
parent
282bb0488e
commit
984ad747f8
13 changed files with 38 additions and 41 deletions
|
|
@ -5,8 +5,13 @@ from helpers import debug, err, mkdirp, unlink
|
|||
|
||||
|
||||
def dirty_deps(t, depth):
|
||||
if os.path.exists('%s/.' % t):
|
||||
t = '%s/all' % t
|
||||
try:
|
||||
st = os.stat(t)
|
||||
realtime = st.st_mtime
|
||||
except OSError:
|
||||
st = None
|
||||
realtime = 0
|
||||
|
||||
debug('%s?%s\n' % (depth, t))
|
||||
if state.isbuilt(t):
|
||||
debug('%s-- DIRTY (built)\n' % depth)
|
||||
|
|
@ -20,11 +25,6 @@ def dirty_deps(t, depth):
|
|||
debug('%s-- DIRTY (no stamp)\n' % depth)
|
||||
return True
|
||||
|
||||
try:
|
||||
realtime = os.stat(t).st_mtime
|
||||
except OSError:
|
||||
realtime = 0
|
||||
|
||||
if stamptime != realtime:
|
||||
debug('%s-- DIRTY (mtime)\n' % depth)
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue