aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Marec <frederic.marec@iot.bzh>2019-12-02 15:12:46 +0100
committerFrederic Marec <frederic.marec@iot.bzh>2019-12-16 09:58:20 +0100
commit4ba5f0e3af0af7295e0e689b63f32e7284f62206 (patch)
treee0b9f4f660adb035c7105c4543978bdb2837d710
parent77b59fd16b1506803aec40c9999fc9890bae83d2 (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: I8f99caaeae41f5df23a3e2d9d4a41b38b82aa4b1
-rwxr-xr-xautobuild/agl/autobuild73
-rwxr-xr-xautobuild/linux/autobuild73
2 files changed, 144 insertions, 2 deletions
diff --git a/autobuild/agl/autobuild b/autobuild/agl/autobuild
index db00c1a..cecc78e 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,23 @@ configure:
@[ -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-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
@@ -75,5 +89,62 @@ package-test: build
mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
fi
+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
+
+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
+
+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
+
+
+package-debug-test: 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
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target test_widget
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
+
+package-all-1: package
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-all-2: package-all-1 package-coverage
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-all: package-all-2 package-debug
+
install: build
@cmake --build ${BUILD_DIR} ${INSTALL_ARGS} --target install
diff --git a/autobuild/linux/autobuild b/autobuild/linux/autobuild
index db00c1a..cecc78e 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,23 @@ configure:
@[ -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-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
@@ -75,5 +89,62 @@ package-test: build
mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
fi
+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
+
+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
+
+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
+
+
+package-debug-test: 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
+ @cmake --build ${BUILD_DIR} ${PACKAGE_ARGS} --target test_widget
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/*.wgt ${DEST}; \
+ fi
+
+package-all-1: package
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-all-2: package-all-1 package-coverage
+ @rm ${BUILD_DIR}/Makefile
+ @rm ${BUILD_DIR}/CMakeCache.txt
+
+package-all: package-all-2 package-debug
+
install: build
@cmake --build ${BUILD_DIR} ${INSTALL_ARGS} --target install