Quoting Mark Mitchell <m...@codesourcery.com>:

http://gcc.gnu.org/ml/gcc-patches/2010-05/msg02255.html

OK, I see what that is doing.  Why did you choose to use a .def file
rather than something more like Doxygen to generate the documentation?

It is not only used to generate documenation, but also to generate
initializers for all the struct gcc_target members.  While at the same
time serving as an include file for target.h .

Also, the documentation generation allows the generation of @findex
statements by using @fcode instaed of @code, and places these @findex statements at the start of the enclosing paragraph; however, this part is
not really introducing any extra licensing issues, and describing the
operation in detail would probably be distracting.

Search for GPL and/or GFDL for a sample of things that we currently
can't fix due to licensing issues.

I'm happy to act as an advocate, but I don't have the time to do a lot
of research.  Would you please describe the steps and provide the inputs
and outputs of the process for some of these issues?

For a typical hook member, we got the following macro:

DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT)

TYPE and PARAMS is wrapped in @var as appropriate and prepended / appended to the capitalized NAME to give the target hook signature in the documentation. Also, NAME usually gets prepended with a prefix; the current prefix is specified in separate macro in target.def.

E.g.:

DEFHOOK
(adjust_cost_2,
 "Given the current cost, @var{cost}, of an insn, @var{insn}, calculate and\
 return a new cost based on its relationship to @var{dep_insn} through the\
 dependence of weakness @var{dw}.  The default is to make no adjustment.",
 int, (rtx insn, int dep_type1, rtx dep_insn, int cost, int dw), NULL)

Gives:

@deftypefn {Target Hook} int TARGET_SCHED_ADJUST_COST_2 (rtx @var{insn}, int @var{dep_type1}, rtx @var{dep_insn}, int @var{cost}, int @var{dw}) Given the current cost, @var{cost}, of an insn, @var{insn}, calculate and return a new cost based on its relationship to @var{dep_insn} through the dependence of weakness @var{dw}. The default is to make no adjustment.
@end deftypefn

Because of licensing issues, my patch so far uses DEFHOOK_UNDOC for adjust_cost_2 instead, so that the hook remains undocumented.

 I want to able to
show RMS an actual input file, an actual output file, and describe the
transformation process that leads from one to the other.

target.def is a GPLed input file, and tm.texi.in is a GFDLed input file.
tm.texi is the GFDLed output file.

If you like, I can send you the complete files in non-patch form.

Reply via email to