From fe92110b4d7be5559f2f48a35076247e5a8cae53 Mon Sep 17 00:00:00 2001 From: ViperMaul Date: Sat, 18 Apr 2015 19:16:12 -0700 Subject: [PATCH] Make sure you build missing files. Even if cache says the source files has not changed. #735 --- tools/make.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/make.py b/tools/make.py index 380c29faa7..ce5b770383 100644 --- a/tools/make.py +++ b/tools/make.py @@ -597,7 +597,8 @@ See the make.cfg file for additional build options. # For each module, prep files and then build. for module in modules: print_green("\nMaking " + module + "-"*max(1, (60-len(module)))) - + missing = False + # Cache check if module in cache: old_sha = cache[module] @@ -610,10 +611,15 @@ See the make.cfg file for additional build options. # Hash the module new_sha = get_directory_hash(os.path.join(module_root, module)) + + # Is the pbo file missing? + missing = not os.path.isfile(os.path.join(release_dir, project, "addons", "ace_{}.pbo".format(module))) + if missing: + print("ace_{}.pbo".format(module) + " is missing. Building...") # Check if it needs rebuilt # print ("Hash:", new_sha) - if old_sha == new_sha: + if old_sha == new_sha and not missing: if not force_build: print("Module has not changed.") # Skip everything else