X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=conf.d%2Fautobuild%2Flinux%2Fautobuild;h=83097ab8795e5ed63703d447cd7de38f5070895b;hb=7c5d80deacad2a1f6943dd0b77449c3f6e20fdfc;hp=dc3bdec82b099bb99650702be44b8e5fd5ef51c6;hpb=02f4f432ec885e937904a0968c0ec2505f432d8f;p=apps%2Fagl-service-can-low-level.git diff --git a/conf.d/autobuild/linux/autobuild b/conf.d/autobuild/linux/autobuild index dc3bdec8..83097ab8 100755 --- a/conf.d/autobuild/linux/autobuild +++ b/conf.d/autobuild/linux/autobuild @@ -16,10 +16,28 @@ 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 update -all: build +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 ${CMAKE_INSTALL_DIR} directory" + @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" + +update: configure + @cmake --build ${BUILD_DIR} --target autobuild clean: @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} clean) || echo Nothing to clean @@ -37,10 +55,12 @@ package: build @mkdir -p ${BUILD_DIR}/$@/etc @mkdir -p ${BUILD_DIR}/$@/lib @mkdir -p ${BUILD_DIR}/$@/htdocs - @mkdir -p ${BUILD_DIR}/$@/data - @mkdir -p ${DEST} + @mkdir -p ${BUILD_DIR}/$@/var @cmake --build ${BUILD_DIR} --target widget - @cp ${BUILD_DIR}/*wgt ${DEST} + @mkdir -p ${DEST} && cp ${BUILD_DIR}/*wgt ${DEST} + +install: build + @cmake --build ${BUILD_DIR} --target install ${BUILD_DIR}/Makefile: @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}