summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-03-23 12:48:25 +1100
committerGitHub <noreply@github.com>2023-03-23 12:48:25 +1100
commit42aa83787fd0d3a5acd0ac7fbe7d148648be742d (patch)
tree3d8823b62babf1ef8b9abf3ed8aca7c3273083d8
parent6540b31d71a13a1b612cc31bad4c081f1a178630 (diff)
Optionally keep intermediate file listings in order to do comparisons between builds. (#20237)
-rw-r--r--builddefs/build_keyboard.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk
index 7a5412ccd2..6b264fe0ff 100644
--- a/builddefs/build_keyboard.mk
+++ b/builddefs/build_keyboard.mk
@@ -441,6 +441,14 @@ $(eval $(call add_qmk_prefix_defs,MCU_FAMILY,MCU_FAMILY))
$(eval $(call add_qmk_prefix_defs,MCU_SERIES,MCU_SERIES))
$(eval $(call add_qmk_prefix_defs,BOARD,BOARD))
+# Control whether intermediate file listings are generated
+# e.g.:
+# make handwired/onekey/blackpill_f411:default KEEP_INTERMEDIATES=yes
+# cat .build/obj_handwired_onekey_blackpill_f411_default/quantum/quantum.i | sed -e 's@^#.*@@g' -e 's@^\s*//.*@@g' -e '/^\s*$/d' | clang-format
+ifeq ($(strip $(KEEP_INTERMEDIATES)), yes)
+ OPT_DEFS += -save-temps=obj
+endif
+
# TODO: remove this bodge?
PROJECT_DEFS := $(OPT_DEFS)
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)