summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2021-03-07 19:10:03 -0800
committerGitHub <noreply@github.com>2021-03-07 19:10:03 -0800
commitb0069c5c05dac2c910d51ef7f3bf4133721a9c49 (patch)
treeea8a7afb278f0ab4adb2e5390ef952c569ce3592 /Makefile
parent7d45b7f269ddcfc1b33a55d8fed77bdfbf81ba8b (diff)
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
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
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