Makefile: disable default implicit rules
The git makefile never uses any default implicit rules. Unfortunately, if a prerequisite for one of the intended rules is missing, a default rule can be used in its place: $ make var.s CC var.s $ rm var.c $ make var.o as -o var.o var.s Avoiding the default rules avoids this hard-to-debug behavior. It also should speed things up a little in the normal case. Future patches may restrict the scope of the %.o: %.c pattern. This patch would then ensure that for targets not listed, we do not fall back to the default rule. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Jonathan Nieder committed
Jan 26, 2010 at 09:51 UTC
30248886ce89e5467ce734908775ed90b9138e99
1 file changed
+2
Makefile
+2
@@ -1672,6 +1672,8 @@ GIT_OBJS := $(LIB_OBJS) $(BUILTIN_OBJS) $(TEST_OBJS) \
1672
XDIFF_OBJS = xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \
1673
xdiff/xmerge.o xdiff/xpatience.o
1674
1675
+.SUFFIXES:
1676
+
1677
%.o: %.c GIT-CFLAGS
1678
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
1679
%.s: %.c GIT-CFLAGS FORCE