From 87bf34a5d341c3a2381f57c19fcb94c21c8d0122 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 14 Aug 2016 12:25:23 +0300 Subject: [PATCH] Pass the target to submake --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 319684c8..ed89b073 100644 --- a/Makefile +++ b/Makefile @@ -230,6 +230,9 @@ endef # $1 Keymap define PARSE_KEYMAP CURRENT_KM = $1 + # The rest of the rule is the target + # Remove the leading "-" from the target, as it acts as a separator + MAKE_TARGET := $$(patsubst -%,%,$$(RULE)) COMMAND := COMMAND_KEYBOARD_$$(CURRENT_KB)_SUBPROJECT_$(CURRENT_SP)_KEYMAP_$$(CURRENT_KM) COMMANDS += $$(COMMAND) ifeq ($$(CURRENT_SP),) @@ -240,8 +243,11 @@ define PARSE_KEYMAP KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR) MAKE_VARS := KEYBOARD=$$(CURRENT_KB) SUBPROJECT=$$(CURRENT_SP) KEYMAP=$$(CURRENT_KM) MAKE_VARS += VERBOSE=$(VERBOSE) COLOR=$(COLOR) - MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk - MAKE_MSG := Compiling $$(KB_SP) with $(BOLD)$$(CURRENT_KM)$(NO_COLOR) + MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET) + MAKE_MSG := Making $$(KB_SP) with keymap $(BOLD)$$(CURRENT_KM)$(NO_COLOR) + ifneq ($$(MAKE_TARGET),) + MAKE_MSG += and target $(BOLD)$$(MAKE_TARGET)$(NO_COLOR) + endif MAKE_MSG_FORMAT := $(AWK) '{ printf "%-118s", $$$$0;}' COMMAND_true_$$(COMMAND) := \ printf "$$(MAKE_MSG)" | \