diff options
author | Tatsuo Ishii | 2023-06-14 02:02:50 +0000 |
---|---|---|
committer | Tatsuo Ishii | 2023-06-14 02:02:50 +0000 |
commit | ae66716bf3ef6fa9b33904eaf15441813a150320 (patch) | |
tree | 9ca4dbf48260fe521de7f35880da72ec95b5283c | |
parent | 63e4f13d2a78124c798165814a679b0534db87a5 (diff) |
Fix make_etags breakage on certain platforms.
make_etags produced wrong format TAGS files on platforms such as Mac,
which uses non-Exuberant ctags.
Author: Masahiko Sawada
Reviewed-by: Tatsuo Ishii
Backpatch-through: 15
Discussion: https://postgr.es/m/CAD21AoDmCqpS%2BU6b9Bc-b4OFx3tz%3DNv6O2KVkoVg7sHk60spjA%40mail.gmail.com
-rwxr-xr-x | src/tools/make_ctags | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/tools/make_ctags b/src/tools/make_ctags index aa7d7b573f0..ad027c71e3d 100755 --- a/src/tools/make_ctags +++ b/src/tools/make_ctags @@ -87,11 +87,10 @@ find `pwd`/ \( -name tmp_install -prune -o -name tmp_check -prune \) \ -o -name "*.sql" -o -name "*.p[lm]" \) -type f -print | xargs $PROG $TAGS_OPT $TAGS_FILE $FLAGS $IGNORE_IDENTIFIES -# Exuberant tags has a header that we cannot sort in with the other entries -# so we skip the sort step -# Why are we sorting this? I guess some tag implementation need this, -# particularly for append mode. bjm 2012-02-24 -if [ ! "$IS_EXUBERANT" ] +# Sorting non-Exuberant ctags file allows for fast searching of the tags file. +# Since etags file has a header that we cannot sort in with the other entries +# we skip the sort step. +if [ ! "$IS_EXUBERANT" -a ! "$EMACS_MODE" ] then LC_ALL=C export LC_ALL sort $TAGS_FILE >/tmp/$$ && mv /tmp/$$ $TAGS_FILE |