Commit Graph

20 Commits

Author SHA1 Message Date
Tatsuo Ishii ae66716bf3 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
2023-06-14 11:02:50 +09:00
Tatsuo Ishii 87f21d2c68 Fix make_etags failure on Mac.
Previously make_etags always ran make_ctags -e when make_etags was
executed.  However, because non-Exuberant ctags on Mac does not
support -e option (and also on other platforms including old Linux),
ctags failed. To avoid the failure change make_ctags so that if
non-Exuberant ctags is used and ctags -e option is requested, run
etags command instead. If etags command does not exist, make_ctags
will fail.

Also refactor make_ctags and tweak make_etags to emit proper usage
message.

Author: Fujii Masao
Reviewed-by: Tatsuo Ishii
Discussion: https://www.postgresql.org/message-id/369c13b9-8b0f-d6f9-58fc-61258ec8f713%40oss.nttdata.com
2023-02-15 09:52:42 +09:00
Tatsuo Ishii d1e2a380cb Enhance make_ctags and make_etags.
make_ctags did not include field members of structs since the commit
964d01ae90.

For example, in the following field of RestrictInfo:

   Selectivity norm_selec pg_node_attr(equal_ignore);

pg_node_attr was mistakenly interpreted to be the name of the field.
To fix this, add -I option to ctags command if the command is
Exuberant ctags or Universal ctags (for plain old ctags, struct
members are not included in the tags file anyway).

Also add "-e" and "-n" options to make_ctags. The -e option invokes
ctags command with -e option, which produces TAGS file for emacs. This
allows to eliminate duplicate codes in make_etags so that make_etags
just exec make_ctags with -e option.

The -n option allows not to produce symbolic links in each
sub directory (the default is producing symbolic links).

Author: Yugo Nagata
Reviewers: Alvaro Herrera, Tatsuo Ishii
Discussion: https://postgr.es/m/flat/20221007154442.76233afc7c5b255c4de6528a%40sraoss.co.jp
2022-10-19 12:59:29 +09:00
Alvaro Herrera 3d53b9ef1a
Fix `trap` in a few shell scripts
The original `trap` lines in these scripts are incomplete: in case of
any signal, they delete the working directory but let the script run to
completion, which is useless because it will only proceed to complain
about the working directory being removed.  Add `exit` there, with the
original exit value (not rm's).

Since this is mostly just cosmetic, no backpatch.

Discussion: https://postgr.es/m/20220913181002.hzsosy7qkemb7ky7@alvherre.pgsql
2022-09-20 18:50:16 +02:00
Tom Lane 52a301e0d9 Improve missing-program error handling in make_ctags and make_etags.
If ctags (resp. etags) isn't installed, these scripts naturally fail,
but the error messages were less clear than one could wish.
It seems worth installing an explicit test to improve that.

Nikolay Shaplov, with suggestions from Michael Paquier and Andrew Dunstan

Discussion: https://postgr.es/m/2394207.ccz7JgCJsh@x200m
2019-01-13 13:33:50 -05:00
Bruce Momjian 1fbacbf998 Mention original ctags option name. 2012-02-24 16:19:18 -05:00
Bruce Momjian 7c19f9d139 Update src/tools/make_ctags to avoid Exuberant tags option
that has been renamed and undocumented since 2003;  instead, use the
documented option.  Add comments.
2012-02-24 16:17:19 -05:00
Magnus Hagander 9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Bruce Momjian 6faf495b8a Make 'find' syntax consistent; add .git exclusion to make_ctags. 2009-01-14 21:59:19 +00:00
Bruce Momjian f3d99d160d Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
Tom Lane ddf6518b95 Fix to work better with Exuberant's version of ctags.
Gavin Sherry
2004-06-25 22:00:40 +00:00
Bruce Momjian 011ad7efec Set only LC_ALL for sort in tags creation. 2004-02-02 17:29:32 +00:00
Bruce Momjian 10bb17e334 Set locale to C before doing sort in make_ctags. 2004-02-01 23:11:33 +00:00
Bruce Momjian 2042daf5c3 Improve symlink handling for C tags file. 2003-01-18 06:06:51 +00:00
Bruce Momjian 3c580b8d97 Fix make_ctags for exhuberant tags. 2002-07-15 14:45:51 +00:00
Bruce Momjian bc3d2e1e35 Allow make_ctags to work with exuberant tags. 2002-07-02 17:45:52 +00:00
Bruce Momjian ecef31ca61 Prevent tags files in cvs directory. 2000-02-10 18:34:26 +00:00
Bruce Momjian 662371cc5d Prevent _deadcode from showing in ctags and mkid 1999-12-13 04:54:01 +00:00
Bruce Momjian 4390b0bfbe Add TEMP tables/indexes. Add COPY pfree(). Other cleanups. 1999-02-02 03:45:56 +00:00
Bruce Momjian 108baf70e5 Developer reorganization. 1997-09-08 04:19:50 +00:00