Minor fixes + clean code + exclude hidden source file

This commit is contained in:
Corentin 2021-06-30 05:11:57 +09:00
commit 2c9120752e
2 changed files with 3 additions and 5 deletions

View file

@ -26,7 +26,6 @@ class Config:
COMPILE_FLAGS = f'-Wall -I{INCLUDE_DIR}' # Flags added for compiling (recommandation : `pkg-config --cflags`)
LINK_FLAGS = '' # Flags added for linking (recommandation : `pkg-config --libs`)
CPP_HEADERS = INCLUDE_DIR.rglob('*.hpp')
CPP_SOURCES = SOURCE_DIR.rglob('*.cpp')
@ -89,7 +88,7 @@ def make(config: Config):
job = subprocess.run(cmd, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
universal_newlines=True, shell=True)
if job.returncode != 0:
error_paths.append((source_path, job.stdout.read() + job.stderr.read()))
error_paths.append((source_path, job.stdout + job.stderr))
break
dependency_dict[str(source_path)] = job.stdout.split('.o: ')[1].replace('\n', '').replace('\\ ', '').split(' ')
if error_paths:
@ -120,7 +119,7 @@ def make(config: Config):
todo_list.append((source_path, cmd))
continue
if not todo_list:
if not todo_list and all([(config.BIN_DIR / app_path).exists() for app_path in config.APPS]):
print(ConsoleColor.GREEN + 'Nothing to do' + ConsoleColor.ENDCOLOR)
return