From: Jonathan Nieder Date: Sun, 31 Jan 2010 21:37:25 +0000 (-0600) Subject: Makefile: always remove .depend directories on 'make clean' X-Git-Tag: v1.7.1-rc0~118^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=010acc151981ebfb0e369ffdeaef63803c58ef2b;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/Makefile b/Makefile index c9391390b..93e1a9218 100644 --- a/Makefile +++ b/Makefile @@ -1693,9 +1693,9 @@ XDIFF_OBJS = xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \ OBJECTS := $(GIT_OBJS) $(XDIFF_OBJS) dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d) +dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS)))) ifdef COMPUTE_HEADER_DEPENDENCIES -dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS)))) $(dep_dirs): mkdir -p $@