CLI: Use `shutil.which` to detect gmake, instead of OS check.
parent
06b571aa53
commit
6fb048fdaf
|
@ -5,6 +5,7 @@ import os
|
||||||
import platform
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
import shlex
|
import shlex
|
||||||
|
import shutil
|
||||||
|
|
||||||
import qmk.keymap
|
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
|
A command that can be run to make the specified keyboard and keymap
|
||||||
"""
|
"""
|
||||||
make_args = [keyboard, keymap]
|
make_args = [keyboard, keymap]
|
||||||
make_cmd = 'make'
|
make_cmd = 'gmake' if shutil.which('gmake') else 'make'
|
||||||
|
|
||||||
platform_id = platform.platform().lower()
|
|
||||||
if 'freebsd' in platform_id:
|
|
||||||
make_cmd = 'gmake'
|
|
||||||
|
|
||||||
if target:
|
if target:
|
||||||
make_args.append(target)
|
make_args.append(target)
|
||||||
|
|
Loading…
Reference in New Issue