Skip to content

Commit 177b71b

Browse files
committed
Merge pull request #2110 from dscho/avoid-find-in-makefile
Accelerate startup time of `make`
2 parents a016576 + 1a657cd commit 177b71b

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 \
@@ -2368,7 +2369,7 @@ else
23682369
# should _not_ be included here, since they are necessary even when
23692370
# building an object for the first time.
23702371

2371-
$(OBJECTS): $(LIB_H)
2372+
$(OBJECTS): $(LIB_H) $(GENERATED_H)
23722373
endif
23732374

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

0 commit comments

Comments
 (0)