diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2016-10-11 17:39:14 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-10-14 16:05:49 -0700 |
commit | c926d7dc7c4df52c7d3c82c86bae9ac6e8a6b758 (patch) | |
tree | 0a8309a8ec84fda0f03e118296233fc6c2200990 /Makefile.rules | |
parent | ce3e350aded53fb54a86057b7a7f18bfbb165f73 (diff) | |
download | chrome-ec-c926d7dc7c4df52c7d3c82c86bae9ac6e8a6b758.tar.gz |
cts: Fix back-to-back build
Currently eCTS suites share the same directory (e.g. build/stm32l476g
-eval) to put build artifacts even though some files (e.g. board.c)
compile differently suite to suite. So, if cts-i2c-stm32l476g-eval is
built, followed by cts-gpio-stm32l476g-eval, build fails or produces
incorrect binary.
This patch makes eCTS create different directories for each suite.
As a bonus, we can now builds eCTS suites in parallel.
BUG=chromium:654549
BRANCH=none
TEST=make buildall -j (with uncommitted change)
Change-Id: I4abedc917787be5f79b97e0e50d0d08e01bd5f9d
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/398281
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Makefile.rules b/Makefile.rules index 4f11ba1e55..4d028149e7 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -185,17 +185,10 @@ cts_boards := stm32l476g-eval nucleo-f072rb # Create CTS rule automatically for given suite and board # $1: suite name # $2: board name -# $3: suite name used in the previous loop define make-cts = -ifneq ($$(filter $(1),$$(cts_suites)),) -ifneq ($$(filter $(3),$$(cts_suites)),) -# Serialize builds -cts-$(1)-$(2): cts-$(3)-$(2) -endif build_cts: cts-$(1)-$(2) cts-$(1)-$(2): $$(MAKE) CTS_MODULE=$(1) BOARD=$(2) -endif # Do not remove this blank line endef @@ -205,8 +198,8 @@ endef # If we don't serialize targets, parallel make fails because all suites # try to produce ec.bin in the same directory (e.g. build/stm32l476g-eval). $(foreach b, $(cts_boards), \ - $(foreach s, $(cts_suites) none, \ - $(eval $(call make-cts,$(s),$(b),$(prev)) prev:=$(s)) \ + $(foreach s, $(cts_suites), \ + $(eval $(call make-cts,$(s),$(b))) \ ) \ ) |