summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaquel Medina <raquel.medina@konsulko.com>2020-03-12 15:11:20 +0100
committerRaquel Medina <raquel.medina@konsulko.com>2020-03-12 15:14:53 +0100
commit1f5d7f42bc6835ffb910d8384cc7dff5ea66afa3 (patch)
tree1adec37b2774e3e20b0da24b733b5a83386207cb
parentbba7642118e223492bf5a82eb3fed04a59e34c2c (diff)
update autobuild scripts
Modify autobuild scripts: - to fix warnings on yocto build - to fix linux/autobuild syntax errors - to add new standard targets Bug-AGL: SPEC-2049 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I8caa4d8ff70bf4cfe0f05eb05a1502d80c606a68
-rwxr-xr-xautobuild/agl/autobuild49
-rwxr-xr-xautobuild/linux/autobuild93
2 files changed, 111 insertions, 31 deletions
diff --git a/autobuild/agl/autobuild b/autobuild/agl/autobuild
index a14fd78..95b79ca 100755
--- a/autobuild/agl/autobuild
+++ b/autobuild/agl/autobuild
@@ -16,6 +16,9 @@
THISFILE := $(lastword $(MAKEFILE_LIST))
BUILD_DIR := $(abspath $(dir $(THISFILE))/../../build)
+BUILD_DIR_TEST := $(abspath $(dir $(THISFILE))/../../build-test)
+BUILD_DIR_DEBUG := $(abspath $(dir $(THISFILE))/../../build-debug)
+BUILD_DIR_COVERAGE := $(abspath $(dir $(THISFILE))/../../build-coverage)
DEST := ${BUILD_DIR}
.PHONY: all clean distclean configure build package help
@@ -31,7 +34,7 @@ help:
@echo "- configure"
@echo "- build: compilation, link and prepare files for package into a widget"
@echo "- package: output a widget file '*.wgt'"
- @echo "- install: install in the path specified by the qmake project files"
+ @echo "- install: install in your defined DEST directory"
@echo ""
@echo "Usage: ./autobuild/agl/autobuild package DEST=${HOME}/opt"
@echo "Don't use your build dir as DEST as wgt file is generated at this location"
@@ -40,20 +43,56 @@ clean:
@([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} ${CLEAN_ARGS} clean) || echo Nothing to clean
distclean:
+ @[ -d ${DEST} ] && find ${DEST} -name "*.wgt" -delete
@([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} distclean) || echo Nothing to distclean
configure:
@[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
@[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && qmake ${CONFIGURE_ARGS} ..)
+configure-test:
+ @[ -d ${BUILD_DIR_TEST} ] || mkdir -p ${BUILD_DIR_TEST}
+ @[ -f ${BUILD_DIR_TEST}/Makefile ] || (cd ${BUILD_DIR_TEST} && qmake ${CONFIGURE_ARGS} ..)
+
+configure-debug:
+ @[ -d ${BUILD_DIR_DEBUG} ] || mkdir -p ${BUILD_DIR_DEBUG}
+ @[ -f ${BUILD_DIR_DEBUG}/Makefile ] || (cd ${BUILD_DIR_DEBUG} && qmake ${CONFIGURE_ARGS} ..)
+
+configure-coverage:
+ @[ -d ${BUILD_DIR_COVERAGE} ] || mkdir -p ${BUILD_DIR_COVERAGE}
+ @[ -f ${BUILD_DIR_COVERAGE}/Makefile ] || (cd ${BUILD_DIR_COVERAGE} && qmake ${CONFIGURE_ARGS} ..)
build: configure
@make -C ${BUILD_DIR} ${BUILD_ARGS} all
+build-test: configure-test
+ @make -C ${BUILD_DIR_TEST} ${BUILD_ARGS} all
+
+build-debug: configure-debug
+ @make -C ${BUILD_DIR_DEBUG} ${BUILD_ARGS} all
+
+build-coverage: configure-coverage
+ @make -C ${BUILD_DIR_COVERAGE} ${BUILD_ARGS} all
+
+install: build
+ @make -C ${BUILD_DIR} ${INSTALL_ARGS} install
package: build
- @mkdir -p ${DEST}
@if [ "${DEST}" != "${BUILD_DIR}/$@" ]; then \
- cp ${BUILD_DIR}/$@/*.wgt ${DEST}; \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/$@/*.wgt ${DEST}; \
fi
-install: build
- @make -C ${BUILD_DIR} ${INSTALL_ARGS} install
+package-test: build-test
+ @if [ "${DEST}" != "${BUILD_DIR_TEST}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR_TEST}/package/*.wgt ${DEST}; \
+ fi
+
+package-debug: build-debug
+ @if [ "${DEST}" != "${BUILD_DIR_DEBUG}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR_DEBUG}/package/*.wgt ${DEST}; \
+ fi
+
+package-coverage: build-coverage
+ @if [ "${DEST}" != "${BUILD_DIR_COVERAGE}" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR_COVERAGE}/package/*.wgt ${DEST}; \
+ fi
+
+package-all: package package-test package-coverage package-debug
diff --git a/autobuild/linux/autobuild b/autobuild/linux/autobuild
index 569d692..1ab320d 100755
--- a/autobuild/linux/autobuild
+++ b/autobuild/linux/autobuild
@@ -16,47 +16,88 @@
THISFILE := $(lastword $(MAKEFILE_LIST))
BUILD_DIR := $(abspath $(dir $(THISFILE))/../../build)
+BUILD_DIR_TEST := $(abspath $(dir $(THISFILE))/../../build-test)
+BUILD_DIR_DEBUG := $(abspath $(dir $(THISFILE))/../../build-debug)
+BUILD_DIR_COVERAGE := $(abspath $(dir $(THISFILE))/../../build-coverage)
DEST := ${BUILD_DIR}
-.PHONY: all clean distclean configure build package help update
+.PHONY: all clean distclean configure build package help
all: help
help:
- @echo "List of targets available:"
- @echo ""
- @echo "- all
- @echo "- clean"
- @echo "- distclean"
- @echo "- configure"
- @echo "- build: compilation, link and prepare files for package into a widget"
- @echo "- package: output a widget file '*.wgt'"
- @echo "- install: install in your defined DEST directory"
- @echo ""
- @echo "Usage: ./autobuild/agl/autobuild package DEST=${HOME}/opt"
- @echo "Don't use your build dir as DEST as wgt file is generated at this location"
+ @echo "List of targets available:"
+ @echo ""
+ @echo "- all"
+ @echo "- clean"
+ @echo "- distclean"
+ @echo "- configure"
+ @echo "- build: compilation, link and prepare files for package into a widget"
+ @echo "- package: output a widget file '*.wgt'"
+ @echo "- install: install in your defined DEST directory"
+ @echo ""
+ @echo "Usage: ./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_ARGS} clean) || echo Nothing to clean
+ @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} ${CLEAN_ARGS} clean) || echo Nothing to clean
distclean:
- @[ -d ${DEST} ] && find ${DEST} -name "*.wgt" -delete
- @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} distclean) || echo Nothing to distclean
+ @[ -d ${DEST} ] && find ${DEST} -name "*.wgt" -delete
+ @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} distclean) || echo Nothing to distclean
configure:
- @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
- @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && qmake ${CONFIGURE_ARGS} ..)
+ @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
+ @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && qmake ${CONFIGURE_ARGS} ..)
+
+configure-test:
+ @[ -d ${BUILD_DIR_TEST} ] || mkdir -p ${BUILD_DIR_TEST}
+ @[ -f ${BUILD_DIR_TEST}/Makefile ] || (cd ${BUILD_DIR_TEST} && qmake ${CONFIGURE_ARGS} ..)
+
+configure-debug:
+ @[ -d ${BUILD_DIR_DEBUG} ] || mkdir -p ${BUILD_DIR_DEBUG}
+ @[ -f ${BUILD_DIR_DEBUG}/Makefile ] || (cd ${BUILD_DIR_DEBUG} && qmake ${CONFIGURE_ARGS} ..)
+
+configure-coverage:
+ @[ -d ${BUILD_DIR_COVERAGE} ] || mkdir -p ${BUILD_DIR_COVERAGE}
+ @[ -f ${BUILD_DIR_COVERAGE}/Makefile ] || (cd ${BUILD_DIR_COVERAGE} && qmake ${CONFIGURE_ARGS} ..)
build: configure
- @make -C ${BUILD_DIR} ${BUILD_ARGS} all
+ @make -C ${BUILD_DIR} ${BUILD_ARGS} all
-package: build
- @if [ "${DEST}" != "${BUILD_DIR}/$@" ]; then \
- mkdir -p ${DEST} && cp ${BUILD_DIR}/$@/*.wgt ${DEST}; \
- fi
+build-test: configure-test
+ @make -C ${BUILD_DIR_TEST} ${BUILD_ARGS} all
+
+build-debug: configure-debug
+ @make -C ${BUILD_DIR_DEBUG} ${BUILD_ARGS} all
+
+build-coverage: configure-coverage
+ @make -C ${BUILD_DIR_COVERAGE} ${BUILD_ARGS} all
install: build
- @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
- mkdir -p ${DEST} && cp -rf ${BUILD_DIR}/package/root/* ${DEST}; \
- fi
+ @if [ "${DEST}" != "${BUILD_DIR}" ]; then \
+ mkdir -p ${DEST} && cp -rf ${BUILD_DIR}/package/root/* ${DEST}; \
+ fi
+
+package: build
+ @if [ "${DEST}" != "${BUILD_DIR}/$@" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR}/$@/*.wgt ${DEST}; \
+ fi
+
+package-test: build-test
+ @if [ "${DEST}" != "${BUILD_DIR_TEST}/$@" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR_TEST}/package/*.wgt ${DEST}; \
+ fi
+
+package-debug: build-debug
+ @if [ "${DEST}" != "${BUILD_DIR_DEBUG}/package" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR_DEBUG}/package/*.wgt ${DEST}; \
+ fi
+
+package-coverage: build-coverage
+ @if [ "${DEST}" != "${BUILD_DIR_COVERAGE}/package" ]; then \
+ mkdir -p ${DEST} && cp ${BUILD_DIR_COVERAGE}/package/*.wgt ${DEST}; \
+ fi
+
+package-all: package package-test package-coverage package-debug