summaryrefslogtreecommitdiff
path: root/cts
diff options
context:
space:
mode:
authorYilun Lin <yllin@google.com>2019-05-24 11:18:26 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-06-03 01:11:04 -0700
commit49436b18d2a77b994fe76d8c2f070000e2cdb58a (patch)
tree327729dead0cf855fca17c067d499c66773ebe06 /cts
parent7ccb50f4352309813cffd98460bd7dcb48d4657f (diff)
downloadchrome-ec-49436b18d2a77b994fe76d8c2f070000e2cdb58a.tar.gz
Makefile: Replace flag -DX with -DX= to be supported by IS_ENABLED().
IS_ENABLED works for an empty-string-defined macro. However, -D options default to define the macro to 1. This CL forces those macros, such as BOARD_* CHIP_*, CORE_*, CHIP_VARIANT_* and CHIP_FAMILIY_*, to be defined as an empty string, so that it can be supported by IS_ENABLED macro. TEST=use if(IS_ENABLED(BOARD_KRANE)) and see compilation success. TEST=compares build directory w/ and w/o this CL, and see the .smap are the same: ls build/*/*/ec.*.smap | sed -e 's|build/||' | \ xargs -I{} diff -u -a build/{} build.new/{} BUG=none BRANCH=None Change-Id: I96e2aa1cb5f3369e5e445a674595a9234f26707a Signed-off-by: Yilun Lin <yllin@google.com> Reviewed-on: https://chromium-review.googlesource.com/1627840 Commit-Ready: Yilun Lin <yllin@chromium.org> Tested-by: Yilun Lin <yllin@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'cts')
-rw-r--r--cts/build.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/cts/build.mk b/cts/build.mk
index ddbcb1e95f..3f0cd750db 100644
--- a/cts/build.mk
+++ b/cts/build.mk
@@ -3,14 +3,14 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-CFLAGS_CTS=-DCTS_MODULE -DCTS_TASKFILE=cts.tasklist
+CFLAGS_CTS=-DCTS_MODULE=$(EMPTY) -DCTS_TASKFILE=cts.tasklist
ifeq "$(CTS_MODULE)" "gpio"
-CFLAGS_CTS+=-DCTS_MODULE_GPIO
+CFLAGS_CTS+=-DCTS_MODULE_GPIO=$(EMPTY)
endif
ifeq "$(CTS_MODULE)" "i2c"
-CFLAGS_CTS+=-DCTS_MODULE_I2C
+CFLAGS_CTS+=-DCTS_MODULE_I2C=$(EMPTY)
CONFIG_I2C=y
ifneq ($(BOARD),stm32l476g-eval)
CONFIG_I2C_MASTER=y
@@ -25,4 +25,4 @@ ifeq ($(BOARD),stm32l476g-eval)
else
cts-y+=$(CTS_MODULE)/dut.o
cts-y+=common/dut_common.o
-endif \ No newline at end of file
+endif