prereq-build: fix `which` detection on Fedora
[openwrt/staging/chunkeey.git] / include / prereq-build.mk
index 922e7c544bbf85b769836345e1d2991d4ab8ac27..750d3347162ce7d3d8f97c59530dc0a525346f8d 100644 (file)
@@ -157,6 +157,7 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
 $(eval $(call CleanupPython2))
 
 $(eval $(call SetupHostCommand,python,Please install Python >= 3.6, \
+       python3.10 -V 2>&1 | grep 'Python 3', \
        python3.9 -V 2>&1 | grep 'Python 3', \
        python3.8 -V 2>&1 | grep 'Python 3', \
        python3.7 -V 2>&1 | grep 'Python 3', \
@@ -164,6 +165,7 @@ $(eval $(call SetupHostCommand,python,Please install Python >= 3.6, \
        python3 -V 2>&1 | grep -E 'Python 3\.[6-9]\.?'))
 
 $(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \
+       python3.10 -V 2>&1 | grep 'Python 3', \
        python3.9 -V 2>&1 | grep 'Python 3', \
        python3.8 -V 2>&1 | grep 'Python 3', \
        python3.7 -V 2>&1 | grep 'Python 3', \
@@ -184,7 +186,7 @@ $(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
        rsync --version </dev/null))
 
 $(eval $(call SetupHostCommand,which,Please install 'which', \
-       which which | grep which))
+       env which which | grep which))
 
 $(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
        mkdir -p $(dir $@)