summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-04-13 16:44:27 +0000
committerFlorian Didron <fdidron@users.noreply.github.com>2020-06-12 17:00:27 +0900
commit27e43567d773f14ce5fee659b887775e26c06030 (patch)
treeaf4b21b4aac0ac826be4b92af32af04b3bbf75b3
parent84562a44652bd736ddb58e929b37bdca63e2237f (diff)
CLI: Use `shutil.which` to detect gmake, instead of OS check.
-rw-r--r--lib/python/qmk/commands.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py
index a251d6e70f..5409eea2a7 100644
--- a/lib/python/qmk/commands.py
+++ b/lib/python/qmk/commands.py
@@ -5,6 +5,7 @@ import os
import platform
import subprocess
import shlex
+import shutil
import qmk.keymap
@@ -28,11 +29,7 @@ def create_make_command(keyboard, keymap, target=None):
A command that can be run to make the specified keyboard and keymap
"""
make_args = [keyboard, keymap]
- make_cmd = 'make'
-
- platform_id = platform.platform().lower()
- if 'freebsd' in platform_id:
- make_cmd = 'gmake'
+ make_cmd = 'gmake' if shutil.which('gmake') else 'make'
if target:
make_args.append(target)