From: Mathieu Baudier Date: Thu, 27 Jan 2022 11:21:56 +0000 (+0100) Subject: SDK system based on Makefiles X-Git-Tag: argeo-commons-2.3.5~53 X-Git-Url: https://git.argeo.org/?a=commitdiff_plain;h=163f18fdace8b3171abe3a3b2282d040b205e0c8;hp=e80536ca309c45ffeba49c8c3e3e698ba6910203;p=lgpl%2Fargeo-commons.git SDK system based on Makefiles --- diff --git a/.gitignore b/.gitignore index 492e809ea..fab481bb9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ **/target/ **/generated/ **/MANIFEST.MF +/build/ +/sdk.mk diff --git a/Makefile b/Makefile index d57f2a7e6..649560c5a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ MAKEDIRS = org.argeo.api.uuid +BUILD_BASE=generated + .PHONY: clean all all: $(foreach dir, $(MAKEDIRS), $(MAKE) -C $(dir);) @@ -7,4 +9,3 @@ all: clean: $(foreach dir, $(MAKEDIRS), $(MAKE) -C $(dir) clean;) -include sdk.mk \ No newline at end of file diff --git a/branch.properties b/branch.properties new file mode 100644 index 000000000..7a7e579b7 --- /dev/null +++ b/branch.properties @@ -0,0 +1,2 @@ +MAJOR=2 +MINOR=3 diff --git a/configure b/configure new file mode 100644 index 000000000..c92fa222f --- /dev/null +++ b/configure @@ -0,0 +1,48 @@ +#!/bin/sh + +# We build where we are +SDK_BUILD_BASE=$(pwd -P)/build + +# 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 + +# 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" <