build: add support for passing C preprocessor flags for DTS builds
[openwrt/staging/mkresin.git] / include / prereq-build.mk
index 9242407b1896321b376701a8f8928157c95cfcd0..e1918f002787be0abae4953cfedc0cc327122ff7 100644 (file)
@@ -162,7 +162,7 @@ $(eval $(call SetupHostCommand,python,Please install Python >= 3.6, \
        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', \
@@ -170,7 +170,7 @@ $(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \
        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, \
@@ -186,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 $@)
@@ -196,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))