Implement AGLBuild script following SPEC-495 from JIRA
authorRomain Forlot <romain.forlot@iot.bzh>
Tue, 2 May 2017 15:22:58 +0000 (17:22 +0200)
committerRomain Forlot <romain.forlot@iot.bzh>
Tue, 2 May 2017 15:23:41 +0000 (17:23 +0200)
See: https://jira.automotivelinux.org/browse/SPEC-495
Needed as entry point for Yocto chain build.

Change-Id: Id2d5d68fc0aa32ff9f52d2d176e68ac4de7353e7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
CAN-binder/AGLBuild.mk

index 1adb0e4..ccbc28b 100755 (executable)
@@ -16,8 +16,6 @@
 
 BUILD_DIR   := build
 PACKAGING_DIR := packaging/wgt
-PACKAGING_FILE := $(PACKAGING_DIR)/package.in
-PKG_FILELIST := $(shell cat $(PACKAGING_FILE))
 
 VPATH = etc:$(PACKAGING_DIR):$(PACKAGING_DIR)/etc:$(BUILD_DIR)
 
@@ -32,13 +30,12 @@ mrproper:
        rm -rf ${BUILD_DIR}
 
 build:  ${BUILD_DIR}/Makefile
-       cmake --build ${BUILD_DIR} --clean-first
+       cmake --build ${BUILD_DIR} --target all
 
-package: config.xml icon.png | $(PKG_FILELIST)
+package: config.xml.in icon.png.in build | $(PKG_FILELIST)
        mkdir -p ${BUILD_DIR}/$@/{bin,etc,lib,htdocs,data}
-       cp -r $(filter %.so, $|) ${BUILD_DIR}/$@/lib
-       cp -r $(filter %.cfg %.conf %.cnf %.ini, $|) ${BUILD_DIR}/$@/etc
+       cmake --build ${BUILD_DIR} --target widget
 
 ${BUILD_DIR}/Makefile:
        @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
-       @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CMAKE_OPTS} ..)
+       @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CMAKE_OPTS} ..)
\ No newline at end of file