From 72450144a043c057c6cfbf95a5fbb99d7ff80743 Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Fri, 21 Oct 2011 21:38:36 +0300 Subject: [PATCH] Makefile: Do not fail build if stale dependency files are present If we happen to remove some old header files, the build should not fail because the header files are still listed in the dependency files. Signed-off-by: Timo Kokkonen --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 782b9fc..bf2120d 100644 --- a/Makefile +++ b/Makefile @@ -33,9 +33,17 @@ endif ifeq ($(C),2) $(CHECKPATCH) -f $< endif + $(Q)cp .$@.d .$@.P; \ + sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < .$@.d >> .$@.P; \ + mv .$@.P .$@.d %-debug.o: %.c $(QUIET_CC)$(CC) -MMD -MF .$@.d $(CFLAGS) -DDEBUG -O0 -c $< -o $@ + $(Q)cp .$@.d .$@.P; \ + sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < .$@.d >> .$@.P; \ + mv .$@.P .$@.d TAGS: @echo -e "\tTAGS\t" -- 2.44.0