Re: make_ctags: use -I option to ignore pg_node_attr macro
От | Fujii Masao |
---|---|
Тема | Re: make_ctags: use -I option to ignore pg_node_attr macro |
Дата | |
Msg-id | 0169910e-2ff4-93c3-141c-1926a27b5647@oss.nttdata.com обсуждение исходный текст |
Ответ на | Re: make_ctags: use -I option to ignore pg_node_attr macro (Tatsuo Ishii <ishii@sraoss.co.jp>) |
Ответы |
Re: make_ctags: use -I option to ignore pg_node_attr macro
|
Список | pgsql-hackers |
On 2023/02/08 20:17, Tatsuo Ishii wrote: >>> Attached is the v2 patch. >> >> Thanks for the patch! >> >> With the patch, I got the following error when executing make_etags.. >> >> $ ./src/tools/make_etags >> etags: invalid option -- 'e' >> Try 'etags --help' for a complete list of options. >> sort: No such file or directory > > Oops. Thank you for pointing it out. BTW, just out of curiosity, do > you have etags on you Mac? Yes. $ etags --version etags (GNU Emacs 28.2) Copyright (C) 2022 Free Software Foundation, Inc. This program is distributed under the terms in ETAGS.README >> This is the comment for the commit d1e2a380cb. I found that make_etags >> with >> an invalid option reported the following usage message mentioning >> make_ctags >> (not make_etags). Isn't this confusing? >> >> $ ./src/tools/make_etags -a >> Usage: /.../make_ctags [-e][-n] > > That's hard to fix without some code duplication. We decided that > make_etags is not a symlink to make_ctags, rather execs make_ctags. Of > course we could let make_etags perform the same option check, but I > doubt it's worth the trouble. How about just applying the following into make_etags? +if [ $# -gt 1 ] || ( [ $# -eq 1 ] && [ $1 != "-n" ] ) +then echo "Usage: $0 [-n]" + exit 1 +fi > Anyway, attached is the v3 patch. Thanks for updating the patch! With the patch, make_etags caused the following error messages on my MacOS. $ ./src/tools/make_etags No such file or directory No such file or directory To fix this error, probaby we should get rid of double-quotes from "$FLAGS" "$IGNORE_IDENTIFIES" in the following command. - xargs ctags $MODE -a -f $TAGS_FILE "$FLAGS" "$IGNORE_IDENTIFIES" + xargs $PROG $MODE $TAGS_OPT $TAGS_FILE "$FLAGS" "$IGNORE_IDENTIFIES" + else ctags --help 2>&1 | grep -- -e >/dev/null + # Note that "ctags --help" does not always work. Even certain ctags does not have the option. This code seems to assume that there is non-Exuberant ctags supporting -e option. But does such ctags really exist? I fixed the above issues and refactored the code. Attached is the updated version of the patch. Thought? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Вложения
В списке pgsql-hackers по дате отправления: