summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-03-11 07:16:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-11 07:16:25 (GMT)
commitc0d97d299e85490d60b24e0a7905017d38c530cf (patch)
treec87566f9488c59eb6d10b09832ddd381197efa64 /Makefile
parent1de413bc1db8fb1d2269dd951269e798cf9a17fa (diff)
parent92b88eba9f7e9dddc20db5561837ddaf6677cf0c (diff)
downloadgit-c0d97d299e85490d60b24e0a7905017d38c530cf.zip
git-c0d97d299e85490d60b24e0a7905017d38c530cf.tar.gz
git-c0d97d299e85490d60b24e0a7905017d38c530cf.tar.bz2
Merge branch 'js/find-lib-h-with-ls-files-when-possible'
The Makefile uses 'find' utility to enumerate all the *.h header files, which is expensive on platforms with slow filesystems; it now optionally uses "ls-files" if working within a repository, which is a trick similar to how all sources are enumerated to run ETAGS on. * js/find-lib-h-with-ls-files-when-possible: Makefile: use `git ls-files` to list header files, if possible
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index acd6791..5374938 100644
--- a/Makefile
+++ b/Makefile
@@ -842,7 +842,8 @@ VCSSVN_LIB = vcs-svn/lib.a
GENERATED_H += command-list.h
-LIB_H = $(shell $(FIND) . \
+LIB_H := $(shell git ls-files '*.h' ':!t/' ':!Documentation/' 2>/dev/null || \
+ $(FIND) . \
-name .git -prune -o \
-name t -prune -o \
-name Documentation -prune -o \
@@ -2376,7 +2377,7 @@ else
# should _not_ be included here, since they are necessary even when
# building an object for the first time.
-$(OBJECTS): $(LIB_H)
+$(OBJECTS): $(LIB_H) $(GENERATED_H)
endif
exec-cmd.sp exec-cmd.s exec-cmd.o: GIT-PREFIX