aboutsummaryrefslogtreecommitdiffstats
path: root/conf.d/autobuild
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-07-11 17:52:03 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-07-11 17:53:34 +0200
commit68893af454f87fdbff3138dd9a87d5f5008021f8 (patch)
tree92cb0b6a00b970f061f66c3b98bbc59b7b6ccb2e /conf.d/autobuild
parente75bc1833664ec34852d38a46e133334c19ac58c (diff)
Fix: autobuild script errors when no DEST definied
Change-Id: I8b8113e6c8b36b8e9040a41e9a575856153f817f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'conf.d/autobuild')
-rwxr-xr-xconf.d/autobuild/agl/autobuild21
-rwxr-xr-xconf.d/autobuild/linux/autobuild21
2 files changed, 34 insertions, 8 deletions
diff --git a/conf.d/autobuild/agl/autobuild b/conf.d/autobuild/agl/autobuild
index 31e29f7e..759f6be4 100755
--- a/conf.d/autobuild/agl/autobuild
+++ b/conf.d/autobuild/agl/autobuild
@@ -16,10 +16,24 @@
THISFILE := $(lastword $(MAKEFILE_LIST))
BUILD_DIR := $(abspath $(dir $(THISFILE)/../../../../..)/build)
+DEST := ${BUILD_DIR}/target
-.PHONY: all clean distclean configure build package
+.PHONY: all clean distclean configure build package help
-all: build
+all: help
+
+help:
+ @echo "List of targets available:"
+ @echo ""
+ @echo "- all"
+ @echo "- clean"
+ @echo "- distclean"
+ @echo "- configure"
+ @echo "- build"
+ @echo "- package"
+ @echo ""
+ @echo "Usage: ./conf.d/autobuild/agl/autobuild package DEST=${HOME}/opt"
+ @echo "Don't use your build dir as DEST as wgt file is generated at this location"
clean:
@([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} clean) || echo Nothing to clean
@@ -38,9 +52,8 @@ package: build
@mkdir -p ${BUILD_DIR}/$@/lib
@mkdir -p ${BUILD_DIR}/$@/htdocs
@mkdir -p ${BUILD_DIR}/$@/data
- @[ "${DEST}" ] && mkdir -p ${DEST}
@cmake --build ${BUILD_DIR} --target widget
- @[ "${DEST}" ] && cp ${BUILD_DIR}/*wgt ${DEST}
+ @mkdir -p ${DEST} && cp ${BUILD_DIR}/*wgt ${DEST}
${BUILD_DIR}/Makefile:
@[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
diff --git a/conf.d/autobuild/linux/autobuild b/conf.d/autobuild/linux/autobuild
index 31e29f7e..759f6be4 100755
--- a/conf.d/autobuild/linux/autobuild
+++ b/conf.d/autobuild/linux/autobuild
@@ -16,10 +16,24 @@
THISFILE := $(lastword $(MAKEFILE_LIST))
BUILD_DIR := $(abspath $(dir $(THISFILE)/../../../../..)/build)
+DEST := ${BUILD_DIR}/target
-.PHONY: all clean distclean configure build package
+.PHONY: all clean distclean configure build package help
-all: build
+all: help
+
+help:
+ @echo "List of targets available:"
+ @echo ""
+ @echo "- all"
+ @echo "- clean"
+ @echo "- distclean"
+ @echo "- configure"
+ @echo "- build"
+ @echo "- package"
+ @echo ""
+ @echo "Usage: ./conf.d/autobuild/agl/autobuild package DEST=${HOME}/opt"
+ @echo "Don't use your build dir as DEST as wgt file is generated at this location"
clean:
@([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} clean) || echo Nothing to clean
@@ -38,9 +52,8 @@ package: build
@mkdir -p ${BUILD_DIR}/$@/lib
@mkdir -p ${BUILD_DIR}/$@/htdocs
@mkdir -p ${BUILD_DIR}/$@/data
- @[ "${DEST}" ] && mkdir -p ${DEST}
@cmake --build ${BUILD_DIR} --target widget
- @[ "${DEST}" ] && cp ${BUILD_DIR}/*wgt ${DEST}
+ @mkdir -p ${DEST} && cp ${BUILD_DIR}/*wgt ${DEST}
${BUILD_DIR}/Makefile:
@[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}