Skip to content

Commit c0d97d2

Browse files
committed
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
2 parents 1de413b + 92b88eb commit c0d97d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,8 @@ VCSSVN_LIB = vcs-svn/lib.a
842842

843843
GENERATED_H += command-list.h
844844

845-
LIB_H = $(shell $(FIND) . \
845+
LIB_H := $(shell git ls-files '*.h' ':!t/' ':!Documentation/' 2>/dev/null || \
846+
$(FIND) . \
846847
-name .git -prune -o \
847848
-name t -prune -o \
848849
-name Documentation -prune -o \
@@ -2376,7 +2377,7 @@ else
23762377
# should _not_ be included here, since they are necessary even when
23772378
# building an object for the first time.
23782379

2379-
$(OBJECTS): $(LIB_H)
2380+
$(OBJECTS): $(LIB_H) $(GENERATED_H)
23802381
endif
23812382

23822383
exec-cmd.sp exec-cmd.s exec-cmd.o: GIT-PREFIX

0 commit comments

Comments
 (0)