summaryrefslogtreecommitdiffstats
path: root/autobuild/linux
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-07-11 09:15:40 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:47 +0200
commit75650be20559b34f27708f7f5b5d4a340194b610 (patch)
tree28df32bc2c590052b1061d0a0bc5f199794f432a /autobuild/linux
parentfb95249a8a4a214f065cb459ed0579907d44004c (diff)
Linux autobuild script more verbose and usable
Adding a help message and ensure DEST variable is set Change-Id: I486c6a21b41c2912e92007ee522af6fe4e8ceb71 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'autobuild/linux')
-rwxr-xr-xautobuild/linux/autobuild.in22
1 files changed, 19 insertions, 3 deletions
diff --git a/autobuild/linux/autobuild.in b/autobuild/linux/autobuild.in
index 17fae7a..ed39429 100755
--- a/autobuild/linux/autobuild.in
+++ b/autobuild/linux/autobuild.in
@@ -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,8 +52,10 @@ 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 packaging
+ @cmake --build ${BUILD_DIR} --target widget
+ @mkdir -p ${DEST} && cp ${BUILD_DIR}/*wgt ${DEST}
+
${BUILD_DIR}/Makefile:
@[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}