Re: make_ctags: use -I option to ignore pg_node_attr macro
Tatsuo Ishii <ishii@sraoss.co.jp>
From: Tatsuo Ishii <ishii@sraoss.co.jp>
To: masao.fujii@oss.nttdata.com
Cc: nagata@sraoss.co.jp, alvherre@alvh.no-ip.org,
pgsql-hackers@postgresql.org
Date: 2023-02-08T11:17:34Z
Lists: pgsql-hackers
Attachments
- fix-make_ctags-v3.patch (text/x-patch) patch v3
>> 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? Mine doesn't have etags. That's why I missed the error. > + 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? Agreed. > 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. Anyway, attached is the v3 patch. Best reagards, -- Tatsuo Ishii SRA OSS LLC English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp
Commits
-
Fix make_etags breakage on certain platforms.
- af26f28b9fdd 15.4 landed
- ae66716bf3ef 16.0 landed
-
Fix make_etags failure on Mac.
- 87f21d2c6890 16.0 landed
-
Enhance make_ctags and make_etags.
- d1e2a380cb91 16.0 cited