FIXINCLUDES OPERATION
=====================
-See also: http://autogen.linuxbox.com/fixincludes
+See also: http://autogen.SourceForge.net/fixincludes
The set of fixes required was distilled down to just the data required
to specify what needed to happen for each fix. Those data were edited
into a file named gcc/fixinc/inclhack.def. A program called
-AutoGen (http://autogen.linuxbox.com) uses these definitions to
-instantiate several different templates (gcc/fixinc/*.tpl) that then
+AutoGen (http://autogen.SourceForge.net, ver 4.x) uses these definitions
+to instantiate several different templates (gcc/fixinc/*.tpl) that then
produces a fixincludes replacement shell script (inclhack.sh), a
-replacement binary program (fixincl.x) and a script to drive the
-binary fixincl.sh).
+replacement binary program (fixincl.x).
If there is no special purpose script, then mkfixinc.sh will try to
-compile, link and test execute the binary version. If it cannot be
-successfully built, the shell version will be used instead. If
-mkfixinc.sh determines that your system needs machine-specific fixes
-that have not yet been applied to inclhack.def, it will install and
-use the current fixinc.* for that system instead.
+compile, link and execute the fixincl program. Otherwise, it will
+install and use the current fixinc.* for that system instead.
+Also, on certain platforms (viz. those that do not have functional
+bidirectional pipes), the fixincl program is split into two.
+This should only concern you on DOS and BeOS.
Regards,
- Bruce <autogen@linuxbox.com>
+ Bruce <bkorb@gnu.org>
information to gcc-bugs@gcc.gnu.org, gcc-patches@gcc.gnu.org and,
please, to me: bkorb@gnu.org.
+Once you have made your fix, it is necessary to have at least one
+test for it. Specify the test with a "test_text" entry. Run
+"make check" in the fixinc directory to verify both that your fix
+works (by correctly altering your test text) and that your fix
+does not suppress the work of other fixes. You should readily
+be able to verify this as the "make check" process will print out
+context diffs of fixed files. If everything looks fine, you can
+either use the diffs for a patch to the baseline files, or simply
+copy the result files (in the "tests/res/" subdirectory) into the
+baseline directory ("tests/base").
+
Here are the rules for making fixes in the inclhack.def file:
+0. If you are not the fixincludes maintainer, please send that
+ person email about any changes you may want to make. Thanks!
+
1. Every fix must have a "hackname" that is compatible with C syntax
for variable names and is unique without regard to alphabetic case.
Please keep them alphabetical by this name. :-)
It is nice if:
3. The expression is as simple as possible to both
- process and uderstand by people. :-)
+ process and understand by people. :-)
Please take advantage of the fact AutoGen will glue
together string fragments. It helps. Also take note
to the empty string. Both or the second "c_fix_arg"s may be
omitted and the file will still be wrapped.
+ THERE IS A SPECIAL EXCEPTION TO THIS, HOWEVER:
+
+ If the regular expression '#if.*__need' is found, then it is
+ assumed that the file needs to be read and interpreted more
+ than once. However, the prolog and epilog text (if any) will
+ be inserted.
+
v) format - Replaces text selected with a regular expression with
a specialized formating string. The formatting works as follows:
The format text is copied to the output until a '%' character
replaced. You may delete text by supplying an empty string for
the format (the first "c_fix_arg").
+ Note: In general, a format c_fix may be used in place of one
+ sed expression. However, it will need to be rewritten by
+ hand. For example:
+
+ sed = 's@^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7$'
+ '@& || __GNUC__ >= 3@';
+
+ may be rewritten using a format c_fix as:
+
+ c_fix = format;
+ c_fix_arg = '%0 || __GNUC__ >= 3';
+ c_fix_arg = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7$';
+
+ Multiple sed substitution expressions probably ought to remain sed
+ expressions in order to maintain clarity. Also note that if the
+ second sed expression is the same as the first select expression,
+ then you may omit the second c_fix_arg. The select expression will
+ be picked up and used in its absence.
+
EXAMPLES OF FIXES:
==================