summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-05 10:10:45 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-05 10:10:54 +0200
commita1b3cc3671e200db1b7fbcf359fce4f031ffc343 (patch)
tree9821a6c13577b6850532ca960499b59191ef2216 /scripts
parent40640bbdac9f56c634d1bdf9e4e7be45a140f5a3 (diff)
gnu awk will be build, when not found
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/awk9
-rw-r--r--scripts/scan-tools.sh13
2 files changed, 7 insertions, 15 deletions
diff --git a/scripts/awk b/scripts/awk
deleted file mode 100755
index ff6f9b002..000000000
--- a/scripts/awk
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-if [ -z "$(which gawk 2>/dev/null)" ];then
- /bin/awk "$@"
-else
- gawk "$@"
-fi
diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh
index 3b6ada91e..40486e1fe 100644
--- a/scripts/scan-tools.sh
+++ b/scripts/scan-tools.sh
@@ -158,12 +158,6 @@ if [[ ! -s /usr/include/ncurses.h ]]; then
fi
fi
-if ! which gawk >/dev/null 2>&1; then
- echo You must install GNU awk to continue.
- echo
- out=1
-fi
-
if ! which sed >/dev/null 2>&1; then
echo You must install GNU sed to continue.
echo
@@ -270,6 +264,12 @@ if ! which gfind >/dev/null 2>&1; then
fi
fi
+host_build_gawk=0
+if ! which gawk >/dev/null 2>&1; then
+ echo "No gawk found, will build one."
+ host_build_gawk=1
+fi
+
host_build_xz=0
if ! which xz >/dev/null 2>&1; then
echo "No xz found, will build one."
@@ -322,6 +322,7 @@ if [ $host_build_bison -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BISON
if [ $host_build_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BZIP2" >> $topdir/target/config/Config.in.prereq ;fi
if [ $host_build_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FILE" >> $topdir/target/config/Config.in.prereq ;fi
if [ $host_build_flex -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_gawk -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_GAWK" >> $topdir/target/config/Config.in.prereq ;fi
if [ $host_build_m4 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target/config/Config.in.prereq ;fi
if [ $host_build_mksh -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_MKSH" >> $topdir/target/config/Config.in.prereq ;fi
if [ $host_build_patch -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_PATCH" >> $topdir/target/config/Config.in.prereq ;fi