From 4c4178e170f2177f59074b5af6419facc878e2a0 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Wed, 8 Feb 2023 16:46:59 +0000 Subject: [PATCH] build: stop make compile-db from having to call make clean --- Makefile | 4 +--- tools/make/generate_compile_commands.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9ffe07a..30b5219 100644 --- a/Makefile +++ b/Makefile @@ -69,8 +69,6 @@ clean: @rm -rf $(BUILD_DIR) $(BUILD_DIR)/compile_commands.json: - @$(MAKE) --no-print-directory clean - @printf " \033[1;93mGEN\033[0m Generating compiler database.\n" @./tools/make/generate_compile_commands.py @@ -82,6 +80,6 @@ tools: include arch/$(ARCH)/extra.mk -.PHONY: all tools compile-db +.PHONY: all tools compile-db $(BUILD_DIR)/compile_commands.json .INTERMEDIATE: $(ARCH_TEMP_FILES) diff --git a/tools/make/generate_compile_commands.py b/tools/make/generate_compile_commands.py index 872fe89..f7c2ac9 100755 --- a/tools/make/generate_compile_commands.py +++ b/tools/make/generate_compile_commands.py @@ -12,7 +12,7 @@ rootdir = os.getcwd() compile_db = [] -make_output = subprocess.check_output(['make', '-nw']).decode('utf-8') +make_output = subprocess.check_output(['make', '-nwB']).decode('utf-8') make_output_lines = make_output.split('\n')