Fix IGNORE_APPS forcing link stage
This commit is contained in:
parent
1ed601c52c
commit
f5965cc91e
1 changed files with 7 additions and 3 deletions
10
umake.py
10
umake.py
|
|
@ -13,6 +13,7 @@ import sys
|
|||
class Config:
|
||||
CC = 'g++' # Compiler to call
|
||||
APPS = ['app_name'] # Output binaries (need to be found as .cpp directly in SOURCE_DIR)
|
||||
IGNORE_APPS = []
|
||||
JOB_COUNT = int(os.cpu_count() * 0.8) # Concurent jobs (multi-processing)
|
||||
|
||||
BIN_DIR = Path('bin') # Output directory (binaries)
|
||||
|
|
@ -65,6 +66,8 @@ def make(config: Config):
|
|||
|
||||
if config.PRE_COMPILE_FUNCTION is not None:
|
||||
config.PRE_COMPILE_FUNCTION()
|
||||
if 'IGNORE_APPS' in config.__dict__ :
|
||||
config.IGNORE_APPS = []
|
||||
|
||||
# Update flags and directories for mode debug/release
|
||||
if arguments.type == 'debug':
|
||||
|
|
@ -124,7 +127,8 @@ def make(config: Config):
|
|||
todo_list.append((source_path, cmd))
|
||||
continue
|
||||
|
||||
if not todo_list and all([(config.BIN_DIR / app_path).exists() for app_path in config.APPS]):
|
||||
if not todo_list and all([(config.BIN_DIR / app_path).exists() for app_path in config.APPS
|
||||
if app_path not in config.IGNORE_APPS]):
|
||||
print(ConsoleColor.GREEN + 'Nothing to do' + ConsoleColor.ENDCOLOR)
|
||||
return
|
||||
|
||||
|
|
@ -181,7 +185,7 @@ def make(config: Config):
|
|||
if arguments.j > 1: # Multi-process
|
||||
jobs: list[tuple[Path, subprocess.Popen]] = []
|
||||
for app_path, app_object_path in zip(config.APPS, all_app_objects):
|
||||
if 'IGNORE_APPS' in config.__dict__ and app_path in config.IGNORE_APPS:
|
||||
if app_path in config.IGNORE_APPS:
|
||||
continue
|
||||
bin_path = config.BIN_DIR / app_path
|
||||
if not bin_path.parent.exists():
|
||||
|
|
@ -206,7 +210,7 @@ def make(config: Config):
|
|||
error_paths.append((source_path, job.stdout.read() + job.stderr.read()))
|
||||
else: # Single-process
|
||||
for app_path, app_object_path in zip(config.APPS, all_app_objects):
|
||||
if 'IGNORE_APPS' in config.__dict__ and app_path in config.IGNORE_APPS:
|
||||
if app_path in config.IGNORE_APPS:
|
||||
continue
|
||||
bin_path = config.BIN_DIR / app_path
|
||||
if not bin_path.parent.exists():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue