build: autotools: fix cache path
[openwrt/openwrt.git] / include / prereq-build.mk
index 922e7c544bbf85b769836345e1d2991d4ab8ac27..e1918f002787be0abae4953cfedc0cc327122ff7 100644 (file)
@@ -157,18 +157,20 @@ $(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', \
        python3.6 -V 2>&1 | grep 'Python 3', \
-       python3 -V 2>&1 | grep -E 'Python 3\.[6-9]\.?'))
+       python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?'))
 
 $(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', \
        python3.6 -V 2>&1 | grep 'Python 3', \
-       python3 -V 2>&1 | grep -E 'Python 3\.[6-9]\.?'))
+       python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?'))
 
 $(eval $(call TestHostCommand,python3-distutils, \
        Please install the Python3 distutils module, \
@@ -184,7 +186,9 @@ $(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
        rsync --version </dev/null))
 
 $(eval $(call SetupHostCommand,which,Please install 'which', \
-       which which | grep which))
+       /usr/bin/which which, \
+       /bin/which which, \
+       which which))
 
 $(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
        mkdir -p $(dir $@)
@@ -194,5 +198,4 @@ prereq: $(STAGING_DIR_HOST)/bin/mkhash
 
 # Install ldconfig stub
 $(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \
-       touch $(STAGING_DIR_HOST)/bin/ldconfig && \
-       chmod +x $(STAGING_DIR_HOST)/bin/ldconfig))
+       $(LN) /bin/true $(STAGING_DIR_HOST)/bin/ldconfig))