From afa53e3950abd4727eab9b14275b4805495767b7 Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Fri, 8 Jul 2016 12:42:45 -0700 Subject: Add cts.tasklist cts.tasklist contains tasks run only for CTS. These tasks are added to the tasks registered in ec.tasklist with higher priority. This design allows board directories to be free from CTS stuff. cts.tasklist can be placed in each suite directory (cts/suite/cts.tasklist). If a suite does not define its own cts.tasklist, the common list is used (i.e. cts/cts.tasklist). BUG=chromium:624520 BRANCH=none TEST=Ran the followings: make buildall make CTS_MODULE=gpio BOARD=nucleo-f072rb make CTS_MODULE=gpio BOARD=stm32l476g-eval Change-Id: Ibb242297ee10a397a8fcb6ff73d8cbc560daa885 Signed-off-by: Daisuke Nojiri Reviewed-on: https://chromium-review.googlesource.com/359445 Reviewed-by: Chris Chen --- Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ac296ad6dd..3b5c4e70d4 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,9 @@ UC_PROJECT:=$(call uppercase,$(PROJECT)) # the board/project/chip/core variables are defined, since some of the configs # are dependent on particular configurations. includes=include core/$(CORE)/include $(dirs) $(out) test +ifdef CTS_MODULE +includes+=cts/$(CTS_MODULE) cts +endif ifeq "$(TEST_BUILD)" "y" _tsk_lst_file:=ec.tasklist _tsk_lst:=$(shell echo "CONFIG_TASK_LIST CONFIG_TEST_TASK_LIST" | \ @@ -66,17 +69,20 @@ ifeq "$(TEST_BUILD)" "y" -D"TASK_TEST(n, r, d, s)=n" -imacros $(_tsk_lst_file) \ -imacros $(PROJECT).tasklist) else ifdef CTS_MODULE - _tsk_lst_file:=$(PROJECT).tasklist - _tsk_lst:=$(shell echo "CONFIG_TASK_LIST" | $(CPP) -P \ - -I$(BDIR) -D"TASK_NOTEST(n, r, d, s)=n" -D"TASK_CTS(n, r, d, s)=n" \ - -D"TASK_ALWAYS(n, r, d, s)=n" -imacros $(_tsk_lst_file)) + _tsk_lst_file:=ec.tasklist + _tsk_lst:=$(shell echo "CONFIG_TASK_LIST CONFIG_CTS_TASK_LIST" | \ + $(CPP) -P -I cts/$(CTS_MODULE) -Icts -I$(BDIR) \ + -D"TASK_NOTEST(n, r, d, s)=n" \ + -D"TASK_ALWAYS(n, r, d, s)=n" \ + -imacros $(_tsk_lst_file) \ + -imacros cts.tasklist) else _tsk_lst_file:=$(PROJECT).tasklist _tsk_lst:=$(shell echo "CONFIG_TASK_LIST" | $(CPP) -P \ -I$(BDIR) -D"TASK_NOTEST(n, r, d, s)=n" \ - -D"TASK_CTS(n, r, d, s)=" \ -D"TASK_ALWAYS(n, r, d, s)=n" -imacros $(_tsk_lst_file)) endif + _tsk_cfg:=$(foreach t,$(_tsk_lst) ,HAS_TASK_$(t)) CPPFLAGS+=$(foreach t,$(_tsk_cfg),-D$(t)) _flag_cfg:=$(shell $(CPP) $(CPPFLAGS) -P -dM -Ichip/$(CHIP) -I$(BDIR) \ -- cgit v1.2.1