summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-04-04 21:38:22 +0800
committerChromeBot <chrome-bot@google.com>2013-04-10 01:08:45 -0700
commit8a06eb1d35cb460fb5669c720262d437f54b0101 (patch)
tree9a029fc001ed24bf023f89d35b5696926085e539 /Makefile
parent64ae15f3b3c743a8b98af7754871c0ba7470becd (diff)
downloadchrome-ec-8a06eb1d35cb460fb5669c720262d437f54b0101.tar.gz
Only includes necessary tasks for test binaries
This changes current TASK() syntax to TASK_BASE() and TASK_NORMAL(), where TASK_BASE is necessary for the EC to boot on a board and TASK_NORMAL represents the task that can be removed in a test binary. Tasks introduced by a test should be listed as TASK_TEST(). Note that this CL breaks current tests (many of them are broken anyway), which will be fixed in up coming CLs. BUG=chrome-os-partner:18598 TEST=Build link/bds/spring/snow/daisy/mccroskey. (mccroskey failed for unrelated issue) BRANCH=none Change-Id: Ic645cdae0906ed21dc473553f1f43c2537ec4bb9 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47531
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 5fae04b54a..38a8fc0d55 100644
--- a/Makefile
+++ b/Makefile
@@ -19,9 +19,18 @@ include board/$(BOARD)/build.mk
# Transform the configuration into make variables
includes=include core/$(CORE)/include $(dirs) $(out)
-_tsk_lst:=$(shell echo "CONFIG_TASK_LIST" | $(CPP) -P -Iboard/$(BOARD) -Itest \
- -D"TASK(n, r, d, s)=n" -imacros $(PROJECT).tasklist)
-_tsk_cfg:=$(foreach t,$(_tsk_lst),CONFIG_TASK_$(t))
+ifeq "$(TEST_BUILD)" "y"
+ _tsk_lst:=$(shell echo "CONFIG_TASK_LIST CONFIG_TEST_TASK_LIST" | \
+ $(CPP) -P -Iboard/$(BOARD) -Itest \
+ -D"TASK_NOTEST(n, r, d, s)=" -D"TASK_ALWAYS(n, r, d, s)=n" \
+ -D"TASK_TEST(n, r, d, s)=n" -imacros ec.tasklist \
+ -imacros $(PROJECT).tasklist)
+else
+ _tsk_lst:=$(shell echo "CONFIG_TASK_LIST" | $(CPP) -P \
+ -Iboard/$(BOARD) -D"TASK_NOTEST(n, r, d, s)=n" \
+ -D"TASK_ALWAYS(n, r, d, s)=n" -imacros ec.tasklist)
+endif
+_tsk_cfg:=$(foreach t,$(_tsk_lst) ,CONFIG_TASK_$(t))
_flag_cfg:=$(shell $(CPP) $(CPPFLAGS) -P -dN chip/$(CHIP)/config.h | \
grep -o "CONFIG_.*") \
$(shell $(CPP) $(CPPFLAGS) -P -dN board/$(BOARD)/board.h | \