On Feb 7, 2008 7:17 AM, Shigio YAMAGUCHI <
address@hidden> wrote:
> Many of the source files I am working with are pre-processed C++ with
> their own special syntax, and the resulting .cpp files have #line directives
> throughout which refer back to the un-processed source. I am generating
> tags from the resulting .cpp files. Is there any way to configure global to
> handle those directives, so that search results only include the
> un-processed files?
Hi,
You can configure it. Please copy and rewrite configuration file for gtags.
It is assumed that the suffix of your files is '.XYZ'.
$ cp /usr/local/share/gtags.conf $HOME/.globalrc # copy configuration file into
# your home directory
$ vi $HOME/.globalrc # rewrite cpp: entry
+------------------------------------------------------------------------------------
|:langmap=c\:.c.h,yacc\:.y,asm\:.s.S,java\:.java,cpp\:.c++.cc.cpp.cxx.hxx.hpp.C.H,
|
v
+------------------------------------------------------------------------------------
|:langmap=c\:.c.h,yacc\:.y,asm\:.s.S,java\:.java,cpp\:.c++.cc.XYZ.cxx.hxx.hpp.C.H,
$ cd [your source directory]
$ gtags
But I don't know whether gtags can treat the special syntax in your source file.
Luck is wished.
--
Shigio YAMAGUCHI <address@hidden> - GNU Project
PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3