Chinaunix首页 | 论坛 | 博客
  • 博客访问: 439865
  • 博文数量: 88
  • 博客积分: 2677
  • 博客等级: 少校
  • 技术积分: 893
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-13 08:01
文章分类

全部博文(88)

文章存档

2017年(3)

2016年(1)

2012年(4)

2011年(4)

2010年(57)

2009年(19)

我的朋友

分类: LINUX

2009-12-24 14:25:00

自己顺便翻译的,对付着看吧

gtags - create tag files for global.

概要 大纲

gtags [-ciIOqvw][-d tag-file][-f file][-n number][dbpath]

说明描述

Gtags 递归收集在当前路径下的源文件, 得到标记和向tag(`GTAGS', `GRTAGS', `GSYMS' and `GPATH')文件中写相互参照数据. 应该在source treeroot位置执行这个命令.

支持C, C++, yacc, java, PHPAssembly 源文件.
`.c' or `.h' 被假设为 C source files.
`.c++' `.cc' `.cpp' `.cxx' `.hxx' `.hpp' `.C' `.H' 被假设为C++ source files.
`.y'
被假设为 YACC source files.
 `.java'被假设为Java source files.
`.php' `.php3' `.phtml'被假设为PHP source files.
 `.s' or `.S'被假设为Assembly source files.
其他文件被假设为text files.

选项

提供下列选项 The following options are available:

`-c', `--compact'

用压缩格式(compact format)生成. 这个选项不影响 GRTAGS and GSYMS, 因为他们总是用压缩格式(compact format)生成.

`--config'[=name]

显示config变量名. 如果名字未被指定那么显示完整的config入口.

`-d', `--dump' tag-file

删掉一个tag文件. 输出格式是 'keydata'. for debugging.

`-f', `--file' file

从文件名列表读取源文件中的候选文件.默认:当前路径下所有的文件均为候选文件. 如果文件时 `-', 那么从标准输入读取. 文件名必须被newline分隔.

`--gtagsconf' file

file读取用户的configuration.

`--gtagslabel' label

label 是被用作configuration文件的label. 默认是 default.

`-I', `--idutils'

也从idutils(1)生成索引文件.

 

`-i', `--incremental'

渐进更新tag文件.最好用 global(1) -u 选项.

`-n', `--max-args' number

参数的最大number for gtags-parser(1). 默认:, gtags 调用 gtags-parser 加参数, 尽可能多的减少调用频率.

`-O', `--objdir'

objdir dbpath那样. 如果 `$MAKEOBJDIRPREFIX' 路径存在, gtags 创建 `$MAKEOBJDIRPREFIX/' 文件夹 并生成tag文件在此. 如果 dbpath 被指定, 这个选项将被忽略.

`--single-update' file

更新 tag 文件为单个文件. 文件被更新,据估计文件被更新,并且其他的文件不被更新. 这个文件必须是当前目录的相对路径名. 这个选项暗含着 -i 选项. 如果这个文件是新的那么`--single-update' 被忽略, 并且这个处理将自动地被切换到正常的增量更新.

`-q', `--quiet'

安静模式.

`-v', `--verbose'

详细模式.

`-w', `--warning'

打印警告消息.

 

dbpath

这个目录是tag文件被生成的目录. 默认是当前目录. 他是有用的,当你的源目录被保存在一个只读设备中时(例如,CDROM.

        $ ls -F

        Makefile      src/    lib/

        $ gtags -v

        $ global -x main

        main              10 src/main.c  main (argc, argv) {

`GTAGS'

Tag file for object definitions.

`GRTAGS'

Tag file for object references.

`GSYMS'

Tag file for other symbols(符号,标志).

`GPATH'

Tag file for path of source files.

`/etc/gtags.conf', `$HOME/.globalrc'

Configuration file.

下面的环境变量影响gtags的执行:

GTAGSCONF

如果这个值被设置, 他的值被用于configuration文件. 默认是 `$HOME/.globalrc'.

GTAGSLABEL

如果这个值被设置, 他的值被用于 the label of configuration 文件. The default is default.

GTAGSCACHE

如果这个值被设置, 他的值被用于the size of B-tree cache(缓存). 默认是50000000 (bytes).

GTAGSFORCECPP

如果这个值被设置, 每一个后缀是 'h' 的文件将被当做C++ source 文件.

MAKEOBJDIRPREFIX

如果这个值被设置, `$MAKEOBJDIRPREFIX' 被用于 一个目标的前缀目录. The default is `/usr/obj'.

 

 

The following configuration variables affect the execution of gtags. You can see the default value for each variable with the `--config' option.

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'.

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'.

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'.

icase_path(boolean)

Ignore case distinctions in the path. Suffixes check are affected by this capability.

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'.

skip(comma separated list)

Gtags skips files which are listed in this list. As a special exception, gtags collect values from multiple 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.

suffixes(comma separated list)

Suffixes of target source file. As a special exception, gtags collect values from multiple suffixes variables. This variable is obsoleted. If the langmap variable is defined gtags no longer refers this.

诊断

如果发生错误Gatag返回一个非0值。否者返回0.

详细信息有重要的级别. The most important level is 0, the second is 1 and so on. All the message has level numbers leading(领先) blanks.

gtags-parser(1), global(1), htags(1).

GNU GLOBAL source code tag system
().

`GTAGS', `GRTAGS' and `GSYMS' 非常大. 在使用这个命令之前请检查磁盘空间.

Assembly support is far from complete. It extracts only ENTRY() and ALTENTRY() from source file. 也许仅支持FreeBSD Linux kernel source 有效.

他们不并行控制tag文件.

Tama Communications Corporation通信公司.

The gtags command appeared in FreeBSD 2.2.2.


阅读(3227) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~