diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | devbot/build.py | 14 |
2 files changed, 11 insertions, 5 deletions
@@ -8,7 +8,7 @@ TIME=time -f "\n=== time ===\n\nreal\t%e\nuser\t%U\nsys\t%S\n" .PHONY: all -all: pull build +all: build include Makefile.config include Makefile.commands diff --git a/devbot/build.py b/devbot/build.py index 5c35999..b51f0cf 100644 --- a/devbot/build.py +++ b/devbot/build.py @@ -37,11 +37,11 @@ def pull_one(module_name): return False -def pull(): +def pull(lazy=False): environ.setup() for module in config.load_modules(): - if not _pull_module(module): + if not _pull_module(module, lazy): return False return True @@ -58,6 +58,8 @@ def build(full=False): state.full_build_touch() + pull(lazy=True) + for module in config.load_modules(): if state.built_module_is_unchanged(module): print "\n* Skipping unchanged module %s *" % module.name @@ -107,11 +109,15 @@ def _unlink_libtool_files(): os.path.walk(config.lib_dir, func, None) -def _pull_module(module): +def _pull_module(module, lazy=False): + git_module = module.get_git_module() + if lazy and os.path.exists(git_module.local): + return True + print "\n=== Pulling %s ===\n" % module.name try: - module.get_git_module().update() + git_module.update() except subprocess.CalledProcessError: return False |