X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=configure;fp=configure;h=9b3e9804b04280910d6df08fd74ba0fe4cf4079c;hp=0000000000000000000000000000000000000000;hb=6e56ffa34cb02ab04d028423aea342e3dfed4358;hpb=c285180bece610b2c2921d44fe14b6dde2123efa diff --git a/configure b/configure new file mode 100644 index 0000000..9b3e980 --- /dev/null +++ b/configure @@ -0,0 +1,55 @@ +#!/bin/sh + +# We build where we are +SDK_BUILD_BASE=$(pwd -P)/output + +# Source are located where this script is +SDK_SRC_BASE="$(cd "$(dirname "$0")"; pwd -P)" + +SDK_MK=$SDK_SRC_BASE/sdk.mk + +#echo SDK_BUILD_BASE=$SDK_BUILD_BASE +#echo SDK_SRC_BASE=$SDK_SRC_BASE +#echo SDK_MK=$SDK_MK + +if [ -f "$SDK_MK" ]; +then + +echo "File $SDK_MK already exists. Remove it in order to configure a new build location:" +echo "rm $SDK_MK" +exit 1 + +else + +if [ -z "$JAVA_HOME" ] +then +echo "Environment variable JAVA_HOME must be set" +exit 1 +fi + +# Create build directory, so that it can be used right away +# and we check whether we have the rights +mkdir -p $SDK_BUILD_BASE +if [ -f "$SDK_MK" ]; +then +echo "Cannot create $SDK_BUILD_BASE, SDK configuration has failed." +exit 2 +fi + +# Generate sdk.mk +cat > "$SDK_MK" <