Skip to content

Commit

Permalink
Ignore dotfiles in lookup_srcs (#1218)
Browse files Browse the repository at this point in the history
This makes the find and fd cases match, as fd already ignores dotfiles.
  • Loading branch information
jerryz123 committed Sep 6, 2022
1 parent 8a96f7c commit a70a63b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a70a63b

Please sign in to comment.