X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=configure;h=c92b6706c8cbc1755dd786c653bcc336a5745d71;hb=HEAD;hp=4adf1c0cb842d5e3049bef17f6d7e07cea75b58a;hpb=430e8302bbbe7856ed3223a4966c61382c5d5075;p=cc0%2Fargeo-build.git diff --git a/configure b/configure index 4adf1c0..c92b670 100755 --- a/configure +++ b/configure @@ -3,11 +3,20 @@ # We build where we are SDK_BUILD_BASE=$(pwd -P)/output +if [ -z "$SDK_SRC_BASE" ] +then +echo Script variable SDK_SRC_BASE must be set in the calling \'configure\' script, +echo to the root location of the sources, typically with such a pattern: +echo 'SDK_SRC_BASE="$(cd "$(dirname "$0")"; pwd -P)"' +echo "(see 'configure.template' from the argeo-build directory)" +echo In order to build Argeo Build itself, explicitly set SDK_SRC_BASE as an environment variable +exit 1 +fi + SDK_MK=$SDK_SRC_BASE/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 @@ -16,8 +25,8 @@ else if [ -z "$JAVA_HOME" ] then -echo "Environment variable JAVA_HOME must be set" -exit 1 +JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java)))) +echo "Environment variable JAVA_HOME not set, using $JAVA_HOME of $(which java)" fi # Create build directory, so that it can be used right away @@ -35,8 +44,8 @@ SDK_SRC_BASE := $SDK_SRC_BASE SDK_BUILD_BASE := $SDK_BUILD_BASE JAVA_HOME := $JAVA_HOME -include \$(SDK_SRC_BASE)/branch.mk -include $(SDK_SRC_BASE)/sdk/branches/$(BRANCH).bnd +-include \$(SDK_SRC_BASE)/branch.mk +-include \$(SDK_SRC_BASE)/sdk/branches/\$(BRANCH).bnd EOF