diff options
author | Gary V. Vaughan <gary@gnu.org> | 2011-11-16 12:43:53 +0700 |
---|---|---|
committer | Gary V. Vaughan <gary@gnu.org> | 2011-11-16 12:43:53 +0700 |
commit | de4c35b8109cd06aae1e1b125dbbbca397111fd0 (patch) | |
tree | 0902a8acb9e45c7ebae1dcc40597a3099982708f /bootstrap.conf | |
parent | a5ef08182ce0fb80b8adcff5872f190afd915908 (diff) | |
download | libtool-de4c35b8109cd06aae1e1b125dbbbca397111fd0.tar.gz |
options-parser: provide a saner pluggable API.
It's much too easy to forget that the functions you hook into
the option parser need to return unconsumed options in the
variable `func_run_hooks_result'; better to follow the
convention used in the rest of bootstrap and return results in a
variable named after the function with `_result' appended.
* libltdl/config/options-parser (func_run_hooks): implement this
new API.
(Option parsing): Update the example in the header comment for
this section to reflect the changes.
* bootstrap (bootstrap_options_prep, bootstrap_parse_options)
(bootstrap_validate_options): Adjust.
* bootstrap.conf (libtool_options_prep, libtool_parse_options)
(libtool_validate_options): Ditto.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'bootstrap.conf')
-rw-r--r-- | bootstrap.conf | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bootstrap.conf b/bootstrap.conf index 0f89559e..e1537e23 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -177,7 +177,7 @@ Libtool Specific Options: # pass back the list of options we consumed func_quote_for_eval ${1+"$@"} - func_run_hooks_result="$func_quote_for_eval_result" + libtool_options_prep_result="$func_quote_for_eval_result" } func_add_hook func_options_prep libtool_options_prep @@ -185,9 +185,7 @@ func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG...] # ------------------------------ # Provide handling for additional Libtool options inside the main option -# parsing loop. Note that `bootstrap' passes in the current positional -# parameters, and this function has to pass back whatever is left after -# its own processing in the `func_run_hooks_result' variable. +# parsing loop. libtool_parse_options () { $debug_cmd @@ -217,7 +215,7 @@ libtool_parse_options () # pass back the list of options we consumed func_quote_for_eval ${1+"$@"} - func_run_hooks_result="$func_quote_for_eval_result" + libtool_parse_options_result="$func_quote_for_eval_result" } func_add_hook func_parse_options libtool_parse_options @@ -246,7 +244,7 @@ libtool_validate_options () # pass back the list of options we consumed func_quote_for_eval ${1+"$@"} - func_run_hooks_result="$func_quote_for_eval_result" + libtool_validate_options_result="$func_quote_for_eval_result" } func_add_hook func_validate_options libtool_validate_options |