From: Jonathan Nieder Date: Sat, 28 Nov 2009 11:49:37 GMT Subject: Re: [PATCH/RFC 2/2 v3] Makefile: lazily compute header dependencies Message-ID: <20091128114937.GA10199@progeny.tock> In-Reply-To: Andreas Schwab wrote: > Jonathan Nieder writes: >> GIT-CFLAGS: .FORCE-GIT-CFLAGS >> + mkdir -p deps block-sha1/deps ppc/deps compat/deps \ >> + compat/regex/deps compat/nedmalloc/deps compat/fnmatch/deps \ >> + xdiff/deps > > IMHO the list of directories should be factored out in a variable for > easier maintenance. Good idea, thanks. Perhaps the the value for such a variable could be computed at build time. e.g. depdirs := $(addsuffix /deps,$(sort $(dir $(OBJECTS)))) >> @@ -1873,8 +1898,10 @@ distclean: clean >> $(RM) configure >> >> clean: >> - $(RM) *.o block-sha1/*.o arm/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o \ >> + $(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o \ >> $(LIB_FILE) $(XDIFF_LIB) >> + $(RM) -r deps block-sha1/deps ppc/deps compat/deps \ >> + compat/*/deps xdiff/deps