From b0069c5c05dac2c910d51ef7f3bf4133721a9c49 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sun, 7 Mar 2021 19:10:03 -0800 Subject: Begin the process of deprecating bin/qmk in favor of the global cli (#12109) * Begin the process of deprecating bin/qmk in favor of the global cli * Correctly set the qmk bin --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 91ab9e4e8e..de0a2d4153 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,13 @@ $(info QMK Firmware $(QMK_VERSION)) endif endif +# Determine which qmk cli to use +ifeq (, $(shell which qmk)) + QMK_BIN = bin/qmk +else + QMK_BIN = qmk +endif + # avoid 'Entering|Leaving directory' messages MAKEFLAGS += --no-print-directory @@ -501,8 +508,8 @@ endef %: # Check if we have the CMP tool installed cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; - # Ensure that bin/qmk works. - if ! bin/qmk hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi + # Ensure that $(QMK_BIN) works. + if ! $(QMK_BIN) hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi # Check if the submodules are dirty, and display a warning if they are ifndef SKIP_GIT if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi -- cgit v1.2.3