From e91f939a320b4612d67a3d67f5b1bd0cbb3be40f Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 23 Mar 2023 12:48:25 +1100 Subject: [PATCH] Optionally keep intermediate file listings in order to do comparisons between builds. (#20237) --- builddefs/build_keyboard.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index 5fd61a96ce77..91c9541be597 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -446,6 +446,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)