From 6464854a9698c5df6bef0bc9406213acca002a73 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Thu, 7 Dec 2017 10:14:02 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/814876 Reviewed-by: Randall Spangler --- Makefile.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.rules') 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) \ -- cgit v1.2.1