Skip to content

Commit 89cb7de

Browse files
authored
Merge pull request #2110 from dscho/avoid-find-in-makefile
Accelerate startup time of `make`
2 parents 6b27cae + cb253bd commit 89cb7de

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
@@ -844,7 +844,8 @@ VCSSVN_LIB = vcs-svn/lib.a
844844

845845
GENERATED_H += command-list.h
846846

847-
LIB_H = $(shell $(FIND) . \
847+
LIB_H := $(shell git ls-files '*.h' ':!t/' ':!Documentation/' 2>/dev/null || \
848+
$(FIND) . \
848849
-name .git -prune -o \
849850
-name t -prune -o \
850851
-name Documentation -prune -o \
@@ -2367,7 +2368,7 @@ else
23672368
# should _not_ be included here, since they are necessary even when
23682369
# building an object for the first time.
23692370

2370-
$(OBJECTS): $(LIB_H)
2371+
$(OBJECTS): $(LIB_H) $(GENERATED_H)
23712372
endif
23722373

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

0 commit comments

Comments
 (0)