summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2016-10-11 17:39:14 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-10-14 16:05:49 -0700
commitc926d7dc7c4df52c7d3c82c86bae9ac6e8a6b758 (patch)
tree0a8309a8ec84fda0f03e118296233fc6c2200990 /Makefile
parentce3e350aded53fb54a86057b7a7f18bfbb165f73 (diff)
downloadchrome-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')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3b5c4e70d4..912c6ab64d 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,12 @@ endif
PROJECT?=ec
# Output directory for build objects
+ifdef CTS_MODULE
+# CTS builds need different directories per board per suite.
+out?=build/$(BOARD)/cts_$(CTS_MODULE)
+else
out?=build/$(BOARD)
+endif
# File containing configuration information
config=$(out)/.config