aboutsummaryrefslogtreecommitdiff
path: root/scripts/make.sh
diff options
context:
space:
mode:
authorElie De Brauwer <eliedebrauwer@gmail.com>2013-08-30 23:59:10 +0200
committerElie De Brauwer <eliedebrauwer@gmail.com>2013-08-30 23:59:10 +0200
commiteee90c0f1bc00d4103e55d9dbe98131ab634d0c4 (patch)
tree0ce1a1d20a408372222b36171d4b35ea5a90b318 /scripts/make.sh
parentafe3fbda7320af5e0452040e6c79bbaef8fffef5 (diff)
downloadtoybox-eee90c0f1bc00d4103e55d9dbe98131ab634d0c4.tar.gz
make.sh: Fix probing for python2.x and be verbose in error reporting
Diffstat (limited to 'scripts/make.sh')
-rwxr-xr-xscripts/make.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/make.sh b/scripts/make.sh
index ecc92686..52939d7f 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -139,12 +139,17 @@ GLOBSTRUCT="$(getglobals)"
echo "generated/help.h"
# Only recreate generated/help.h if python2 is installed. Does not work with 3.
-PYTHON="$(which python2)"
-if [ ! -z "$PYTHON" ] &&
- [ ! -z "$(grep 'CONFIG_TOYBOX_HELP=y' $KCONFIG_CONFIG)" ]
+PYTHON="$(which python2 || which python2.6 || which python2.7)"
+if [ ! -z "$(grep 'CONFIG_TOYBOX_HELP=y' $KCONFIG_CONFIG)" ];
then
- echo "Extract help text from Config.in."
- "$PYTHON" scripts/config2help.py Config.in > generated/help.h || exit 1
+ if [ -z "$PYTHON" ];
+ then
+ echo "Python 2.x required when CONFIG_TOYBOX_HELP is enabled"
+ exit 1
+ else
+ echo "Extract help text from Config.in."
+ "$PYTHON" scripts/config2help.py Config.in > generated/help.h || exit 1
+ fi
fi
# Extract a list of toys/*/*.c files to compile from the data in $KCONFIG_CONFIG