3 # We build where we are
4 SDK_BUILD_BASE
=$
(pwd -P)/output
6 if [ -z "$SDK_SRC_BASE" ]
8 echo Script variable SDK_SRC_BASE must be
set in the calling
\'configure
\' script,
9 echo to the root location of the sources
, typically with such a pattern
:
10 echo 'SDK_SRC_BASE="$(cd "$(dirname "$0")"; pwd -P)"'
11 echo "(see 'configure.template' from the argeo-build directory)"
12 echo In order to build Argeo Build itself
, explicitly
set SDK_SRC_BASE as an environment variable
16 SDK_MK
=$SDK_SRC_BASE/sdk.mk
20 echo "File $SDK_MK already exists. Remove it in order to configure a new build location:"
26 if [ -z "$JAVA_HOME" ]
28 JAVA_HOME
=$
(dirname $
(dirname $
(readlink
-f $
(which java
))))
29 echo "Environment variable JAVA_HOME not set, using $JAVA_HOME of $(which java)"
32 # Create build directory, so that it can be used right away
33 # and we check whether we have the rights
34 mkdir
-p $SDK_BUILD_BASE
37 echo "Cannot create $SDK_BUILD_BASE, SDK configuration has failed."
43 SDK_SRC_BASE := $SDK_SRC_BASE
44 SDK_BUILD_BASE := $SDK_BUILD_BASE
45 JAVA_HOME := $JAVA_HOME
47 -include \$(SDK_SRC_BASE)/branch.mk
48 -include \$(SDK_SRC_BASE)/sdk/branches/\$(BRANCH).bnd
52 echo SDK was configured.
53 echo "JAVA_HOME : $JAVA_HOME"
54 echo "Base for sources : $SDK_SRC_BASE"
55 echo "Base for builds : $SDK_BUILD_BASE"