Hello,
How about adding new target 'GTAGS' that means GLOBAL's tag to automake?
GNU GLOBAL <http://www.gnu.org/software/global/global.html> is
a source code tag system that works the same way across diverse
environments. It supports C, C++, Yacc and Java source code.
[simple usage]
% cd /usr/src/sys
% gtags # make tag files at the root directory
% ls G* # of a source tree
GPATH GRTAGS GSYMS GTAGS # they are tag files generated by gtags.
% global -x '^fork' # locate specified tag name
fork 94 kern/kern_fork.c fork(p, uap)
fork1 127 kern/kern_fork.c fork1(p1, flags)
fork_return 1165 i386/i386/trap.c fork_return(p, frame)
fork_trampoline 313 i386/i386/exception.s ENTRY(fork_trampoline)
% _
My suggestion is like this:
---------------------------------------------------
[tags.am]
---------------------------------------------------
GTAGS:
gtags -i $(GTAGS_ARGS)
---------------------------------------------------
[tags-clean.am]
---------------------------------------------------
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
---------------------------------------------------
Gtags(1) create and update tag files (GTAGS,GRTAGS,GSYMS,GPATH).
Gtags need not to be executed per subdirectories, because
it traverse subdirectories and makes tag files at the root of
the source tree.
The -i option means 'incremental updating' and works like:
a) no tag files
gtags create tag files.
b) tag files already exist
If some source files were modified then gtags update tag files
incrementally else do nothing.
(GLOBAL has all path names in GPATH tag file.)
If dependency check by make(1) is desired then we can write tags.am like this:
---------------------------------------------------
[tags.am]
---------------------------------------------------
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include .deps/GTAGS.P
GTAGS:
gtags -i $(GTAGS_ARGS)
echo 'GTAGS: \' >.deps/GTAGS.P
gtags --find | sed -e 's/^/ /' -e 's/$$/ \\/' >>.deps/GTAGS.P
echo >>.deps/GTAGS.P
---------------------------------------------------
'gtags --find' write all path names in GPATH tag file.
(This example doesn't work when files are added or deleted though.)
Thank you in advance.
--
Shigio Yamaguchi - Tama Communications Corporation
Mail: [EMAIL PROTECTED], (Spare mail: [EMAIL PROTECTED])