summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2021-07-20 14:32:40 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-07-21 16:22:21 +0000
commit0f88f6ff92e5913064252af3336d959edacba7ed (patch)
treedc332254f47665d83491629289f98a976526d2cb /tests
parent6e85862a74a64740bfbf83c55f5d8cee4196ad7c (diff)
tests/Makefile.inc: Correct dependency file suffix
The dependency file, generated by $(HOSTCC) ... -MMD -MT $@ -c $< -o $@.orig is determined by replacing the suffix of "$@.orig" with ".d", resulting in "$@.d" (which is *.o.d). The file name was accidentally changed in CB:55360. Now explicitly specify the path by the "-MF" option. BUG=none TEST=make unit-tests; find build/tests/ -name "*.d" BRANCH=none Change-Id: I01f77ebaaae78dd9e69394a49e524f1013857195 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/56444 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/Makefile.inc b/tests/Makefile.inc
index b4b8cda5ee..056ad7df85 100644
--- a/tests/Makefile.inc
+++ b/tests/Makefile.inc
@@ -118,8 +118,8 @@ $($(1)-objs): TEST_CFLAGS += -I$$(dir $$($(1)-config-file)) \
$($(1)-srcobjs): OBJCOPY_FLAGS += $$(foreach mock,$$($(1)-mocks),--globalize-symbol=$$(mock) --weaken-symbol=$$(mock))
$($(1)-objs): $(testobj)/$(1)/%.o: $$$$*.c $$($(1)-config-file)
mkdir -p $$(dir $$@)
- $(HOSTCC) $(HOSTCFLAGS) $$(TEST_CFLAGS) $($(1)-cflags) -MMD \
- -MT $$@ -c $$< -o $$@.orig
+ $(HOSTCC) $(HOSTCFLAGS) $$(TEST_CFLAGS) $($(1)-cflags) -MMD \
+ -MF $$(basename $$@).d -MT $$@ -c $$< -o $$@.orig
$(OBJCOPY) $$@.orig $$(OBJCOPY_FLAGS) $$@
$($(1)-bin): $($(1)-objs) $(CMOCKA_LIB)