From: Timo Kokkonen Date: Fri, 21 Oct 2011 18:38:36 +0000 (+0300) Subject: Makefile: Do not fail build if stale dependency files are present X-Git-Url: http://git.itanic.dy.fi/?p=scan-pagemap;a=commitdiff_plain;h=72450144a043c057c6cfbf95a5fbb99d7ff80743 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 --- 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"