diff options
author | Frederic Marec <frederic.marec@iot.bzh> | 2019-11-21 17:18:44 +0100 |
---|---|---|
committer | Frederic Marec <frederic.marec@iot.bzh> | 2020-02-13 09:58:02 +0100 |
commit | fac0cc39cd223a2b96eb916107383f497b16f361 (patch) | |
tree | 558e7632faad6567d7abf075f1a040e011966cc3 | |
parent | 4d0948a2eeb60522b773d058f63418fd640d78c5 (diff) |
Bump autobuild following cmake module changessandbox/DDTLK/autobuild
Bug-AGL: SPEC-2049
Change-Id: I41ec52655ce37be731df921d383397d5d5b51ad1
Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
-rwxr-xr-x | autobuild/agl/autobuild | 88 | ||||
-rwxr-xr-x | autobuild/linux/autobuild | 88 | ||||
-rw-r--r-- | src/aft.c | 4 |
3 files changed, 172 insertions, 8 deletions
diff --git a/autobuild/agl/autobuild b/autobuild/agl/autobuild index db00c1a..403b967 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 @@ -47,11 +47,32 @@ distclean: configure: @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR} - @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CONFIGURE_ARGS} ..) + @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=RELEASE ${CONFIGURE_ARGS} ..) + +configure-test: + @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR} + @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=RELEASE ${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,65 @@ 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 +152,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..403b967 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 @@ -47,11 +47,32 @@ distclean: configure: @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR} - @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CONFIGURE_ARGS} ..) + @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=RELEASE ${CONFIGURE_ARGS} ..) + +configure-test: + @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR} + @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=RELEASE ${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,65 @@ 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 +152,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 @@ -222,11 +222,11 @@ static int CtrlLoadOneApi(void *cbdata, afb_api_t apiHandle) { } static CtlConfigT *CtrlLoadConfigJson(afb_api_t apiHandle, json_object *configJ) { - return CtlLoadMetaDataJson(apiHandle, configJ); + return CtlLoadMetaDataJson(apiHandle, configJ, CONTROL_PREFIX); } static CtlConfigT *CtrlLoadConfigFile(afb_api_t apiHandle, const char *configPath) { - return CtlLoadMetaData(apiHandle, configPath); + return CtlLoadMetaDataUsingPrefix(apiHandle, configPath, CONTROL_PREFIX); } static int CtrlCreateApi(afb_api_t apiHandle, CtlConfigT *ctrlConfig) { |