summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2017-12-07 10:14:02 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-12-07 15:22:49 -0800
commit6464854a9698c5df6bef0bc9406213acca002a73 (patch)
tree7ffac5eb6e0849c8402b07ce014c2e6d58fe2aa7 /Makefile.rules
parentee3cb8c898268edcc869288a3dd318c0fefcd636 (diff)
downloadchrome-ec-6464854a9698c5df6bef0bc9406213acca002a73.tar.gz
make: allow deps to tolerate removal of .h files
The -MP preprocessor option changes generated dependency files such that removal of .h files does not cause make to fail dependency check. BRANCH=none BUG=none TEST=verified that removal of .h file from the code and from the tree does not cause failing builds any more. Change-Id: If6adb6f53938878c914ca6ee6947012548bc0019 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/814876 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 84fe06cfe6..460a1888db 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -72,7 +72,7 @@ cmd_smap = $(NM) $< | sort > $@
cmd_elf = $(CC) $(objs) $(libsharedobjs_elf-y) $(LDFLAGS) \
-o $@ -Wl,-T,$< -Wl,-Map,$(patsubst %.elf,%.map,$@)
cmd_exe = $(CC) $(ro-objs) $(HOST_TEST_LDFLAGS) -o $@
-cmd_c_to_o = $(CC) $(CFLAGS) -MMD -MF $@.d -c $< -o $(@D)/$(@F)
+cmd_c_to_o = $(CC) $(CFLAGS) -MMD -MP -MF $@.d -c $< -o $(@D)/$(@F)
cmd_c_to_build = $(BUILDCC) $(BUILD_CFLAGS) \
$(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $*.c) \
$(BUILD_LDFLAGS) \