Skip to content

Commit 43f8c89

Browse files
Denton-Lgitster
authored andcommitted
Makefile: strip leading ./ in $(FIND_SOURCE_FILES)
Currently, $(FIND_SOURCE_FILES) has two modes: if `git ls-files` is present, it will use that to enumerate the files in the repository; else it will use `$(FIND) .` to enumerate the files in the directory. There is a subtle difference between these two methods, however. With ls-files, filenames don't have a leading `./` while with $(FIND), they do. This does not currently pose a problem but in a future patch, we will be using `filter-out` to process the list of files with the assumption that there is no prefix. Unify the two possible invocations in $(FIND_SOURCE_FILES) by using sed to remove the `./` prefix in the $(FIND) case. Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5dedf7d commit 43f8c89

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,6 +2614,7 @@ FIND_SOURCE_FILES = ( \
26142614
-o \( -name 'trash*' -type d -prune \) \
26152615
-o \( -name '*.[hcS]' -type f -print \) \
26162616
-o \( -name '*.sh' -type f -print \) \
2617+
| sed -e 's|^\./||' \
26172618
)
26182619

26192620
$(ETAGS_TARGET): FORCE

0 commit comments

Comments
 (0)