* 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'.
This commit is contained in:
Gary V. Vaughan 2004-08-29 15:09:15 +00:00
parent b3b02c66f5
commit e84c803d1b
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-08-29 Gary V. Vaughan <gary@gnu.org>
* 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 <gary@gnu.org>
We have had shell functions in ltmain.in for a few years without

View File

@ -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