]> git.cameronkatri.com Git - cgit.git/commitdiff
Makefile: add -MP option
authorLars Hjemli <hjemli@gmail.com>
Sun, 7 Nov 2010 15:13:49 +0000 (16:13 +0100)
committerLars Hjemli <hjemli@gmail.com>
Sun, 7 Nov 2010 15:13:49 +0000 (16:13 +0100)
Work around errors `make` gives when header files are removed without
the Makefile being updated.

Signed-off-by: Lynn Lin <Lynn.Lin@emc.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Makefile

index dda743dd9b1c4132067e272885888db0767f4c36..15c7c20494501746a4f804d72743c8affc064b75 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -67,7 +67,7 @@ endif
 # Define a pattern rule for automatic dependency building
 #
 %.d: %.c
-       $(QUIET_MM)$(CC) $(CFLAGS) -MM $< | sed -e 's/\($*\)\.o:/\1.o $@:/g' >$@
+       $(QUIET_MM)$(CC) $(CFLAGS) -MM -MP $< | sed -e 's/\($*\)\.o:/\1.o $@:/g' >$@
 
 #
 # Define a pattern rule for silent object building