Skip to content

Commit

Permalink
Makefile: tuck away generated makefile fragments in .depend
Browse files Browse the repository at this point in the history
When building with COMPUTE_HEADER_DEPENDENCIES on, save
dependency information to .depend/ instead of deps/ so it does
not show up in ‘ls’ output.  Otherwise, the extra directories can
be distracting.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Jan 31, 2010
1 parent f2fabbf commit ec5e0bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1692,15 +1692,15 @@ XDIFF_OBJS = xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \
xdiff/xmerge.o xdiff/xpatience.o
OBJECTS := $(GIT_OBJS) $(XDIFF_OBJS)

dep_files := $(foreach f,$(OBJECTS),$(dir $f)deps/$(notdir $f).d)
dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)

ifdef COMPUTE_HEADER_DEPENDENCIES
dep_dirs := $(addsuffix deps,$(sort $(dir $(OBJECTS))))
dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))
$(dep_dirs):
mkdir -p $@

missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs))
dep_file = $(dir $@)deps/$(notdir $@).d
dep_file = $(dir $@).depend/$(notdir $@).d
dep_args = -MF $(dep_file) -MMD -MP
ifdef CHECK_HEADER_DEPENDENCIES
$(error cannot compute header dependencies outside a normal build. \
Expand Down

0 comments on commit ec5e0bb

Please sign in to comment.