]> git.ipfire.org Git - thirdparty/libtool.git/commit
libtool: optimizing options-parser hooks
authorPavel Raiskup <praiskup@redhat.com>
Mon, 5 Oct 2015 11:16:08 +0000 (13:16 +0200)
committerPavel Raiskup <praiskup@redhat.com>
Mon, 12 Oct 2015 19:26:13 +0000 (21:26 +0200)
commit16dbc070d32e6d4601cb5878dfdf69f2e29c84e1
treedfe9b3e731a33a910f590bdaeabadd17e1b35c18
parent32f0df9835ac15ac17e04be57c368172c3ad1d19
libtool: optimizing options-parser hooks

Its not necessary to (re)func_quote_for_eval in each function in
the hook hierarchy.  Usually it is enough if the leaf function
does func_quote_for_eval and its caller just re-uses the
<CALLEE>_return variable.

This is follow up for the previous commit.

* gl/build-aux/options-parser (func_run_hooks): Propagate
$EXIT_SUCCESS return code down to caller if *any* hook succeeded.
Never re-quote the result -- either the arguments are left
untouched, or the options have already been properly quoted by
succeeding hooks.
(func_parse_options): Quote '$@' and return $EXIT_SUCCESS only if
we changed something.
(func_validate_options): Likewise.
(func_options_prep): Likewise.
(func_options_finish): New hook-caller for 'func_options' hooks.
(func_options): Propagate return value down to top-level caller,
but pay attention we have always set $func_options_result.
* build-aux/ltmain.in (libtool_options_prep): Quote '$@' and
return $EXIT_SUCCESS only if we changed something.
(libtool_parse_options): Likewise.
* bootstrap: Sync gl/build-aux/with option-parser.
bootstrap
build-aux/ltmain.in
gl/build-aux/options-parser