Use python3 and fix dependency output parsing

* Fix issue #1
This commit is contained in:
Corentin 2022-11-01 23:35:48 +09:00
commit f556df8c13
2 changed files with 5 additions and 4 deletions

View file

@ -4,10 +4,10 @@ UMAKE_PATH="umake"
.PHONY: all clean .PHONY: all clean
all: all:
@PYTHONPATH=$(UMAKE_PATH) python $(MAKE_PATH)/make.py @PYTHONPATH=$(UMAKE_PATH) python3 $(MAKE_PATH)/make.py
debug: debug:
@PYTHONPATH=$(UMAKE_PATH) python $(MAKE_PATH)/make.py --type debug @PYTHONPATH=$(UMAKE_PATH) python3 $(MAKE_PATH)/make.py --type debug
clean: clean:
@PYTHONPATH=$(UMAKE_PATH) python $(MAKE_PATH)/make.py --clean @PYTHONPATH=$(UMAKE_PATH) python3 $(MAKE_PATH)/make.py --clean

View file

@ -103,7 +103,8 @@ def make(config: Config):
if job.returncode != 0: if job.returncode != 0:
error_paths.append((source_path, job.stdout + job.stderr)) error_paths.append((source_path, job.stdout + job.stderr))
break break
dependency_dict[str(source_path)] = job.stdout.split('.o: ')[1].replace('\n', '').replace('\\ ', '').split(' ') dependency_dict[str(source_path)] = [
line for line in job.stdout.split('.o: ')[1].replace('\n', '').replace('\\ ', '').split(' ') if line]
if error_paths: if error_paths:
for error_path, error_text in error_paths: for error_path, error_text in error_paths:
print(f'{ConsoleColor.RED}Error checking dependencies for {error_path}:' print(f'{ConsoleColor.RED}Error checking dependencies for {error_path}:'