From 88ec588ae7f6d36b23578135cde8b7a5160ff8b7 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 18 Jan 2023 23:44:41 +0000 Subject: [PATCH] Remove `make all-` build targets (#19496) --- Makefile | 15 +-------------- builddefs/build_keyboard.mk | 12 ------------ lib/python/qmk/cli/mass_compile.py | 2 +- lib/python/qmk/cli/multibuild.py | 2 +- 4 files changed, 3 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index 22322fbf93f..c77eadf97d5 100644 --- a/Makefile +++ b/Makefile @@ -124,24 +124,11 @@ endef define PARSE_RULE RULE := $1 COMMANDS := - REQUIRE_PLATFORM_KEY := # If the rule starts with all, then continue the parsing from # PARSE_ALL_KEYBOARDS ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true) KEYBOARD_RULE=all $$(eval $$(call PARSE_ALL_KEYBOARDS)) - else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-avr),true) - KEYBOARD_RULE=all - REQUIRE_PLATFORM_KEY := avr - $$(eval $$(call PARSE_ALL_KEYBOARDS)) - else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-chibios),true) - KEYBOARD_RULE=all - REQUIRE_PLATFORM_KEY := chibios - $$(eval $$(call PARSE_ALL_KEYBOARDS)) - else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-arm_atsam),true) - KEYBOARD_RULE=all - REQUIRE_PLATFORM_KEY := arm_atsam - $$(eval $$(call PARSE_ALL_KEYBOARDS)) else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true) $$(eval $$(call PARSE_TEST)) # If the rule starts with the name of a known keyboard, then continue @@ -271,7 +258,7 @@ define PARSE_KEYMAP # Format it in bold KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR) # Specify the variables that we are passing forward to submake - MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) QMK_BIN=$$(QMK_BIN) + MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) QMK_BIN=$$(QMK_BIN) # And the first part of the make command MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f $(BUILDDEFS_PATH)/build_keyboard.mk $$(MAKE_TARGET) # The message to display diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index 8999ac80ad5..ec0336f7c3f 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -433,13 +433,6 @@ SRC += $(TMK_COMMON_SRC) OPT_DEFS += $(TMK_COMMON_DEFS) EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS) -SKIP_COMPILE := no -ifneq ($(REQUIRE_PLATFORM_KEY),) - ifneq ($(REQUIRE_PLATFORM_KEY),$(PLATFORM_KEY)) - SKIP_COMPILE := yes - endif -endif - -include $(PLATFORM_PATH)/$(PLATFORM_KEY)/bootloader.mk include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk -include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk @@ -479,12 +472,7 @@ $(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG) # Default target. -ifeq ($(SKIP_COMPILE),no) all: build check-size -else -all: - echo "skipped" >&2 -endif build: elf cpfirmware check-size: build diff --git a/lib/python/qmk/cli/mass_compile.py b/lib/python/qmk/cli/mass_compile.py index a98f7ad4824..d8dda0cac34 100755 --- a/lib/python/qmk/cli/mass_compile.py +++ b/lib/python/qmk/cli/mass_compile.py @@ -134,7 +134,7 @@ all: {keyboard_safe}_{keymap_name}_binary {keyboard_safe}_{keymap_name}_binary: @rm -f "{QMK_FIRMWARE}/.build/failed.log.{keyboard_safe}.{keymap_name}" || true @echo "Compiling QMK Firmware for target: '{keyboard_name}:{keymap_name}'..." >>"{QMK_FIRMWARE}/.build/build.log.{os.getpid()}.{keyboard_safe}" - +@$(MAKE) -C "{QMK_FIRMWARE}" -f "{QMK_FIRMWARE}/builddefs/build_keyboard.mk" KEYBOARD="{keyboard_name}" KEYMAP="{keymap_name}" REQUIRE_PLATFORM_KEY= COLOR=true SILENT=false {' '.join(cli.args.env)} \\ + +@$(MAKE) -C "{QMK_FIRMWARE}" -f "{QMK_FIRMWARE}/builddefs/build_keyboard.mk" KEYBOARD="{keyboard_name}" KEYMAP="{keymap_name}" COLOR=true SILENT=false {' '.join(cli.args.env)} \\ >>"{QMK_FIRMWARE}/.build/build.log.{os.getpid()}.{keyboard_safe}.{keymap_name}" 2>&1 \\ || cp "{QMK_FIRMWARE}/.build/build.log.{os.getpid()}.{keyboard_safe}.{keymap_name}" "{QMK_FIRMWARE}/.build/failed.log.{os.getpid()}.{keyboard_safe}.{keymap_name}" @{{ grep '\[ERRORS\]' "{QMK_FIRMWARE}/.build/build.log.{os.getpid()}.{keyboard_safe}.{keymap_name}" >/dev/null 2>&1 && printf "Build %-64s \e[1;31m[ERRORS]\e[0m\\n" "{keyboard_name}:{keymap_name}" ; }} \\ diff --git a/lib/python/qmk/cli/multibuild.py b/lib/python/qmk/cli/multibuild.py index 5e0f0b5188a..22b68f43c87 100755 --- a/lib/python/qmk/cli/multibuild.py +++ b/lib/python/qmk/cli/multibuild.py @@ -71,7 +71,7 @@ all: {keyboard_safe}_binary {keyboard_safe}_binary: @rm -f "{QMK_FIRMWARE}/.build/failed.log.{keyboard_safe}" || true @echo "Compiling QMK Firmware for target: '{keyboard_name}:{cli.args.keymap}'..." >>"{QMK_FIRMWARE}/.build/build.log.{os.getpid()}.{keyboard_safe}" - +@$(MAKE) -C "{QMK_FIRMWARE}" -f "{QMK_FIRMWARE}/builddefs/build_keyboard.mk" KEYBOARD="{keyboard_name}" KEYMAP="{cli.args.keymap}" REQUIRE_PLATFORM_KEY= COLOR=true SILENT=false {' '.join(cli.args.env)} \\ + +@$(MAKE) -C "{QMK_FIRMWARE}" -f "{QMK_FIRMWARE}/builddefs/build_keyboard.mk" KEYBOARD="{keyboard_name}" KEYMAP="{cli.args.keymap}" COLOR=true SILENT=false {' '.join(cli.args.env)} \\ >>"{QMK_FIRMWARE}/.build/build.log.{os.getpid()}.{keyboard_safe}" 2>&1 \\ || cp "{QMK_FIRMWARE}/.build/build.log.{os.getpid()}.{keyboard_safe}" "{QMK_FIRMWARE}/.build/failed.log.{os.getpid()}.{keyboard_safe}" @{{ grep '\[ERRORS\]' "{QMK_FIRMWARE}/.build/build.log.{os.getpid()}.{keyboard_safe}" >/dev/null 2>&1 && printf "Build %-64s \e[1;31m[ERRORS]\e[0m\\n" "{keyboard_name}:{cli.args.keymap}" ; }} \\