makeindex

makeindex - Process index output to produce typesettable code. A general purpose hierarchical index generator; it accepts one or more input files (often produced by a text formatter such as TEX or troff), sorts the entries, and produces an output file which can be formatted. The formats of the input and output files are specified in a style file; by default, input is assumed to be an .idx file, as generated by LATEX.