This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to tm.texi
- To: <gcc-patches at gcc dot gnu dot org>
- Subject: Patch to tm.texi
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Tue, 5 Jun 2001 11:40:37 +0100 (BST)
An overfull hbox in tm.texi caused me to notice that the use of N_ in
TARGET_SWITCHES and TARGET_OPTIONS wasn't documented. This patch
fixes that, the original overfull hbox, and notes that documentation
in invoke.texi is also needed. It passes "make info" and "make dvi";
OK to commit to mainline and branch?
2001-06-05 Joseph S. Myers <jsm28@cam.ac.uk>
* 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.
--- tm.texi.orig Fri Jun 1 16:51:18 2001
+++ tm.texi Tue Jun 5 10:30:47 2001
@@ -630,11 +630,15 @@
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 @@
@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 @@
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 @@
@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
--
Joseph S. Myers
jsm28@cam.ac.uk