wireless-regdb: update to version 2021.08.28
[librecmc/librecmc.git] / include / prereq-build.mk
index e0d3b31464aedc84faca05ca45792e853c36ff20..29960b148f2ac062ad5657b254b6dbda73e8ff9c 100644 (file)
@@ -28,8 +28,8 @@ $(eval $(call TestHostCommand,proper-umask, \
 
 $(eval $(call SetupHostCommand,gcc, \
        Please install the GNU C Compiler (gcc) 4.8 or later, \
-       $(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
-       gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
+       $(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
+       gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
        gcc --version | grep -E 'Apple.(LLVM|clang)' ))
 
 $(eval $(call TestHostCommand,working-gcc, \
@@ -40,8 +40,8 @@ $(eval $(call TestHostCommand,working-gcc, \
 
 $(eval $(call SetupHostCommand,g++, \
        Please install the GNU C++ Compiler (g++) 4.8 or later, \
-       $(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
-       g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
+       $(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
+       g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
        g++ --version | grep -E 'Apple.(LLVM|clang)' ))
 
 $(eval $(call TestHostCommand,working-g++, \
@@ -62,11 +62,26 @@ else
   zlib_link_flags := -lz
 endif
 
+$(eval $(call TestHostCommand,perl-data-dumper, \
+       Please install the Perl Data::Dumper module, \
+       perl -MData::Dumper -e 1))
+
+$(eval $(call TestHostCommand,perl-findbin, \
+       Please install the Perl FindBin module, \
+       perl -MFindBin -e 1))
+
+$(eval $(call TestHostCommand,perl-file-copy, \
+       Please install the Perl File::Copy module, \
+       perl -MFile::Copy -e 1))
+
+$(eval $(call TestHostCommand,perl-file-compare, \
+       Please install the Perl File::Compare module, \
+       perl -MFile::Compare -e 1))
+
 $(eval $(call TestHostCommand,perl-thread-queue, \
        Please install the Perl Thread::Queue module, \
        perl -MThread::Queue -e 1))
 
-
 $(eval $(call SetupHostCommand,tar,Please install GNU 'tar', \
        gtar --version 2>&1 | grep GNU, \
        gnutar --version 2>&1 | grep GNU, \
@@ -127,12 +142,18 @@ $(eval $(call SetupHostCommand,wget,Please install GNU 'wget', \
 $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
        perl --version | grep "perl.*v5"))
 
-$(eval $(call CleanupPython3))
+$(eval $(call CleanupPython2))
+
+$(eval $(call SetupHostCommand,python,Please install Python >= 3.5, \
+       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.5 -V 2>&1 | grep 'Python 3', \
+       python3 -V 2>&1 | grep -E 'Python 3\.[5-9]\.?'))
 
-$(eval $(call SetupHostCommand,python,Please install Python 2.x, \
-       python2.7 -V 2>&1 | grep 'Python 2.7', \
-       python2 -V 2>&1 | grep 'Python 2', \
-       python -V 2>&1 | grep 'Python 2'))
+$(eval $(call TestHostCommand,python3-jsmin, \
+        Please install the jsmin Python module, \
+        python3 -c "import jsmin" 2>&1 ))
 
 $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
        git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule))
@@ -142,7 +163,7 @@ $(eval $(call SetupHostCommand,file,Please install the 'file' package, \
 
 $(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
        mkdir -p $(dir $@)
-       $(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
+       $(CC) -I$(TOPDIR)/tools/include -o $@ $<
 
 prereq: $(STAGING_DIR_HOST)/bin/mkhash