[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnulib-tool: don't follow dependencies to avoided modules
From: |
Bruno Haible |
Subject: |
Re: [PATCH] gnulib-tool: don't follow dependencies to avoided modules |
Date: |
Sat, 8 Oct 2011 00:34:43 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
Hi Paul,
You didn't mention a test case, how to reproduce? Therefore I have to ask
you to test a modification.
> diff --git a/gnulib-tool b/gnulib-tool
> index 628d9d6..2e3b6ca 100755
> --- a/gnulib-tool
> +++ b/gnulib-tool
> @@ -2731,6 +2731,9 @@ func_modules_transitive_closure ()
> esac
> done
> if $inc; then
> + func_acceptable $dep || inc=false
> + fi
> + if $inc; then
> func_append inmodules " $dep"
> if test "$cond_dependencies" = true; then
> escaped_dep=`echo "$dep" | sed -e "$sed_escape_dependency"`
I had hoped that it would be possible to call func_acceptable
only once for every module. But apparently not...
I'll prefer a simpler code here.
> @@ -3958,7 +3961,9 @@ func_emit_autoconf_snippets ()
> echo " $shellvar=true"
> deps=`func_get_dependencies $module | sed -e
> "$sed_dependencies_without_conditions"`
> for dep in $deps; do
> - if func_cond_module_p "$dep"; then
> + if ! func_acceptable $dep; then
> + :
> + elif func_cond_module_p "$dep"; then
> func_module_shellfunc_name "$dep"
> func_cond_module_condition "$module" "$dep"
> if test "$condition" != true; then
> @@ -3988,7 +3993,9 @@ func_emit_autoconf_snippets ()
> else
> deps=`func_get_dependencies $module | sed -e
> "$sed_dependencies_without_conditions"`
> for dep in $deps; do
> - if func_cond_module_p "$dep"; then
> + if ! func_acceptable $dep; then
> + :
> + elif func_cond_module_p "$dep"; then
> func_module_shellfunc_name "$dep"
> func_cond_module_condition "$module" "$dep"
> if test "$condition" != true; then
Here it's better to not add more inputs to func_emit_autoconf_snippets.
func_acceptable is really only meant as an auxiliary function for
func_transitive_closure. Once the transitive closure of modules
(with avoids, tests, etc.) is computed, one should stick to that list.
func_emit_autoconf_snippets is pretty late in the processing chain,
it should be satisfied with the values it gets from the earlier steps.
> @@ -6507,6 +6514,9 @@ s/\([.*$]\)/[\1]/g'
> ;;
>
> extract-dependencies )
> + if test -n "$avoidlist"; then
> + func_fatal_error "cannot combine --avoid and --extract-dependencies"
> + fi
> for module
> do
> func_verify_module
Fine.
Can you please test the attached patch (on top of yours)?
Bruno
--
In memoriam Anna Politkovskaya <http://en.wikipedia.org/wiki/Anna_Politkovskaya>
gnulib-tool.diff
Description: Text Data