summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-03-30 18:12:41 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-03-30 18:12:41 +0200
commit3b513e5acf1524d3974e90fdab332c2b794a622f (patch)
tree60f8324b6855252aa385bfc23025fc6b1a394c49 /scripts
parent44422107fcae7591bc9ee0ca54fa580160345e4a (diff)
build host tools on demand, when not available on the host
Diffstat (limited to 'scripts')
-rw-r--r--scripts/scan-tools.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh
index c16aff609..8be02f690 100644
--- a/scripts/scan-tools.sh
+++ b/scripts/scan-tools.sh
@@ -208,6 +208,38 @@ if ! which g++ >/dev/null 2>&1; then
out=1
fi
+host_need_file=0
+if ! which file >/dev/null 2>&1; then
+ echo "No file found, will build one."
+ host_need_file=1
+fi
+
+host_need_bc=0
+if ! which bc >/dev/null 2>&1; then
+ echo "No bc found, will build one."
+ host_need_bc=1
+fi
+
+host_need_bzip2=0
+if ! which bzip2 >/dev/null 2>&1; then
+ echo "No bzip2 found, will build one."
+ host_need_bzip2=1
+fi
+
+host_need_xz=0
+if ! which xz >/dev/null 2>&1; then
+ echo "No xz found, will build one."
+ host_need_xz=1
+fi
+
+echo "config ADK_HOST_NEED_TOOLS" > $topdir/target/config/Config.in.prereq
+printf "\t%s\n" "boolean" >> $topdir/target/config/Config.in.prereq
+printf "\t%s\n" "default y" >> $topdir/target/config/Config.in.prereq
+if [ $host_need_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_XZ" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_need_bc -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_BC" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_need_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_FILE" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_need_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_NEED_BZIP2" >> $topdir/target/config/Config.in.prereq ;fi
+
cd $topdir
rm -rf tmp