Skip to content

Commit 8fa2043

Browse files
peffgitster
authored andcommitted
Makefile: match shell scripts in FIND_SOURCE_FILES
We feed FIND_SOURCE_FILES to ctags to help developers navigate to particular functions, but we only feed C source code. The same feature can be helpful when working with shell scripts (especially the test suite). Modern versions of ctags know how to parse shell scripts; we just need to feed the filenames to it. This patch specifically avoids including the individual test scripts themselves. Those are unlikely to be of interest, and there are a lot of them to process. It does pick up test-lib.sh and test-lib-functions.sh. Note that our negative pathspec already excludes the individual scripts for the ls-files case, but we need to loosen the `find` rule to match it. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e6fc85b commit 8fa2043

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2152,14 +2152,16 @@ po/build/locale/%/LC_MESSAGES/git.mo: po/%.po
21522152
FIND_SOURCE_FILES = ( \
21532153
git ls-files \
21542154
'*.[hcS]' \
2155+
'*.sh' \
21552156
':!*[tp][0-9][0-9][0-9][0-9]*' \
21562157
2>/dev/null || \
21572158
$(FIND) . \
21582159
\( -name .git -type d -prune \) \
2159-
-o \( -name '[tp][0-9][0-9][0-9][0-9]' -type d -prune \) \
2160+
-o \( -name '[tp][0-9][0-9][0-9][0-9]*' -prune \) \
21602161
-o \( -name build -type d -prune \) \
21612162
-o \( -name 'trash*' -type d -prune \) \
21622163
-o \( -name '*.[hcS]' -type f -print \) \
2164+
-o \( -name '*.sh' -type f -print \) \
21632165
)
21642166

21652167
$(ETAGS_TARGET): FORCE

0 commit comments

Comments
 (0)