aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Marec <frederic.marec@iot.bzh>2019-12-02 15:12:15 +0100
committerFrederic Marec <frederic.marec@iot.bzh>2020-01-29 15:20:42 +0100
commit55664fc482d92c9aea3b0c9c7eec45929f708b81 (patch)
tree51d8a31b0242204723905d8139fd494c029c0357
parent5dea708711fb10b3c02f2d8970a9ebe381feb620 (diff)
Update autobuild script to create new targetssandbox/DDTLK/autobuild
Update autobuild script to create multiple widget target debug, coverage and all Bug-AGL: SPEC-2049 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh> Change-Id: Idee4a2f36a69ad2e912c8e4133031c4dcb4a38e7
-rwxr-xr-xautobuild/agl/autobuild85
-rwxr-xr-xautobuild/linux/autobuild85
2 files changed, 166 insertions, 4 deletions
diff --git a/autobuild/agl/autobuild b/autobuild/agl/autobuild
index db00c1a..1cf57ff 100755
--- a/autobuild/agl/autobuild
+++ b/autobuild/agl/autobuild
@@ -18,7 +18,7 @@ THISFILE := $(lastword $(MAKEFILE_LIST))
BUILD_DIR := $(abspath $(dir $(THISFILE))/../../build)
DEST := ${BUILD_DIR}
-.PHONY: all clean distclean configure build package help update
+.PHONY: all clean distclean configure build package help update configure-debug configure-coverage build-debug build-coverage package-test package-debug package-coverage package-debug package-debug-test package-coverage-test package-all package-all-1 package-all-2
all: help
@@ -49,9 +49,30 @@ configure:
@[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
@[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CONFIGURE_ARGS} ..)
+configure-test:
+ @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
+ @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CONFIGURE_ARGS} ..)
+
+configure-debug:
+ @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
+ @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=DEBUG ${CONFIGURE_ARGS} ..)
+
+configure-coverage:
+ @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
+ @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=COVERAGE ${CONFIGURE_ARGS} ..)
+
build: configure
@cmake --build ${BUILD_DIR} ${BUILD_ARGS} --target all
+build-test: configure-test
+ @cmake --build ${BUILD_DIR} ${BUILD_ARGS} --target all
+
+build-debug: configure-debug
+ @cmake --build ${BUILD_DIR} ${BUILD_ARGS} --target all
+
+build-coverage: configure-coverage
+ @cmake --build ${BUILD_DIR} ${BUILD_ARGS} --target all
+
package: build
@mkdir -p ${BUILD_DIR}/$@/bin
@mkdir -p ${BUILD_DIR}/$@/etc
@@ -62,8 +83,64 @@ package: build
@if [ "${DEST}" != "${BUILD_DIR}" ]; then \
mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-test: build-test
+ @mkdir -p ${BUILD_DIR}/$@/bin
+ @mkdir -p ${BUILD_DIR}/$@/etc
+ @mkdir -p ${BUILD_DIR}/$@/lib
+ @mkdir -p ${BUILD_DIR}/$@/htdocs
+ @mkdir -p ${BUILD_DIR}/$@/var
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target test_widget
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-debug: build-debug
+ @mkdir -p ${BUILD_DIR}/$@/bin
+ @mkdir -p ${BUILD_DIR}/$@/etc
+ @mkdir -p ${BUILD_DIR}/$@/lib
+ @mkdir -p ${BUILD_DIR}/$@/htdocs
+ @mkdir -p ${BUILD_DIR}/$@/var
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-coverage: build-coverage
+ @mkdir -p ${BUILD_DIR}/$@/bin
+ @mkdir -p ${BUILD_DIR}/$@/etc
+ @mkdir -p ${BUILD_DIR}/$@/lib
+ @mkdir -p ${BUILD_DIR}/$@/htdocs
+ @mkdir -p ${BUILD_DIR}/$@/var
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-coverage-test: build-coverage
+ @mkdir -p ${BUILD_DIR}/$@/bin
+ @mkdir -p ${BUILD_DIR}/$@/etc
+ @mkdir -p ${BUILD_DIR}/$@/lib
+ @mkdir -p ${BUILD_DIR}/$@/htdocs
+ @mkdir -p ${BUILD_DIR}/$@/var
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target test_widget
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
-package-test: build
+package-debug-test: build-debug
@mkdir -p ${BUILD_DIR}/$@/bin
@mkdir -p ${BUILD_DIR}/$@/etc
@mkdir -p ${BUILD_DIR}/$@/lib
@@ -74,6 +151,10 @@ package-test: build
@if [ "${DEST}" != "${BUILD_DIR}" ]; then \
mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-all: package package-test package-coverage package-debug
install: build
@cmake --build ${BUILD_DIR} ${INSTALL_ARGS} --target install
diff --git a/autobuild/linux/autobuild b/autobuild/linux/autobuild
index db00c1a..1cf57ff 100755
--- a/autobuild/linux/autobuild
+++ b/autobuild/linux/autobuild
@@ -18,7 +18,7 @@ THISFILE := $(lastword $(MAKEFILE_LIST))
BUILD_DIR := $(abspath $(dir $(THISFILE))/../../build)
DEST := ${BUILD_DIR}
-.PHONY: all clean distclean configure build package help update
+.PHONY: all clean distclean configure build package help update configure-debug configure-coverage build-debug build-coverage package-test package-debug package-coverage package-debug package-debug-test package-coverage-test package-all package-all-1 package-all-2
all: help
@@ -49,9 +49,30 @@ configure:
@[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
@[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CONFIGURE_ARGS} ..)
+configure-test:
+ @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
+ @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CONFIGURE_ARGS} ..)
+
+configure-debug:
+ @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
+ @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=DEBUG ${CONFIGURE_ARGS} ..)
+
+configure-coverage:
+ @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
+ @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=COVERAGE ${CONFIGURE_ARGS} ..)
+
build: configure
@cmake --build ${BUILD_DIR} ${BUILD_ARGS} --target all
+build-test: configure-test
+ @cmake --build ${BUILD_DIR} ${BUILD_ARGS} --target all
+
+build-debug: configure-debug
+ @cmake --build ${BUILD_DIR} ${BUILD_ARGS} --target all
+
+build-coverage: configure-coverage
+ @cmake --build ${BUILD_DIR} ${BUILD_ARGS} --target all
+
package: build
@mkdir -p ${BUILD_DIR}/$@/bin
@mkdir -p ${BUILD_DIR}/$@/etc
@@ -62,8 +83,64 @@ package: build
@if [ "${DEST}" != "${BUILD_DIR}" ]; then \
mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-test: build-test
+ @mkdir -p ${BUILD_DIR}/$@/bin
+ @mkdir -p ${BUILD_DIR}/$@/etc
+ @mkdir -p ${BUILD_DIR}/$@/lib
+ @mkdir -p ${BUILD_DIR}/$@/htdocs
+ @mkdir -p ${BUILD_DIR}/$@/var
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target test_widget
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-debug: build-debug
+ @mkdir -p ${BUILD_DIR}/$@/bin
+ @mkdir -p ${BUILD_DIR}/$@/etc
+ @mkdir -p ${BUILD_DIR}/$@/lib
+ @mkdir -p ${BUILD_DIR}/$@/htdocs
+ @mkdir -p ${BUILD_DIR}/$@/var
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-coverage: build-coverage
+ @mkdir -p ${BUILD_DIR}/$@/bin
+ @mkdir -p ${BUILD_DIR}/$@/etc
+ @mkdir -p ${BUILD_DIR}/$@/lib
+ @mkdir -p ${BUILD_DIR}/$@/htdocs
+ @mkdir -p ${BUILD_DIR}/$@/var
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-coverage-test: build-coverage
+ @mkdir -p ${BUILD_DIR}/$@/bin
+ @mkdir -p ${BUILD_DIR}/$@/etc
+ @mkdir -p ${BUILD_DIR}/$@/lib
+ @mkdir -p ${BUILD_DIR}/$@/htdocs
+ @mkdir -p ${BUILD_DIR}/$@/var
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target widget
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target test_widget
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
-package-test: build
+package-debug-test: build-debug
@mkdir -p ${BUILD_DIR}/$@/bin
@mkdir -p ${BUILD_DIR}/$@/etc
@mkdir -p ${BUILD_DIR}/$@/lib
@@ -74,6 +151,10 @@ package-test: build
@if [ "${DEST}" != "${BUILD_DIR}" ]; then \
mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
fi
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-all: package package-test package-coverage package-debug
install: build
@cmake --build ${BUILD_DIR} ${INSTALL_ARGS} --target install