.\" This file is generated automatically by convert.pl from gtags/manual.in. .TH GTAGS 1 "March 2008" "GNU Project" .SH NAME gtags \- create tag files for global. .SH SYNOPSIS \fBgtags\fP [-iIqvw][-f \fIfile\fP][-n \fInumber\fP][\fIdbpath\fP] .br .SH DESCRIPTION \fBGtags\fP recursively collect the source files under the current directory, pickup symbols and write the cross-reference data into tag files (\'GTAGS\', \'GRTAGS\', \'GSYMS\' and \'GPATH\'). You should execute this command at the root of the source tree. .PP C, C++, yacc, java, PHP and Assembly source files are supported. Files whose names end in \'.c\' or \'.h\' are assumed to be C source files. Files whose names end in \'.c++\' \'.cc\' \'.cpp\' \'.cxx\' \'.hxx\' \'.hpp\' \'.C\' \'.H\' are assumed to be C++ source files. Files whose names end in \'.y\' are assumed to be YACC source files. Files whose names end in \'.java\' are assumed to be Java source files. Files whose names end in \'.php\' \'.php3\' \'.phtml\' are assumed to be PHP source files. Files whose names end in \'.s\' or \'.S\' are assumed to be Assembly source files. Other files are assumed to be text files. .SH OPTIONS The following options are available: .TP \fB--config\fP[=\fIname\fP] Show the value of config variable \fIname\fP. If \fIname\fP is not specified then show whole of config entry. .TP \fB-f\fP, \fB--file\fP \fIfile\fP Read from \fIfile\fP 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 \fIfile\fP is \'-\', read from standard input. File names must be separated by newline. .TP \fB--gtagsconf\fP \fIfile\fP Load user's configuration from \fIfile\fP. .TP \fB--gtagslabel\fP \fIlabel\fP \fIlabel\fP is used as the label of configuration file. The default is default. .TP \fB-I\fP, \fB--idutils\fP Make index files for \fBidutils\fP(1) too. .TP \fB-i\fP, \fB--incremental\fP Update tag files incrementally. You had better use \fBglobal\fP(1) with the -u option. .TP \fB-n\fP, \fB--max-args\fP \fInumber\fP Maximum number of arguments for \fBgtags-parser\fP(1). By default, gtags invokes \fBgtags-parser\fP with arguments as many as possible to decrease the frequency of invoking. .TP \fB-q\fP, \fB--quiet\fP Quiet mode. .TP \fB-v\fP, \fB--verbose\fP Verbose mode. .TP \fB-w\fP, \fB--warning\fP Print warning messages. .TP \fIdbpath\fP 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. .SH EXAMPLES .nf $ ls -F Makefile src/ lib/ $ gtags -v $ global -x main main 10 src/main.c main (argc, argv) { .fi .SH FILES .TP \'GTAGS\' Tag file for function definitions. .TP \'GRTAGS\' Tag file for function references. .TP \'GSYMS\' Tag file for other symbols. .TP \'GPATH\' Tag file for path of source files. .TP \'/etc/gtags.conf\', \'$HOME/.globalrc\' Configuration file. .SH ENVIRONMENT The following environment variables affect the execution of \fBgtags\fP: .TP \fBGTAGSCONF\fP If this variable is set, its value is used as the configuration file. The default is \'$HOME/.globalrc\'. .TP \fBGTAGSLABEL\fP If this variable is set, its value is used as the label of configuration file. The default is default. .TP \fBGTAGSCACHE\fP If this variable is set, its value is used as the size of B-tree cache. The default is 5000000 (bytes). .TP \fBGTAGSFORCECPP\fP If this variable is set, each file whose suffix is 'h' is treated as a C++ source file. .SH CONFIGURATION The following configuration variables affect the execution of \fBgtags\fP. You can see the default value for each variable with the \fB--config\fP option. .TP GTAGS(string) If this variable is set, its value is used as the command line of the parser for GTAGS. The default is \'gtags-parser %s\'. .TP GRTAGS(string) If this variable is set, its value is used as the command line of the parser for GRTAGS. The default is \'gtags-parser -r %s\'. .TP GSYMS(string) If this variable is set, its value is used as the command line of the parser for GSYMS. The default is \'gtags-parser -s %s\'. .TP icase_path(boolean) Ignore case distinctions in the path. Suffixes check are affected by this capability. .TP 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'. .TP skip(comma separated list) \fBGtags\fP skips files which are listed in this list. As a special exception, \fBgtags\fP collect values from multiple skip variables. If the value ends with '/', it assumed as a directory and \fBgtags\fP skips all files under it. If the value start with '/', it assumed relative path from the root of source directory. .TP suffixes(comma separated list) Suffixes of target source file. As a special exception, \fBgtags\fP collect values from multiple suffixes variables. This variable is obsoleted. If the langmap variable is defined \fBgtags\fP no longer refers this. .SH DIAGNOSTICS \fBGtags\fP exits with a non 0 value if an error occurred, 0 otherwise. .SH "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. .SH "SEE ALSO" \fBgtags-parser\fP(1), \fBglobal\fP(1), \fBhtags\fP(1). .PP GNU GLOBAL source code tag system .br (http://www.gnu.org/software/global/). .SH BUG \'GTAGS\', \'GRTAGS\' and \'GSYMS\' are very large. In advance of using this command, check the space of your disk. .PP Assembly support is far from complete. It extracts only ENTRY() and ALTENTRY() from source file. Probably valid only for FreeBSD and Linux kernel source. .PP There is no concurrency control about tag files. .SH AUTHOR Tama Communications Corporation. .SH HISTORY The \fBgtags\fP command appeared in FreeBSD 2.2.2.