author | Lars Hjemli <hjemli@gmail.com> | 2010-11-07 15:13:49 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-11-07 15:13:49 (UTC) |
commit | 5807fb79faa49e9a8f2da616e9cc821e0198fcb7 (patch) (unidiff) | |
tree | ab36f62bc5fea3856603f6653f5c8da31233abea | |
parent | d41b2ddcb331caa74c1a90a0253f234142848552 (diff) | |
download | cgit-5807fb79faa49e9a8f2da616e9cc821e0198fcb7.zip cgit-5807fb79faa49e9a8f2da616e9cc821e0198fcb7.tar.gz cgit-5807fb79faa49e9a8f2da616e9cc821e0198fcb7.tar.bz2 |
Makefile: add -MP option
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>
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -46,49 +46,49 @@ endif | |||
46 | # Define a way to invoke make in subdirs quietly, shamelessly ripped | 46 | # Define a way to invoke make in subdirs quietly, shamelessly ripped |
47 | # from git.git | 47 | # from git.git |
48 | # | 48 | # |
49 | QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir | 49 | QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir |
50 | QUIET_SUBDIR1 = | 50 | QUIET_SUBDIR1 = |
51 | 51 | ||
52 | ifneq ($(findstring $(MAKEFLAGS),w),w) | 52 | ifneq ($(findstring $(MAKEFLAGS),w),w) |
53 | PRINT_DIR = --no-print-directory | 53 | PRINT_DIR = --no-print-directory |
54 | else # "make -w" | 54 | else # "make -w" |
55 | NO_SUBDIR = : | 55 | NO_SUBDIR = : |
56 | endif | 56 | endif |
57 | 57 | ||
58 | ifndef V | 58 | ifndef V |
59 | QUIET_CC = @echo ' ' CC $@; | 59 | QUIET_CC = @echo ' ' CC $@; |
60 | QUIET_MM = @echo ' ' MM $@; | 60 | QUIET_MM = @echo ' ' MM $@; |
61 | QUIET_SUBDIR0 = +@subdir= | 61 | QUIET_SUBDIR0 = +@subdir= |
62 | QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ | 62 | QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ |
63 | $(MAKE) $(PRINT_DIR) -C $$subdir | 63 | $(MAKE) $(PRINT_DIR) -C $$subdir |
64 | endif | 64 | endif |
65 | 65 | ||
66 | # | 66 | # |
67 | # Define a pattern rule for automatic dependency building | 67 | # Define a pattern rule for automatic dependency building |
68 | # | 68 | # |
69 | %.d: %.c | 69 | %.d: %.c |
70 | $(QUIET_MM)$(CC) $(CFLAGS) -MM $< | sed -e 's/\($*\)\.o:/\1.o $@:/g' >$@ | 70 | $(QUIET_MM)$(CC) $(CFLAGS) -MM -MP $< | sed -e 's/\($*\)\.o:/\1.o $@:/g' >$@ |
71 | 71 | ||
72 | # | 72 | # |
73 | # Define a pattern rule for silent object building | 73 | # Define a pattern rule for silent object building |
74 | # | 74 | # |
75 | %.o: %.c | 75 | %.o: %.c |
76 | $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $< | 76 | $(QUIET_CC)$(CC) -o $*.o -c $(CFLAGS) $< |
77 | 77 | ||
78 | 78 | ||
79 | EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lpthread | 79 | EXTLIBS = git/libgit.a git/xdiff/lib.a -lz -lpthread |
80 | OBJECTS = | 80 | OBJECTS = |
81 | OBJECTS += cache.o | 81 | OBJECTS += cache.o |
82 | OBJECTS += cgit.o | 82 | OBJECTS += cgit.o |
83 | OBJECTS += cmd.o | 83 | OBJECTS += cmd.o |
84 | OBJECTS += configfile.o | 84 | OBJECTS += configfile.o |
85 | OBJECTS += html.o | 85 | OBJECTS += html.o |
86 | OBJECTS += parsing.o | 86 | OBJECTS += parsing.o |
87 | OBJECTS += scan-tree.o | 87 | OBJECTS += scan-tree.o |
88 | OBJECTS += shared.o | 88 | OBJECTS += shared.o |
89 | OBJECTS += ui-atom.o | 89 | OBJECTS += ui-atom.o |
90 | OBJECTS += ui-blob.o | 90 | OBJECTS += ui-blob.o |
91 | OBJECTS += ui-clone.o | 91 | OBJECTS += ui-clone.o |
92 | OBJECTS += ui-commit.o | 92 | OBJECTS += ui-commit.o |
93 | OBJECTS += ui-diff.o | 93 | OBJECTS += ui-diff.o |
94 | OBJECTS += ui-log.o | 94 | OBJECTS += ui-log.o |