Ignore dotfiles in lookup_srcs (#1218)

This makes the find and fd cases match, as fd already ignores dotfiles.
This commit is contained in:
Jerry Zhao
2022-09-05 18:49:23 -07:00
committed by GitHub
parent 8a96f7c177
commit a70a63b1f6

View File

@@ -66,7 +66,7 @@ include $(base_dir)/tools/torture.mk
# Returns a list of files in directory $1 with file extension $2.
# If available, use 'fd' to find the list of files, which is faster than 'find'.
ifeq ($(shell which fd 2> /dev/null),)
lookup_srcs = $(shell find -L $(1)/ -name target -prune -o -iname "*.$(2)" -print 2> /dev/null)
lookup_srcs = $(shell find -L $(1)/ -name target -prune -o \( -iname "*.$(2)" ! -iname ".*" \) -print 2> /dev/null)
else
lookup_srcs = $(shell fd -L ".*\.$(2)" $(1))
endif