Make Argeo Build able to build itself
authorMathieu <mbaudier@argeo.org>
Sat, 11 Mar 2023 07:35:13 +0000 (08:35 +0100)
committerMathieu <mbaudier@argeo.org>
Sat, 11 Mar 2023 07:35:13 +0000 (08:35 +0100)
.gitignore
configure
configure.template [new file with mode: 0755]

index fbfcfb6d32680f4ec3ba72e7464eb97d52b23598..d1677f4f30890878fedc5c99e87febb910c1c957 100644 (file)
@@ -1,3 +1,5 @@
 .project
 *.class
 /bin/
+/sdk.mk
+/output
index 5d3e45ed8031809c5a2f00bbb68edd3b5a1aeb26..e5031d7616aec131166349effffd5062559376c4 100755 (executable)
--- 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
diff --git a/configure.template b/configure.template
new file mode 100755 (executable)
index 0000000..47f7d96
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Source are located where this script is
+SDK_SRC_BASE="$(cd "$(dirname "$0")"; pwd -P)"
+
+# Source the configure script
+. $SDK_SRC_BASE/sdk/argeo-build/configure