Makefile: always remove .depend directories on 'make clean'
Even if COMPUTE_HEADER_DEPENDENCIES is not set, some .o.d files might be lying around from previous builds when it was. This is especially likely because using the CHECK_HEADER_DEPENDENCIES feature requires building sometimes with COMPUTE... on and sometimes with it off. At the end of such an exercise, to get a blank slate, the user ought to be able to just run 'make clean'. Make it so. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
Jan 31, 2010 at 15:37 UTC
010acc151981ebfb0e369ffdeaef63803c58ef2b
1 file changed
+1
-1
Makefile
+1
-1
@@ -1693,9 +1693,9 @@ XDIFF_OBJS = xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \
1693
OBJECTS := $(GIT_OBJS) $(XDIFF_OBJS)
1694
1695
dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)
1696
+dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))
1697
1698
ifdef COMPUTE_HEADER_DEPENDENCIES
1698
-dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))
1699
$(dep_dirs):
1700
mkdir -p $@
1701