To simplify using cxref on existing source code, there is now a shell script that will call the C compiler and then call cxref to process the source file. This means that it can be used as a drop in replacement for CC in Makefiles and the like.
Usage: cxref-cc [usual cc options]
The name of the source file is extracted from the list of options as well as the ``-D*'', ``-I*'', ``-U*'' flags and when the C compiler exits succesfully cxref will be called. The name of the C compiler to use is controlled by the CXREFCC environment variable, or if this is not set then the CC environment variable, or failing this just gcc.
Using this script requires the use of a `.cxref' configuration file to contain the options since there is nowhere to put the options on the command line for the C compiler.
This will only cross-reference and document the C source files since they are the only ones that are compiled, but it will make sure that they are cross-referenced with the correct options etc.