global

The global package contains several programs, global, gtags, gctags and htags. The gtags program is used to create and mantain the database that is used to look up information about the code. Once the database files have been generated the global program is used to move through the code. Most people use global with a text editor, such as emacs or vi, to look at the actual code, although global can also be used by itself.

The htags program takes the pre-generated database and generates a tree of web pages for spelunking the source code with a web browser. Many open source projects use htags to provide a browsable source base that is available over the Internet. For example http://fxr.watson.org/ provides browsable versions of several open source operating system kernels.

NOTE: Building a set of web pages from a large code base, for example the FreeBSD or a similar Operating System kernel can take a while and generate a lot of output. The FreeBSD kernel takes, on average, 300 Megabytes of space when run through htags. Make sure you have the time and space to do this.

To build the database do the following:

cd <your source directory>
gtags

To build web pages from your database:

cd <where you just ran gtags>
htags

Platforms: All Unix, Win32

global