]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Man pages for libtoolize and libtool, --help-all.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 20 Sep 2008 06:50:50 +0000 (08:50 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 20 Sep 2008 07:07:24 +0000 (09:07 +0200)
* Makefile.am (dist_man1_MANS, update_mans): New macros.
($(srcdir)/doc/libtool.1, $(srcdir)/doc/libtoolize.1): New
rules.  Use --help-all for libtool.
(MAINTAINERCLEANFILES): New macro.  Add dist_man1_MANS.
(BUILT_SOURCES): Add libtoolize.
* configure.ac: Check for help2man, set HELP2MAN.
* doc/libtool.texi: Add @direntry for libtool-invocation.
(Invoking libtool): Document -h, --help-all.  Reorder mode
description for consistency.
(Compile mode): Do not document -Wl,FLAG and -XCClinker here.
(Link mode): Document -Wc,FLAG here, reformat a bit.
* libtoolize.m4sh: Reformat --help output a bit, to help
help2man.
* libltdl/config/ltmain.m4sh: Likewise.  Also, set PROGRAM to
`libtool', not `ltmain.sh', so the former is used in the man
page.
New argument `--help-all'.  If given, call func_help and
func_mode_help several times, beating output in shape with sed.
(func_mode_help): Do not exit here.
* libltdl/config/getopt.m4sh (func_usage): Work with different
indentations, but require comment hash in first column, when
grepping for '-h' in usage to end short help.
(func_help): Accept optional argument to not exit.
* NEWS, THANKS: Update.
Suggestion by Karl Berry.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
Makefile.am
NEWS
THANKS
configure.ac
doc/.gitignore
doc/libtool.texi
libltdl/config/getopt.m4sh
libltdl/config/ltmain.m4sh
libtoolize.m4sh

index fb0bad5abc68e1701eeae211e6a0ff9d9d0e7807..d5edde84d71ef31a59e73acb03a174afe4cbeba1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2008-09-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Man pages for libtoolize and libtool, new command line option
+       --help-all.
+       * Makefile.am (dist_man1_MANS, update_mans): New macros.
+       ($(srcdir)/doc/libtool.1, $(srcdir)/doc/libtoolize.1): New
+       rules.  Use --help-all for libtool.
+       (MAINTAINERCLEANFILES): New macro.  Add dist_man1_MANS.
+       (BUILT_SOURCES): Add libtoolize.
+       * configure.ac: Check for help2man, set HELP2MAN.
+       * doc/libtool.texi: Add @direntry for libtool-invocation.
+       (Invoking libtool): Document -h, --help-all.  Reorder mode
+       description for consistency.
+       (Compile mode): Do not document -Wl,FLAG and -XCClinker here.
+       (Link mode): Document -Wc,FLAG here, reformat a bit.
+       * libtoolize.m4sh: Reformat --help output a bit, to help
+       help2man.
+       * libltdl/config/ltmain.m4sh: Likewise.  Also, set PROGRAM to
+       `libtool', not `ltmain.sh', so the former is used in the man
+       page.
+       New argument `--help-all'.  If given, call func_help and
+       func_mode_help several times, beating output in shape with sed.
+       (func_mode_help): Do not exit here.
+       * libltdl/config/getopt.m4sh (func_usage): Work with different
+       indentations, but require comment hash in first column, when
+       grepping for '-h' in usage to end short help.
+       (func_help): Accept optional argument to not exit.
+       * NEWS, THANKS: Update.
+       Suggestion by Karl Berry.
+
 2008-09-08  Gary V. Vaughan  <gary@gnu.org>
 
        Use `-version-info 9:0:2' for one added iface since 2.2.4.
index 1417e842870e6abc4eb58d90a74847b4a8b0bd2c..8570db47b4aa36496c825ee309d7d8efcffcbad0 100644 (file)
@@ -31,11 +31,12 @@ AM_LDFLAGS          =
 DIST_SUBDIRS           = .
 EXTRA_DIST             =
 
-BUILT_SOURCES          = libtool
+BUILT_SOURCES          = libtool libtoolize
 
 CLEANFILES             =
 MOSTLYCLEANFILES       =
 DISTCLEANFILES         =
+MAINTAINERCLEANFILES   =
 
 include_HEADERS                =
 noinst_LTLIBRARIES     =
@@ -329,6 +330,16 @@ $(srcdir)/doc/notes.txt: $(srcdir)/doc/notes.texi
        cd $(srcdir)/doc && \
          $(MAKEINFO) --no-headers $(MAKEINFOFLAGS) -o notes.txt notes.texi
 
+dist_man1_MANS         = $(srcdir)/doc/libtool.1 $(srcdir)/doc/libtoolize.1
+MAINTAINERCLEANFILES   += $(dist_man1_MANS)
+update_mans = \
+  PATH=.$(PATH_SEPARATOR)$$PATH; export PATH; \
+  $(HELP2MAN) --output=$@
+$(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh
+       $(update_mans) --help-option=--help-all libtool
+$(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in
+       $(update_mans) libtoolize
+
 
 ## ------------- ##
 ## Installation. ##
diff --git a/NEWS b/NEWS
index edcef6b1f06489daf1d38cf1f2bb6bf957ba34f8..9dc14e1d7de633f74e7c2b59019e9636d50f991e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 
 New in 2.2.8 2008-??-??: git version 2.2.7a, Libtool team:
 
+* New features:
+
+  - Libtool ships and installs man pages for libtool and libtoolize now.
+  - New libtool command line flag --help-all.
+
 * Bug fixes:
 
   - Nothing yet...
diff --git a/THANKS b/THANKS
index d6f485187dd1ff1404b2870ad4fb7f2c0fe406c7..2ffa92aad501db12524d6c20ef067beb09ff2b41 100644 (file)
--- a/THANKS
+++ b/THANKS
   Joerg Sonnenberger           joerg@netbsd.org
   John Bowler                  jbowler@acm.org
   Joseph Beckenbach III                jrb3@best.com
+  Karl Berry                   karl@freefriends.org
   Kenneth Albanowski           kjahds@kjahds.com
   Kevin Ryde                   user42@zip.com.au
   Kurt D. Zeilenga             Kurt@OpenLDAP.Org
index 33e8b88e5a7eed7b0f977b55fc1ab98533972b57..9b15ccc2561967be9c4b15432c694b74215a4ea4 100644 (file)
@@ -199,6 +199,10 @@ AM_CONDITIONAL(HAVE_FC,[test -n "[$]_LT_TAGVAR(compiler, FC)"])
 AM_CONDITIONAL(HAVE_GCJ, [test -n "[$]_LT_TAGVAR(compiler, GCJ)"])
 AM_CONDITIONAL(HAVE_RC, [test -n "[$]_LT_TAGVAR(compiler, RC)"])
 
+## ------------- ##
+## Documentation ##
+## ------------- ##
+AM_MISSING_PROG([HELP2MAN], [help2man])
 
 ## -------- ##
 ## Outputs. ##
index bc2190115c1e3aee1e80ff614db7fd9b330f01d6..5d0e8528f828172e92097f81fe357d13bcd3d0a2 100644 (file)
@@ -6,3 +6,4 @@ notes.txt
 *.html
 *.ps
 *.pdf
+*.1
index 7b6b3f5750764b57c9458fd52447abac7d0feefa..59f38727734976c97645ae131c89f0aa4b8648ef 100644 (file)
@@ -18,6 +18,8 @@
 
 @dircategory Individual utilities
 @direntry
+* libtool-invocation: (libtool)Invoking libtool.
+                                                Running the @code{libtool} script.
 * libtoolize: (libtool)Invoking libtoolize.     Adding libtool support.
 @end direntry
 
@@ -1144,10 +1146,16 @@ to determine whether shared or static libraries will be built.
 @item --finish
 Same as @option{--mode=finish}.
 
+@item -h
+Display short help message.
+
 @item --help
 Display a help message and exit.  If @option{--mode=@var{mode}} is
-specified, then detailed help for @var{mode} is
-displayed.
+specified, then detailed help for @var{mode} is displayed.
+
+@item --help-all
+Display help for the general options as well as detailed help for each
+operation mode, and exit.
 
 @item --mode=@var{mode}
 Use @var{mode} as the operation mode.  When using libtool from the
@@ -1165,14 +1173,14 @@ Compile a source file into a libtool object.
 Automatically set the library path so that another program can use
 uninstalled libtool-generated programs or libraries.
 
-@item finish
-Complete the installation of libtool libraries on the system.
+@item link
+Create a library or an executable.
 
 @item install
 Install libraries or executables.
 
-@item link
-Create a library or an executable.
+@item finish
+Complete the installation of libtool libraries on the system.
 
 @item uninstall
 Delete installed libraries or executables.
@@ -1293,14 +1301,7 @@ linking.
 
 @item -Wc,@var{flag}
 @itemx -Xcompiler @var{flag}
-Pass a linker specific flag directly to the compiler.
-
-@item -Wl,@var{flag}
-@itemx -Xlinker @var{flag}
-Pass a linker specific flag directly to the linker.
-
-@item -XCClinker @var{flag}
-Pass a link specific flag to the compiler driver (@var{CC}) during linking.
+Pass a flag directly to the compiler.
 @end table
 
 @node Link mode
@@ -1469,12 +1470,16 @@ no need to append @var{libname} to the list of dependency libraries of
 @var{output-file}, because linking against @var{output-file} already
 supplies the same interface (@pxref{Linking with dlopened modules}).
 
+@item -Wc,@var{flag}
+@itemx -Xcompiler @var{flag}
+Pass a linker-specific flag directly to the compiler.
+
 @item -Wl,@var{flag}
 @itemx -Xlinker @var{flag}
-Pass a linker specific flag directly to the linker.
+Pass a linker-specific flag directly to the linker.
 
 @item -XCClinker @var{flag}
-Pass a link specific flag to the compiler driver (@var{CC}) during linking.
+Pass a link-specific flag to the compiler driver (@var{CC}) during linking.
 @end table
 
 If the @var{output-file} ends in @samp{.la}, then a libtool library is
index d9657e12b78f8325d1adf59fd9dd20161cf6f4d2..1348468f920b8e7ccd157fc5db67bead6b58edef 100644 (file)
@@ -48,7 +48,7 @@ func_version ()
 # Echo short help message to standard output and exit.
 func_usage ()
 {
-    $SED -n '/^# Usage:/,/-h/ {
+    $SED -n '/^# Usage:/,/^#  *-h/ {
         s/^# //
        s/^# *$//
        s/\$progname/'$progname'/
@@ -59,8 +59,9 @@ func_usage ()
     exit $?
 }
 
-# func_help
-# Echo long help message to standard output and exit.
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
 func_help ()
 {
     $SED -n '/^# Usage:/,/# Report bugs to/ {
@@ -77,7 +78,10 @@ func_help ()
        s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
        p
      }' < "$progpath"
-    exit $?
+    ret=$?
+    if test -z "$1"; then
+      exit $ret
+    fi
 }
 
 # func_missing_arg argname
index 814cc9394832c6ffafe81b624d8d3c7315dd20e2..ec7de23ec07ede210f902434f1adcac937d1621e 100644 (file)
@@ -1,7 +1,7 @@
 m4_define([_m4_divert(SCRIPT)], 100)
 m4_divert_push([SCRIPT])# @configure_input@
 
-# ltmain.sh (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
+# libtool (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
@@ -33,27 +33,27 @@ m4_divert_push([SCRIPT])# @configure_input@
 #
 # Provide generalized library-building support services.
 #
-#     --config             show all configuration variables
-#     --debug              enable verbose shell tracing
-# -n, --dry-run            display commands without modifying any files
-#     --features           display basic configuration information and exit
-#     --mode=MODE          use operation mode MODE
-#     --preserve-dup-deps  don't remove duplicate dependency libraries
-#     --quiet, --silent    don't print informational messages
-#     --tag=TAG            use configuration variables from tag TAG
-# -v, --verbose            print informational messages (default)
-#     --version            print version information
-# -h, --help               print short or long help message
+#       --config             show all configuration variables
+#       --debug              enable verbose shell tracing
+#   -n, --dry-run            display commands without modifying any files
+#       --features           display basic configuration information and exit
+#       --mode=MODE          use operation mode MODE
+#       --preserve-dup-deps  don't remove duplicate dependency libraries
+#       --quiet, --silent    don't print informational messages
+#       --tag=TAG            use configuration variables from tag TAG
+#   -v, --verbose            print informational messages (default)
+#       --version            print version information
+#   -h, --help, --help-all   print short, long, or detailed help message
 #
 # MODE must be one of the following:
 #
-#       clean              remove files from the build directory
-#       compile            compile a source file into a libtool object
-#       execute            automatically set library path, then run a program
-#       finish             complete the installation of libtool libraries
-#       install            install libraries or executables
-#       link               create a library or an executable
-#       uninstall          remove libraries from an installed directory
+#         clean              remove files from the build directory
+#         compile            compile a source file into a libtool object
+#         execute            automatically set library path, then run a program
+#         finish             complete the installation of libtool libraries
+#         install            install libraries or executables
+#         link               create a library or an executable
+#         uninstall          remove libraries from an installed directory
 #
 # MODE-ARGS vary depending on the MODE.
 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
@@ -61,18 +61,18 @@ m4_divert_push([SCRIPT])# @configure_input@
 # When reporting a bug, please describe a test case to reproduce it and
 # include the following information:
 #
-#       host-triplet:  $host
-#       shell:         $SHELL
-#       compiler:              $LTCC
-#       compiler flags:                $LTCFLAGS
-#       linker:                $LD (gnu? $with_gnu_ld)
-#       $progname:             (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
-#       automake:              $automake_version
-#       autoconf:              $autoconf_version
+#         host-triplet:        $host
+#         shell:               $SHELL
+#         compiler:            $LTCC
+#         compiler flags:              $LTCFLAGS
+#         linker:              $LD (gnu? $with_gnu_ld)
+#         $progname:   (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
+#         automake:    $automake_version
+#         autoconf:    $autoconf_version
 #
 # Report bugs to <bug-libtool@gnu.org>.
 
-PROGRAM=ltmain.sh
+PROGRAM=libtool
 PACKAGE=@PACKAGE@
 VERSION=@VERSION@
 TIMESTAMP="@TIMESTAMP@"
@@ -351,6 +351,7 @@ func_enable_tag ()
 
       -\?|-h)          func_usage                                      ;;
       --help)          opt_help=:                                      ;;
+      --help-all)      opt_help=': help-all'                           ;;
       --version)       func_version                                    ;;
 
       -*)              func_fatal_help "unrecognized option \`$opt'"   ;;
@@ -1003,7 +1004,7 @@ compiler."
 }
 
 $opt_help || {
-test "$mode" = compile && func_mode_compile ${1+"$@"}
+  test "$mode" = compile && func_mode_compile ${1+"$@"}
 }
 
 func_mode_help ()
@@ -1044,6 +1045,7 @@ This mode accepts the following additional options:
   -prefer-non-pic   try to building non-PIC objects only
   -shared           do not build a \`.o' file suitable for static linking
   -static           only build a \`.o' file suitable for static linking
+  -Wc,FLAG          pass FLAG directly to the compiler
 
 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
 from the given SOURCEFILE.
@@ -1144,6 +1146,11 @@ The following components of LINK-COMMAND are treated specially:
   -version-info CURRENT[:REVISION[:AGE]]
                     specify library version info [each variable defaults to 0]
   -weak LIBNAME     declare that the target provides the LIBNAME interface
+  -Wc,FLAG
+  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
+  -Wl,FLAG
+  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
+  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
 
 All other options (arguments beginning with \`-') are ignored.
 
@@ -1183,12 +1190,38 @@ Otherwise, only FILE itself is deleted using RM."
 
     $ECHO
     $ECHO "Try \`$progname --help' for more information about other modes."
-
-    exit $?
 }
 
-  # Now that we've collected a possible --mode arg, show help if necessary
-  $opt_help && func_mode_help
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+  if test "$opt_help" = :; then
+    func_mode_help
+  else
+    {
+      func_help noexit
+      for mode in compile link execute install finish uninstall clean; do
+       func_mode_help
+      done
+    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
+    {
+      func_help noexit
+      for mode in compile link execute install finish uninstall clean; do
+       echo
+       func_mode_help
+      done
+    } |
+    sed '1d
+      /^When reporting/,/^Report/{
+       H
+       d
+      }
+      $x
+      /information about other modes/d
+      /more detailed .*MODE/d
+      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+  fi
+  exit $?
+fi
 
 
 # func_mode_execute arg...
index 42e07df74d622dbe6608d425dde3b0c9a9ffdcaf..b6d35f23a9c81dfcaf0d5536ee64fe4c0c2da8c6 100644 (file)
@@ -29,29 +29,29 @@ m4_divert_push([SCRIPT])#! /bin/sh
 #
 # Prepare a package to use libtool.
 #
-# -c, --copy            copy files rather than symlinking them
-#     --debug           enable verbose shell tracing
-# -n, --dry-run         print commands rather than running them
-# -f, --force           replace existing files
-# -i, --install         copy missing auxiliary files
-#     --ltdl[=DIR]      install libltdl sources [default: libltdl]
-#     --no-warn         don't display warning messages
-#     --nonrecursive    prepare ltdl for non-recursive make
-# -q, --quiet           work silently
-#     --recursive       prepare ltdl for recursive make
-#     --subproject      prepare ltdl to configure and build independently
-# -v, --verbose         verbosely report processing
-#     --version         print version information and exit
-# -h, --help            print short or long help message
+#   -c, --copy          copy files rather than symlinking them
+#       --debug         enable verbose shell tracing
+#   -n, --dry-run       print commands rather than running them
+#   -f, --force         replace existing files
+#   -i, --install       copy missing auxiliary files
+#       --ltdl[=DIR]    install libltdl sources [default: libltdl]
+#       --no-warn       don't display warning messages
+#       --nonrecursive  prepare ltdl for non-recursive make
+#   -q, --quiet         work silently
+#       --recursive     prepare ltdl for recursive make
+#       --subproject    prepare ltdl to configure and build independently
+#   -v, --verbose       verbosely report processing
+#       --version       print version information and exit
+#   -h, --help          print short or long help message
 #
 # The following space or comma delimited options can be passed to $progname
 # via the environment variable LIBTOOLIZE_OPTIONS, unknown environment
 # options are ignored:
 #
-#     --debug           enable verbose shell tracing
-#     --no-warn         don't display warning messages
-#     --quiet           work silently
-#     --verbose         verbosely report processing
+#   --debug             enable verbose shell tracing
+#   --no-warn           don't display warning messages
+#   --quiet             work silently
+#   --verbose           verbosely report processing
 #
 # You must `cd' to the top directory of your package before you run
 # `$progname'.