Main
AutoGen
Pages
Home
Announce
FAQ
docs
XML Defs
testimonials
downloads
Automated
Options
AutoOpts
Comparison
Man example
Redistribute
Licensing
local use
using getopt
GCC's
Fixincludes
fixincludes
Automated
FSM
description
example
usagefsm
Addons
addon
Automated
XDR
xdr project
This is just a brief summary. The detailed information can be found in the gcc sources: gcc/fixinc/README.
There is no need to comprehend immensly complex shell scripting. There is a little bit of effort required to "define a new fix", but the syntax and examples are fairly simple and straight forward. Here is a very simple example that changes a reserved word used as a prototype argument into a non-reserved word. For the real details, see the README:
/*
* class in Xm/BaseClassI.h
*/
fix = {
hackname = x11_class_usage;
files = Xm/BaseClassI.h;
bypass = "__cplusplus"; /* skip fix if C++ aware */
select = " class\\)"; /* apply fix if found */
c_fix = format;
c_fix_arg = " c_class)";
test_text = "extern mumble (int class);\n";
};
This "include hack" will replace every occurrance of " class)"
in the file ``/usr/include/Xm/BaseClassI.h'' with
" c_class)", thus converting the test_text to:
extern mumble (int c_class);
The "select" expression is
a regex regular expression.
The AutoGen tool can do other things, too, of course. The interested are invited to read its doc and, please, let me know if they put it to work, even if it is only for Automated Option Processing. (AutoOpts is included with AutoGen).
top Viewable With Any Browser Valid XHTML 1.0!