|
Antelope FAQ Program Development General |
| Question |
| How can I sort through the output of the contributed-code compilation, or other Antelope Make process? |
| Answer |
| The output of a long-running 'make' process can often be tedious to decipher,
especially when there are entrained warnings and small failures which may
not be readily apparent in the quickly scrolling text.
The cf(1) utility, recently submitted to the Antelope contributed-code repository, is a Perl recursive-descent parser which dynamically builds a parsing grammar from an Antelope parameter-file. Rephrased: this tool allows you to print lines of text in colors depending on their content. The default example turns compilation and build commands blue, normal command output cyan, warnings magenta, errors red, and source-code directory traversal information green. These are of course completely configurable, as well as are the patterns which are matched in the lines to be colorized. Similar tools are available on the web for colorizing the output of gcc compiles, however this one is tailored for the entire Antelope build process. A standard way to use the cf(1) utility for Antelope make procedures, assuming the user is running tcsh(1), might be as follows:
% cd $ANTELOPE/src/contrib
% make install |& cf
or
% alias cmake 'make !\* |& cf'
% cmake install
The output of this should be a colorized re-telling of the compile process, with 'hot' colors representing problems. (other shells will require different redirection characters). The completely dynamic nature of the grammar construction from the parameter files allows cf(1) to be used for purposes entirely unrelated to translating makefile output, for example colorizing CVS (Concurrent Versioning System) update command output or anything else that one desires to express in the parameter file. The source-code for cf(1) is openly available from the Antelope contributed-code repository under
contrib/bin/utility/cf
|
| Kent Lindquist 10 Jul 2007 |
| FAQ Co-op Coordinator Daniel M. Quinlan |