summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2021-03-18 16:10:40 -0700
committerGitHub <noreply@github.com>2021-03-18 16:10:40 -0700
commitf2715a05939b749771d9826f9ad23b4cab280e82 (patch)
tree90a776e94206f0f18be3b3399b7d72ca2ec01897
parent90b1e271a8178d68e8c1be0beecfb26b42767f5f (diff)
Consistently use bin/qmk when that script is called (#12286)
* Pass QMK_BIN down to build_keyboard.mk * choose the correct qmk script
-rw-r--r--Makefile4
-rwxr-xr-xbin/qmk1
-rw-r--r--lib/python/qmk/commands.py2
3 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index de0a2d4153..80e1a90a19 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ endif
endif
# Determine which qmk cli to use
-ifeq (, $(shell which qmk))
+ifeq (,$(shell which qmk))
QMK_BIN = bin/qmk
else
QMK_BIN = qmk
@@ -391,7 +391,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)
+ MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) QMK_BIN=$$(QMK_BIN)
# And the first part of the make command
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
# The message to display
diff --git a/bin/qmk b/bin/qmk
index 28486026f9..a2af2951c9 100755
--- a/bin/qmk
+++ b/bin/qmk
@@ -73,6 +73,7 @@ def main():
"""
# Change to the root of our checkout
os.environ['ORIG_CWD'] = os.getcwd()
+ os.environ['DEPRECATED_BIN_QMK'] = '1'
os.chdir(qmk_dir)
print('Warning: The bin/qmk script is being deprecated. Please install the QMK CLI: python3 -m pip install qmk', file=sys.stderr)
diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py
index ac98376958..4809365af3 100644
--- a/lib/python/qmk/commands.py
+++ b/lib/python/qmk/commands.py
@@ -180,7 +180,7 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va
f'VERBOSE={verbose}',
f'COLOR={color}',
'SILENT=false',
- 'QMK_BIN=qmk',
+ f'QMK_BIN={"bin/qmk" if "DEPRECATED_BIN_QMK" in os.environ else "qmk"}',
])
return make_command