Fix userspace detection in Makefile (#26117)
This commit is contained in:
parent
c7fde3d8cc
commit
9d24bc8a33
12
Makefile
12
Makefile
|
|
@ -38,14 +38,16 @@ $(info QMK Firmware $(QMK_VERSION))
|
|||
endif
|
||||
endif
|
||||
|
||||
# Try to determine userspace from qmk config, if set.
|
||||
ifeq ($(QMK_USERSPACE),)
|
||||
QMK_USERSPACE = $(shell qmk config -ro user.overlay_dir | cut -d= -f2 | sed -e 's@^None$$@@g')
|
||||
endif
|
||||
|
||||
# Determine which qmk cli to use
|
||||
QMK_BIN := qmk
|
||||
|
||||
# Try to determine userspace from qmk config, if set. Handle direct query on qmk_cli>=1.1.7
|
||||
# falling back to legacy method of only supporting user.overlay_dir config
|
||||
export override QMK_USERSPACE := $(shell \
|
||||
$(QMK_BIN) env | grep -q QMK_USERSPACE \
|
||||
&& $(QMK_BIN) env QMK_USERSPACE \
|
||||
|| $(QMK_BIN) config -ro user.overlay_dir | cut -d= -f2 | sed -e 's@^None$$@@g')
|
||||
|
||||
# avoid 'Entering|Leaving directory' messages
|
||||
MAKEFLAGS += --no-print-directory
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue