forked from mirror/qmk_firmware
Fix userspace detection in Makefile (#26117)
This commit is contained in:
12
Makefile
12
Makefile
@@ -38,14 +38,16 @@ $(info QMK Firmware $(QMK_VERSION))
|
|||||||
endif
|
endif
|
||||||
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
|
# Determine which qmk cli to use
|
||||||
QMK_BIN := qmk
|
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
|
# avoid 'Entering|Leaving directory' messages
|
||||||
MAKEFLAGS += --no-print-directory
|
MAKEFLAGS += --no-print-directory
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user