From 561c1ae11356ee8b60b85113c948dafea9a76eb4 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 7 Jun 2001 17:41:27 +0100 Subject: [PATCH] tm.texi (TARGET_SWITCHES, [...]): Adjust markup. * doc/tm.texi (TARGET_SWITCHES, TARGET_OPTIONS): Adjust markup. Document use of N_(...), and show it in examples. Note that documentation should be added to invoke.texi. Avoid an overfull hbox. From-SVN: r42965 --- gcc/ChangeLog | 7 +++++++ gcc/doc/tm.texi | 18 +++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00352ed4d367..d625972de59b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-06-07 Joseph S. Myers + + * doc/tm.texi (TARGET_SWITCHES, TARGET_OPTIONS): Adjust markup. + Document use of N_(...), and show it in examples. Note that + documentation should be added to invoke.texi. Avoid an overfull + hbox. + Thu Jun 7 17:09:50 CEST 2001 Jan Hubicka * toplev.c (rest_of_compilation): Revert previous patch. diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 2e90a6f60952..1b262c33505e 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -630,11 +630,15 @@ with a subgrouping for each command option. Each subgrouping contains a string constant, that defines the option name, a number, which contains the bits to set in @code{target_flags}, and a second string which is the description -displayed by --help. If the number is negative then the bits specified +displayed by @option{--help}. If the number is negative then the bits specified by the number are cleared instead of being set. If the description string is present but empty, then no help information will be displayed for that option, but it will not count as an undocumented option. The actual option name is made by appending @samp{-m} to the specified name. +Non-empty description strings should be marked with @code{N_(@dots{})} for +@command{xgettext}. In addition to the description for @option{--help}, +more detailed documentation for each option should be added to +@file{invoke.texi}. One of the subgroupings should have a null string. The number in this grouping is the default value for @code{target_flags}. Any @@ -646,7 +650,8 @@ with opposite meanings, and picks the latter as the default: @smallexample #define TARGET_SWITCHES \ @{ @{ "68020", TARGET_MASK_68020, "" @}, \ - @{ "68000", -TARGET_MASK_68020, "Compile for the 68000" @}, \ + @{ "68000", -TARGET_MASK_68020, \ + N_("Compile for the 68000") @}, \ @{ "", TARGET_MASK_68020, "" @}@} @end smallexample @@ -657,10 +662,12 @@ options that have values. Its definition is an initializer with a subgrouping for each command option. Each subgrouping contains a string constant, that defines the fixed part -of the option name, the address of a variable, and a description string. +of the option name, the address of a variable, and a description string +(which should again be marked with @code{N_(@dots{})}). The variable, type @code{char *}, is set to the variable part of the given option if the fixed part matches. The actual option name is made -by appending @samp{-m} to the specified name. +by appending @samp{-m} to the specified name. Again, each option should +also be documented in @file{invoke.texi}. Here is an example which defines @samp{-mshort-data-@var{number}}. If the given option is @samp{-mshort-data-512}, the variable @code{m88k_short_data} @@ -669,7 +676,8 @@ will be set to the string @code{"512"}. @smallexample extern char *m88k_short_data; #define TARGET_OPTIONS \ - @{ @{ "short-data-", &m88k_short_data, "Specify the size of the short data section" @} @} + @{ @{ "short-data-", &m88k_short_data, \ + N_("Specify the size of the short data section") @} @} @end smallexample @findex TARGET_VERSION -- 2.43.5