Setup GNU Global source code tagging

This article is written based on the GNU Global tutorial. Follow the below steps in the root directory of the project source code.

  1. Install required tools apt install global cflow #Cflow is optionally need to generate call-tree

  2. Generate Gtags gtags --explain --skip-symlink --statistics

  3. Generate Htags

    htags --auto-completion --colorize-warned-line --dynamic --frame --form --fixed-guide \
          --icon --line-number --map-file --other --symbol --show-position --table-list \
          --warning --func-header=right --tree-view=filetree \
          --title 'Welcome to XXXX source code navigation!'
  4. See the man page for command line usage. Here we will discuss the usage of the HTML version.

  5. Running htags will generate the static HTML pages in the HTML folder in the current path. Open the web browser with HTML file as an argument and explore the source code. firefox HTML/index.html

  6. Alternatively to the step 5, run Htags-server and connect through the http://localhost:8000

    $ htags-server
    Python2 http/cgi server
    Serving HTTP on 127.0.0.1 port 8000 ...

Last updated