aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 91ab9e4e8..80e1a90a1 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,13 @@ $(info QMK Firmware $(QMK_VERSION))
29endif 29endif
30endif 30endif
31 31
32# Determine which qmk cli to use
33ifeq (,$(shell which qmk))
34 QMK_BIN = bin/qmk
35else
36 QMK_BIN = qmk
37endif
38
32# avoid 'Entering|Leaving directory' messages 39# avoid 'Entering|Leaving directory' messages
33MAKEFLAGS += --no-print-directory 40MAKEFLAGS += --no-print-directory
34 41
@@ -384,7 +391,7 @@ define PARSE_KEYMAP
384 # Format it in bold 391 # Format it in bold
385 KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR) 392 KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
386 # Specify the variables that we are passing forward to submake 393 # Specify the variables that we are passing forward to submake
387 MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) 394 MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) QMK_BIN=$$(QMK_BIN)
388 # And the first part of the make command 395 # And the first part of the make command
389 MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET) 396 MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
390 # The message to display 397 # The message to display
@@ -501,8 +508,8 @@ endef
501%: 508%:
502 # Check if we have the CMP tool installed 509 # Check if we have the CMP tool installed
503 cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; 510 cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
504 # Ensure that bin/qmk works. 511 # Ensure that $(QMK_BIN) works.
505 if ! bin/qmk hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi 512 if ! $(QMK_BIN) hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi
506 # Check if the submodules are dirty, and display a warning if they are 513 # Check if the submodules are dirty, and display a warning if they are
507ifndef SKIP_GIT 514ifndef SKIP_GIT
508 if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi 515 if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi