From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, nagata(at)sraoss(dot)co(dot)jp, alvherre(at)alvh(dot)no-ip(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: make_ctags: use -I option to ignore pg_node_attr macro |
Date: | 2023-02-08 10:29:40 |
Message-ID: | beb08765-5cbc-c819-8abf-aa7a71b4daf8@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2023/02/08 9:49, Tatsuo Ishii wrote:
>>> I am not sure if this is good way to check if ctags supports "-e" or not.
>>>
>>> + then ctags --version 2>&1 | grep -- -e >/dev/null
>>>
>>> Perhaps, "--help" might be intended rather than "--version" to check
>>> supported options?
>>
>> Yeah, that was my mistake.
>>
>>> Even so, ctags would have other option whose name contains
>>> "-e" than Emacs support, so this check could end in a wrong result. Therefore,
>>> it seems to me that it is better to check immediately if etags is available
>>> in case that we don't have Exuberant-type ctags.
>>
>> That makes sense.
>
> 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
+ if [ $? != 0 -a -z "$ETAGS_EXISTS" ]
+ then echo "'ctags' does not support emacs mode and etags does not exist" 1>&2; exit 1
+ fi
This code can be reached after "rm -f ./$TAGS_FILE" is executed in make_ctags.
But we should check whether the required program has been already installed
and exit immediately if not, before modifying anything?
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]
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2023-02-08 10:30:10 | Re: meson: Optionally disable installation of test modules |
Previous Message | Tomas Vondra | 2023-02-08 10:27:20 | Re: Why cann't simplify stable function in planning phase? |