summaryrefslogtreecommitdiffstats
path: root/autobuild
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-28 16:41:56 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:47 +0200
commit6acadd6d5dd5953d44825046add8bb570cf67c51 (patch)
treee16b8dd77c4122fa47154c1fab3beeb115485cdc /autobuild
parent5e928700f46eec4198eefbd09312b201180a8135 (diff)
Autobuild scripts directory execution proof
autobuild scripts can be executed from anywhere we should always have the build directory at the project root path. Change-Id: I4b4be077c4ea986e054deb21f0b8a07d2db5e131 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'autobuild')
-rwxr-xr-xautobuild/agl/autobuild.in6
-rwxr-xr-xautobuild/linux/autobuild.in7
2 files changed, 4 insertions, 9 deletions
diff --git a/autobuild/agl/autobuild.in b/autobuild/agl/autobuild.in
index dd341c4..dc3bdec 100755
--- a/autobuild/agl/autobuild.in
+++ b/autobuild/agl/autobuild.in
@@ -14,10 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-BUILD_DIR := @PROJECT_BINARY_DIR@
-PACKAGING_DIR := @PROJECT_PKG_ENTRY_POINT@
-
-VPATH = etc:$(PACKAGING_DIR):$(PACKAGING_DIR)/etc:$(BUILD_DIR)
+THISFILE := $(lastword $(MAKEFILE_LIST))
+BUILD_DIR := $(abspath $(dir $(THISFILE)/../../../../..)/build)
.PHONY: all clean distclean configure build package
diff --git a/autobuild/linux/autobuild.in b/autobuild/linux/autobuild.in
index c4b5553..85b0323 100755
--- a/autobuild/linux/autobuild.in
+++ b/autobuild/linux/autobuild.in
@@ -14,10 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-BUILD_DIR := @PROJECT_BINARY_DIR@
-PACKAGING_DIR := @PROJECT_PKG_ENTRY_POINT@
-
-VPATH = etc:$(PACKAGING_DIR):$(PACKAGING_DIR)/etc:$(BUILD_DIR)
+THISFILE := $(lastword $(MAKEFILE_LIST))
+BUILD_DIR := $(abspath $(dir $(THISFILE)/../../../../..)/build)
.PHONY: all clean distclean configure build package
@@ -42,7 +40,6 @@ package: build
@mkdir -p ${BUILD_DIR}/$@/data
@mkdir -p ${DEST}
@cmake --build ${BUILD_DIR} --target packaging
- @cmake --build ${BUILD_DIR} --target all
${BUILD_DIR}/Makefile:
@[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}