This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Document @file


This patch (a) uses the new at-file.texi in libiberty, instead of
replicating the text in binutils.texi, and (b) adds @file
documentation to gas, gld, and gprof.

OK?

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2005-10-07  Mark Mitchell  <mark@codesourcery.com>

	* doc/Makefile.am (config.texi): Set top_srcdir.
	* doc/Makefile.in: Regenerated.
	* doc/binutils.texi: Use at-file.texi from libiberty.

2005-10-07  Mark Mitchell  <mark@codesourcery.com>

	* as.c (show_usage): Document @file.
	* doc/Makefile.am (asconfig.texi): Set top_srcdir.
	* doc/Makefile.in: Regenerated.
	* doc/as.texinfo: Document @file.

2005-10-07  Mark Mitchell  <mark@codesourcery.com>

	* Makefile.am (gprof.info): Depend on ...
	(config.texi): ... new target.
	* Makefile.in: Regenerated.
	* gprof.c (usage): Document @file.
	* gprof.texi: Document @file.

2005-10-07  Mark Mitchell  <mark@codesourcery.com>

	* Makefile.am (configdoc.texi): Set top_srcdir.
	* Makefile.in: Regenerated.
	* ld.texinfo: Document @file.
	* lexsup.c (help): Likewise.

Index: binutils/doc/Makefile.am
===================================================================
RCS file: /cvs/src/src/binutils/doc/Makefile.am,v
retrieving revision 1.9
diff -c -5 -p -r1.9 Makefile.am
*** binutils/doc/Makefile.am	17 May 2005 19:43:41 -0000	1.9
--- binutils/doc/Makefile.am	7 Oct 2005 15:09:27 -0000
*************** binutils_TEXI = $(srcdir)/binutils.texi
*** 37,46 ****
--- 37,47 ----
  config.texi: $(srcdir)/../../bfd/configure $(binutils_TEXI)
  	rm -f config.texi
  	eval `grep '^ *VERSION=' $(srcdir)/../../bfd/configure`; \
  	  echo "@set VERSION $$VERSION" > $@
  	echo "@set UPDATED `date "+%B %Y"`" >> config.texi
+ 	echo "@set top_srcdir $(top_srcdir)" >> config.texi
  
  # Man page generation from texinfo
  addr2line.1:	$(binutils_TEXI)
  	touch $@
  	-$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
Index: binutils/doc/binutils.texi
===================================================================
RCS file: /cvs/src/src/binutils/doc/binutils.texi,v
retrieving revision 1.79
diff -c -5 -p -r1.79 binutils.texi
*** binutils/doc/binutils.texi	3 Oct 2005 19:37:44 -0000	1.79
--- binutils/doc/binutils.texi	7 Oct 2005 15:09:27 -0000
*************** objdump(1), and the Info entries for @fi
*** 3440,3462 ****
  
  The following command-line options are supported by all of the
  programs described in this manual.
  
  @table @env
! @item @@@var{file}
! Read command-line options from @var{file}.  The options read are
! inserted in place of the original @@@var{file} option.  If @var{file}
! does not exist, or cannot be read, then the option will be treated
! literally, and not removed.  
! 
! Options in @var{file} are separated by whitespace.  A whitespace
! character may be included in an option by surrounding the entire
! option in either single or double quotes.  Any character (including a
! backslash) may be included by prefixing the character to be included
! character with a backslash.  The @var{file} may itself contain
! additional @@@var{file} options; any such options will be processed
! recursively.
  
  @item --help
  Display the command-line options supported by the program.
  
  @item --version
--- 3440,3450 ----
  
  The following command-line options are supported by all of the
  programs described in this manual.
  
  @table @env
! @include @value{top_srcdir}/../libiberty/at-file.texi
  
  @item --help
  Display the command-line options supported by the program.
  
  @item --version
Index: gas/as.c
===================================================================
RCS file: /cvs/src/src/gas/as.c,v
retrieving revision 1.65
diff -c -5 -p -r1.65 as.c
*** gas/as.c	30 Sep 2005 16:37:32 -0000	1.65
--- gas/as.c	7 Oct 2005 15:09:27 -0000
*************** Options:\n\
*** 344,353 ****
--- 344,355 ----
    --listing-rhs-width     set the max width in characters of the lines from\n\
                            the source file\n"));
    fprintf (stream, _("\
    --listing-cont-lines    set the maximum number of continuation lines used\n\
                            for the output data column of the listing\n"));
+   fprintf (stream, _("\
+   @FILE                   read options from FILE\n")); 
  
    md_show_usage (stream);
  
    fputc ('\n', stream);
    fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
Index: gas/doc/Makefile.am
===================================================================
RCS file: /cvs/src/src/gas/doc/Makefile.am,v
retrieving revision 1.36
diff -c -5 -p -r1.36 Makefile.am
*** gas/doc/Makefile.am	30 Sep 2005 15:05:07 -0000	1.36
--- gas/doc/Makefile.am	7 Oct 2005 15:09:28 -0000
*************** man_MANS = as.1
*** 17,29 ****
  
  info_TEXINFOS = as.texinfo 
  
  asconfig.texi: $(CONFIG).texi
  	rm -f asconfig.texi
! 	ln -s $(srcdir)/$(CONFIG).texi ./asconfig.texi >/dev/null 2>&1 \
! 	  || ln $(srcdir)/$(CONFIG).texi ./asconfig.texi >/dev/null 2>&1 \
! 	  || cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
  
  CPU_DOCS = \
  	c-alpha.texi \
  	c-arc.texi \
  	c-arm.texi \
--- 17,28 ----
  
  info_TEXINFOS = as.texinfo 
  
  asconfig.texi: $(CONFIG).texi
  	rm -f asconfig.texi
! 	cp $(srcdir)/$(CONFIG).texi ./asconfig.texi	
! 	echo "@set top_srcdir $(top_srcdir)" >> ./asconfig.texi
  
  CPU_DOCS = \
  	c-alpha.texi \
  	c-arc.texi \
  	c-arm.texi \
Index: gas/doc/as.texinfo
===================================================================
RCS file: /cvs/src/src/gas/doc/as.texinfo,v
retrieving revision 1.131
diff -c -5 -p -r1.131 as.texinfo
*** gas/doc/as.texinfo	3 Oct 2005 09:41:06 -0000	1.131
--- gas/doc/as.texinfo	7 Oct 2005 15:09:28 -0000
*************** gcc(1), ld(1), and the Info entries for 
*** 229,240 ****
   [@b{-K}] [@b{-L}] [@b{--listing-lhs-width}=@var{NUM}]
   [@b{--listing-lhs-width2}=@var{NUM}] [@b{--listing-rhs-width}=@var{NUM}]
   [@b{--listing-cont-lines}=@var{NUM}] [@b{--keep-locals}] [@b{-o}
   @var{objfile}] [@b{-R}] [@b{--reduce-memory-overheads}] [@b{--statistics}]
   [@b{-v}] [@b{-version}] [@b{--version}] [@b{-W}] [@b{--warn}]
!  [@b{--fatal-warnings}] [@b{-w}] [@b{-x}] [@b{-Z}] [@b{--target-help}]
!  [@var{target-options}] [@b{--}|@var{files} @dots{}]
  @c
  @c Target dependent options are listed below.  Keep the list sorted.
  @c Add an empty line for separation. 
  @ifset ALPHA
  
--- 229,241 ----
   [@b{-K}] [@b{-L}] [@b{--listing-lhs-width}=@var{NUM}]
   [@b{--listing-lhs-width2}=@var{NUM}] [@b{--listing-rhs-width}=@var{NUM}]
   [@b{--listing-cont-lines}=@var{NUM}] [@b{--keep-locals}] [@b{-o}
   @var{objfile}] [@b{-R}] [@b{--reduce-memory-overheads}] [@b{--statistics}]
   [@b{-v}] [@b{-version}] [@b{--version}] [@b{-W}] [@b{--warn}]
!  [@b{--fatal-warnings}] [@b{-w}] [@b{-x}] [@b{-Z}] [@b{@@@var{FILE}}]
!  [@b{--target-help}] [@var{target-options}]
!  [@b{--}|@var{files} @dots{}]
  @c
  @c Target dependent options are listed below.  Keep the list sorted.
  @c Add an empty line for separation. 
  @ifset ALPHA
  
*************** gcc(1), ld(1), and the Info entries for 
*** 435,444 ****
--- 436,447 ----
  @end smallexample
  
  @c man begin OPTIONS
  
  @table @gcctabopt
+ @include @value{top_srcdir}/../libiberty/at-file.texi
+ 
  @item -a[cdhlmns]
  Turn on listings, in any of a variety of ways:
  
  @table @gcctabopt
  @item -ac
Index: gprof/Makefile.am
===================================================================
RCS file: /cvs/src/src/gprof/Makefile.am,v
retrieving revision 1.23
diff -c -5 -p -r1.23 Makefile.am
*** gprof/Makefile.am	14 Apr 2005 05:26:37 -0000	1.23
--- gprof/Makefile.am	7 Oct 2005 15:09:32 -0000
*************** TEXI2POD = perl $(srcdir)/../etc/texi2po
*** 56,65 ****
--- 56,70 ----
  POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
  
  info_TEXINFOS = gprof.texi
  man_MANS = gprof.1
  
+ $(srcdir)/gprof.info: config.texi
+ 
+ config.texi:
+ 	echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
+ 
  # Build the man page from the texinfo file
  # The sed command removes the no-adjust Nroff command so that
  # the man output looks standard.
  gprof.1: $(srcdir)/gprof.texi
  	touch $@
Index: gprof/gprof.c
===================================================================
RCS file: /cvs/src/src/gprof/gprof.c,v
retrieving revision 1.24
diff -c -5 -p -r1.24 gprof.c
*** gprof/gprof.c	30 Sep 2005 16:37:32 -0000	1.24
--- gprof/gprof.c	7 Oct 2005 15:09:32 -0000
*************** Usage: %s [-[abcDhilLsTvwxyz]] [-[ACeEfF
*** 165,175 ****
  	[--directory-path=dirs] [--display-unused-functions]\n\
  	[--file-format=name] [--file-info] [--help] [--line] [--min-count=n]\n\
  	[--no-static] [--print-path] [--separate-files]\n\
  	[--static-call-graph] [--sum] [--table-length=len] [--traditional]\n\
  	[--version] [--width=n] [--ignore-non-functions]\n\
! 	[--demangle[=STYLE]] [--no-demangle]\n\
  	[image-file] [profile-file...]\n"),
  	   whoami);
    if (status == 0)
      fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
    done (status);
--- 165,175 ----
  	[--directory-path=dirs] [--display-unused-functions]\n\
  	[--file-format=name] [--file-info] [--help] [--line] [--min-count=n]\n\
  	[--no-static] [--print-path] [--separate-files]\n\
  	[--static-call-graph] [--sum] [--table-length=len] [--traditional]\n\
  	[--version] [--width=n] [--ignore-non-functions]\n\
! 	[--demangle[=STYLE]] [--no-demangle] [@FILE]\n\
  	[image-file] [profile-file...]\n"),
  	   whoami);
    if (status == 0)
      fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
    done (status);
Index: gprof/gprof.texi
===================================================================
RCS file: /cvs/src/src/gprof/gprof.texi,v
retrieving revision 1.17
diff -c -5 -p -r1.17 gprof.texi
*** gprof/gprof.texi	9 May 2005 06:55:25 -0000	1.17
--- gprof/gprof.texi	7 Oct 2005 15:09:33 -0000
***************
*** 3,12 ****
--- 3,14 ----
  @c Copyright 1988, 1992, 1993, 1998, 1999, 2000, 2001, 2002, 2003, 2004
  @c Free Software Foundation, Inc.
  @settitle GNU gprof
  @setchapternewpage odd
  
+ @include config.texi
+ 
  @ifinfo
  @c This is a dir.info fragment to support semi-automated addition of
  @c manuals to an info tree.  zoo@cygnus.com is developing this facility.
  @format
  START-INFO-DIR-ENTRY
*************** gprof [ -[abcDhilLrsTvwxyz] ] [ -[ACeEfF
*** 118,128 ****
   [ --file-info ] [ --help ] [ --line ] [ --min-count=@var{n} ]
   [ --no-static ] [ --print-path ] [ --separate-files ]
   [ --static-call-graph ] [ --sum ] [ --table-length=@var{len} ]
   [ --traditional ] [ --version ] [ --width=@var{n} ]
   [ --ignore-non-functions ] [ --demangle[=@var{STYLE}] ]
!  [ --no-demangle ] [ @var{image-file} ] [ @var{profile-file} @dots{} ]
  @c man end
  @end smallexample
  
  @c man begin DESCRIPTION
  @code{gprof} produces an execution profile of C, Pascal, or Fortran77 
--- 120,131 ----
   [ --file-info ] [ --help ] [ --line ] [ --min-count=@var{n} ]
   [ --no-static ] [ --print-path ] [ --separate-files ]
   [ --static-call-graph ] [ --sum ] [ --table-length=@var{len} ]
   [ --traditional ] [ --version ] [ --width=@var{n} ]
   [ --ignore-non-functions ] [ --demangle[=@var{STYLE}] ]
!  [ --no-demangle ] [ @@@var{file} ] [ @var{image-file} ] 
!  [ @var{profile-file} @dots{} ]
  @c man end
  @end smallexample
  
  @c man begin DESCRIPTION
  @code{gprof} produces an execution profile of C, Pascal, or Fortran77 
*************** that had no time spent in them.  This is
*** 726,735 ****
--- 729,740 ----
  @node Miscellaneous Options,Deprecated Options,Analysis Options,Invoking
  @section Miscellaneous Options
  
  @table @code
  
+ @include @value{top_srcdir}/../libiberty/at-file.texi
+ 
  @item -d[@var{num}]
  @itemx --debug[=@var{num}]
  The @samp{-d @var{num}} option specifies debugging options.
  If @var{num} is not specified, enable all debugging.
  @xref{Debugging}.
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.192
diff -c -5 -p -r1.192 Makefile.am
*** ld/Makefile.am	30 Sep 2005 18:59:46 -0000	1.192
--- ld/Makefile.am	7 Oct 2005 15:09:33 -0000
*************** bootstrap: ld3$(EXEEXT)
*** 1645,1657 ****
  # DOCUMENTATION TARGETS
  # Manual configuration file; not usually attached to normal configuration,
  # because almost all configs use "gen" version of manual.
  #  Set DOCVER above to change.
  configdoc.texi:	${DOCVER}-doc.texi
! 	ln -s ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
! 	  || ln ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi >/dev/null 2>&1 \
! 	  || cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
  
  ldver.texi: $(srcdir)/../bfd/configure
  	rm -f $@
  	eval `grep '^ *VERSION=' $(srcdir)/../bfd/configure`; \
  	  echo "@set VERSION $$VERSION" > $@
--- 1645,1656 ----
  # DOCUMENTATION TARGETS
  # Manual configuration file; not usually attached to normal configuration,
  # because almost all configs use "gen" version of manual.
  #  Set DOCVER above to change.
  configdoc.texi:	${DOCVER}-doc.texi
! 	cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
! 	echo "@set top_srcdir $(top_srcdir)" >> ./configdoc.texi
  
  ldver.texi: $(srcdir)/../bfd/configure
  	rm -f $@
  	eval `grep '^ *VERSION=' $(srcdir)/../bfd/configure`; \
  	  echo "@set VERSION $$VERSION" > $@
Index: ld/ld.texinfo
===================================================================
RCS file: /cvs/src/src/ld/ld.texinfo,v
retrieving revision 1.148
diff -c -5 -p -r1.148 ld.texinfo
*** ld/ld.texinfo	28 Sep 2005 00:34:21 -0000	1.148
--- ld/ld.texinfo	7 Oct 2005 15:09:33 -0000
*************** silently drop the linker options, result
*** 338,347 ****
--- 338,350 ----
  
  Here is a table of the generic command line switches accepted by the GNU
  linker:
  
  @table @gcctabopt
+ @kindex @@@var{file}
+ @include @value{top_srcdir}/../libiberty/at-file.texi
+ 
  @kindex -a@var{keyword}
  @item -a@var{keyword}
  This option is supported for HP/UX compatibility.  The @var{keyword}
  argument must be one of the strings @samp{archive}, @samp{shared}, or
  @samp{default}.  @samp{-aarchive} is functionally equivalent to
Index: ld/lexsup.c
===================================================================
RCS file: /cvs/src/src/ld/lexsup.c,v
retrieving revision 1.86
diff -c -5 -p -r1.86 lexsup.c
*** ld/lexsup.c	12 May 2005 07:32:03 -0000	1.86
--- ld/lexsup.c	7 Oct 2005 15:09:33 -0000
*************** set_segment_start (const char *section, 
*** 1440,1459 ****
  static void
  help (void)
  {
    unsigned i;
    const char **targets, **pp;
  
    printf (_("Usage: %s [options] file...\n"), program_name);
  
    printf (_("Options:\n"));
    for (i = 0; i < OPTION_COUNT; i++)
      {
        if (ld_options[i].doc != NULL)
  	{
  	  bfd_boolean comma;
- 	  int len;
  	  unsigned j;
  
  	  printf ("  ");
  
  	  comma = FALSE;
--- 1440,1459 ----
  static void
  help (void)
  {
    unsigned i;
    const char **targets, **pp;
+   int len;
  
    printf (_("Usage: %s [options] file...\n"), program_name);
  
    printf (_("Options:\n"));
    for (i = 0; i < OPTION_COUNT; i++)
      {
        if (ld_options[i].doc != NULL)
  	{
  	  bfd_boolean comma;
  	  unsigned j;
  
  	  printf ("  ");
  
  	  comma = FALSE;
*************** help (void)
*** 1522,1531 ****
--- 1522,1535 ----
  	    putchar (' ');
  
  	  printf ("%s\n", _(ld_options[i].doc));
  	}
      }
+   printf (_("  @FILE"));
+   for (len = strlen ("  @FILE"); len < 30; len++)
+     putchar (' ');
+   printf (_("Read options from FILE\n"));
  
    /* Note: Various tools (such as libtool) depend upon the
       format of the listings below - do not change them.  */
    /* xgettext:c-format */
    printf (_("%s: supported targets:"), program_name);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]