X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=configure;h=e5031d7616aec131166349effffd5062559376c4;hb=7fc10b339ec1c6bb0e6cb340e1ee374484933e1e;hp=56a8fb7f4509c56919e43ab8151b2d7762e6e0fa;hpb=a261043de5f9d90373bb1e7f395e3371ba9e67ef;p=cc0%2Fargeo-build.git diff --git a/configure b/configure index 56a8fb7..e5031d7 100755 --- a/configure +++ b/configure @@ -3,11 +3,16 @@ # We build where we are SDK_BUILD_BASE=$(pwd -P)/output +if [ -z "$SDK_SRC_BASE" ] +then +SDK_SRC_BASE=$(pwd -P) +echo "Script variable SDK_SRC_BASE not set, assuming Argeo Build is building itself and using the local directory" +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 +21,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 +40,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