This is Exuberant Ctags, ported to Plan 9 and with an Acme-friendly tag file format
added. To build, run ape ('ape/psh') and then 'make ctags'. Copy the ctags binary into,
for example, $home/bin/$objtype.
The "port" part was easy. Within ape/psh, ./configure almost got it right. Two things
were needed to get it to build properly:
in Makefile, add '-DHAVE_REMOVE' to DEFS
in config.h, remove or comment out the definition of INT_MAX
Then 'make ctags' will build it properly (just 'make' won't do it right now). I've not tried
to get the config-generated Makefile to have 'install' do smart things; just cp ctags
wherever (eg $hom/bin/$objtype).
A few changes were made to add a new format that generated tags and cross-references
in filename:line format for Acme and the plumber:
tell entry.c about acme-style tags
switches in addPseudoTags, writeXrefEntry, makeTagEntry
create writeAtagsEntry to generate tags format
tell options.h about boolean atags for -A
tell options.c about new format and arguments
make MaxSupportedTagFormat = 3
add -A to processShortOption, optionValues, LongOptionDescription
make setAtagsMode for setting options with -A
Now "ctags -A" will make the tags file in a plumbable form, and "ctags -Ax" or
"ctags -x --format'='3" will make the cross-reference output into a plumbable form.
I'm in the process of cleaning up the changes for upstream submission, at which
point I'll simply defer to that (assuming they're accepted). The included readtags
library doesn't currently build (hence 'make ctags' rather than 'make' above), but that
isn't a priority since I only inend to use this with the plumber.
|