From: Gary V. Vaughan Date: Sun, 29 Aug 2004 15:09:15 +0000 (+0000) Subject: * config/ltmain.in (opt_help): Defer showing help messages until X-Git-Tag: release-1-9b~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e84c803d1bb659cd744ac1b86318491f4e741329;p=thirdparty%2Flibtool.git * config/ltmain.in (opt_help): Defer showing help messages until after a possible following --mode argument has been parsed, so we can handle `libtool --help --mode=foo'. --- diff --git a/ChangeLog b/ChangeLog index 386734153..d3d485f61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-08-29 Gary V. Vaughan + + * config/ltmain.in (opt_help): Defer showing help messages until + after a possible following --mode argument has been parsed, so we + can handle `libtool --help --mode=foo'. + 2004-08-29 Gary V. Vaughan We have had shell functions in ltmain.in for a few years without diff --git a/config/ltmain.in b/config/ltmain.in index fb8cb254c..844b68abb 100644 --- a/config/ltmain.in +++ b/config/ltmain.in @@ -186,6 +186,7 @@ execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +opt_help=false opt_duplicate_deps=false # If this variable is set in any of the actions, the command in it @@ -673,7 +674,7 @@ Otherwise, only FILE itself is deleted using RM." # ;; -\?|-h) func_usage ;; - --help) func_mode_help ;; + --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; @@ -684,6 +685,9 @@ Otherwise, only FILE itself is deleted using RM." esac done + # Now that we've collected a possible --mode arg, show help if necessary + $opt_help && func_mode_help + case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps