@c This file is generated automatically by convert.pl from gtags/manual.in.
@unnumberedsubsec NAME
gtags - create tag files for global.
@unnumberedsubsec SYNOPSIS
@noindent
@quotation
gtags [-iIqvw][-f file][-n number][dbpath]@*
@end quotation
@unnumberedsubsec DESCRIPTION
Gtags recursively collect the source files under
the current directory,
pickup symbols and write the cross-reference data into tag files
(@file{GTAGS}, @file{GRTAGS}, @file{GSYMS} and @file{GPATH}).
You should execute this command at the root of the source tree.

C, C++, yacc, java, PHP and Assembly source files are supported.
Files whose names end in @file{.c} or @file{.h} are assumed to be
C source files.
Files whose names end in @file{.c++} @file{.cc} @file{.cpp} @file{.cxx}
@file{.hxx} @file{.hpp} @file{.C} @file{.H} are assumed to be C++ source files.
Files whose names end in @file{.y} are assumed to be YACC source files.
Files whose names end in @file{.java} are assumed to be Java source files.
Files whose names end in @file{.php} @file{.php3} @file{.phtml} are
assumed to be PHP source files.
Files whose names end in @file{.s} or @file{.S}
are assumed to be Assembly source files.
Other files are assumed to be text files.
@unnumberedsubsec OPTIONS
The following options are available:
@table @asis
@item @samp{--config}[=name]
Show the value of config variable name.
If name is not specified then show whole of config entry.
@item @samp{-f}, @samp{--file} file
Read from file a list of file names which should be
considered as the candidate of source files.
By default, all files under the current directory are
considered as the candidate.
If file is @file{-}, read from standard input.
File names must be separated by newline.
@item @samp{--gtagsconf} file
Load user's configuration from file.
@item @samp{--gtagslabel} label
label is used as the label of configuration file.
The default is @code{default}.
@item @samp{-I}, @samp{--idutils}
Make index files for idutils(1) too.
@item @samp{-i}, @samp{--incremental}
Update tag files incrementally. You had better use
global(1) with the -u option.
@item @samp{-n}, @samp{--max-args} number
Maximum number of arguments for gtags-parser(1).
By default, gtags invokes gtags-parser with arguments
as many as possible to decrease the frequency of invoking.
@item @samp{-q}, @samp{--quiet}
Quiet mode.
@item @samp{-v}, @samp{--verbose}
Verbose mode.
@item @samp{-w}, @samp{--warning}
Print warning messages.
@item dbpath
The directory in which tag files are generated.
The default is the current directory.
It is useful when your source directory is on a read only
device like CDROM.
@end table
@unnumberedsubsec EXAMPLES
@example
	$ ls -F
	Makefile      src/    lib/
	$ gtags -v
	$ global -x main
	main              10 src/main.c  main (argc, argv) @{
@end example
@unnumberedsubsec FILES
@table @asis
@item @file{GTAGS}
Tag file for function definitions.
@item @file{GRTAGS}
Tag file for function references.
@item @file{GSYMS}
Tag file for other symbols.
@item @file{GPATH}
Tag file for path of source files.
@item @file{/etc/gtags.conf}, @file{$HOME/.globalrc}
Configuration file.
@end table
@unnumberedsubsec ENVIRONMENT
The following environment variables affect the execution of gtags:
@table @asis
@item @var{GTAGSCONF}
If this variable is set, its value is used as the
configuration file. The default is @file{$HOME/.globalrc}.
@item @var{GTAGSLABEL}
If this variable is set, its value is used as the label
of configuration file. The default is @code{default}.
@item @var{GTAGSCACHE}
If this variable is set, its value is used as the size of
B-tree cache. The default is 5000000 (bytes).
@item @var{GTAGSFORCECPP}
If this variable is set, each file whose suffix is 'h' is treated
as a C++ source file.
@end table
@unnumberedsubsec CONFIGURATION
The following configuration variables affect the execution of gtags.
You can see the default value for each variable with the @samp{--config} option.
@table @asis
@item @code{GTAGS}(string)
If this variable is set, its value is used as the
command line of the parser for GTAGS. The default is @file{gtags-parser %s}.
@item @code{GRTAGS}(string)
If this variable is set, its value is used as the
command line of the parser for GRTAGS. The default is @file{gtags-parser -r %s}.
@item @code{GSYMS}(string)
If this variable is set, its value is used as the
command line of the parser for GSYMS. The default is @file{gtags-parser -s %s}.
@item @code{icase_path}(boolean)
Ignore case distinctions in the path.
Suffixes check are affected by this capability.
@item @code{langmap}(comma separated list)
Language mapping. Each comma-separated map consists of
the language name, a colon, and a list of file extensions.
Default mapping is 'c:.c.h,yacc:.y,asm:.s.S,java:.java,cpp:.c++.cc.cpp.cxx.hxx.hpp.C.H,php:.php.php3.phtml'.
@item @code{skip}(comma separated list)
Gtags skips files which are listed in this list.
As a special exception, gtags collect values from multiple @code{skip} variables.
If the value ends with '/', it assumed as a directory and gtags skips all files under it.
If the value start with '/', it assumed relative path from the root of source directory.
@item @code{suffixes}(comma separated list)
Suffixes of target source file.
As a special exception, gtags collect values from multiple @code{suffixes} variables.
This variable is obsoleted. If the langmap variable is defined
gtags no longer refers this.
@end table
@unnumberedsubsec DIAGNOSTICS
Gtags exits with a non 0 value if an error occurred, 0 otherwise.
@unnumberedsubsec MESSAGE FORMAT
Verbose message has important level. The most important level is 0,
the second is 1 and so on. All the message has level numbers leading
blanks.
@unnumberedsubsec SEE ALSO
gtags-parser(1),
global(1),
htags(1).

GNU GLOBAL source code tag system@*
(http://www.gnu.org/software/global/).
@unnumberedsubsec BUG
@file{GTAGS}, @file{GRTAGS} and @file{GSYMS} are very large.
In advance of using this command, check the space of your disk.

Assembly support is far from complete.
It extracts only ENTRY() and ALTENTRY() from source file.
Probably valid only for FreeBSD and Linux kernel source.

There is no concurrency control about tag files.
@unnumberedsubsec AUTHOR
Tama Communications Corporation.
@unnumberedsubsec HISTORY
The gtags command appeared in FreeBSD 2.2.2.
