summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure b/configure
index d00feda380..fec0bfd311 100755
--- a/configure
+++ b/configure
@@ -3,7 +3,7 @@
set -e
set -o pipefail
-CONFIG_FILE=${1:-config.gypi}
+CONFIG_FILE=$1
if [ `uname -s` = 'Darwin' ]; then
MASON_PLATFORM=${MASON_PLATFORM:-osx}
@@ -52,6 +52,18 @@ esac
function abort { >&2 echo -e "\033[1m\033[31m$1\033[0m"; exit 1; }
+if [ -z ${CONFIG_FILE} ]; then
+ abort 'You need to specify an output path for the configuration file'
+fi
+
+if [[ ${MASON_PLATFORM} = 'android' && -z ${MASON_ANDROID_ABI} ]]; then
+ abort 'You need to specify an ABI for android platforms'
+fi
+
+echo -n "MASON_PLATFORM=${MASON_PLATFORM} "
+if [ ${MASON_PLATFORM} = 'android' ]; then echo -n "MASON_ANDROID_ABI=${MASON_ANDROID_ABI} " ; fi
+echo $0 $@
+
PYTHON=`which python || abort 'Cannot find python'`
>&2 echo -en "\033[1m\033[32m* Using "
@@ -164,3 +176,4 @@ CONFIG+=" }
"
echo "${CONFIG}" > ${CONFIG_FILE}
+cat ${CONFIG_FILE}