env and env_init: Eliminate weird auto-initialization of globals.
Merge the two files into env, and make each command explicitly call the function that sets it up in the way that's needed for that command. This means we can finally just import all the modules at the top of each file, without worrying about import order. Phew. While we're here, remove the weird auto-appending-'all'-to-targets feature in env.init(). Instead, do it explicitly, and only from redo and redo-ifchange, only if is_toplevel and no other targets are given.
This commit is contained in:
parent
75b5352511
commit
9b6d1eeb6e
19 changed files with 267 additions and 256 deletions
|
|
@ -343,7 +343,7 @@ def ensure_token_or_cheat(reason, cheatfunc):
|
|||
if not has_token():
|
||||
assert _mytokens == 0
|
||||
n = cheatfunc()
|
||||
_debug('%s: %s: cheat = %d\n' % (env.TARGET, reason, n))
|
||||
_debug('%s: %s: cheat = %d\n' % (env.v.TARGET, reason, n))
|
||||
if n > 0:
|
||||
_mytokens += n
|
||||
_cheats += n
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue