changeset 15853:3034b1243e09

gnulib-tool: don't follow dependencies to avoided modules This fixes a bug that is related to the previous one. * gnulib-tool (func_modules_transitive_closure) (func_emit_autoconf_snippets): Check whether a dependency is acceptable before using it. (--extract-dependencies): Report an error if --avoid is also used, since this combination of options is not yet supported.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 07 Oct 2011 13:59:10 -0700
parents 44740f4ef8e2
children d3633bf8b61d
files ChangeLog gnulib-tool
diffstat 2 files changed, 20 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 07 13:04:52 2011 -0700
+++ b/ChangeLog	Fri Oct 07 13:59:10 2011 -0700
@@ -1,5 +1,13 @@
 2011-10-07  Paul Eggert  <eggert@cs.ucla.edu>
 
+	gnulib-tool: don't follow dependencies to avoided modules
+	This fixes a bug that is related to the previous one.
+	* gnulib-tool (func_modules_transitive_closure)
+	(func_emit_autoconf_snippets):
+	Check whether a dependency is acceptable before using it.
+	(--extract-dependencies): Report an error if --avoid is also used,
+	since this combination of options is not yet supported.
+
 	gnulib-tool: fix typo that broke Emacs on powerpc-apple-darwin9.8.0.
 	Problem reported by Peter Dyballa in
 	<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9696>.
--- a/gnulib-tool	Fri Oct 07 13:04:52 2011 -0700
+++ b/gnulib-tool	Fri Oct 07 13:59:10 2011 -0700
@@ -2731,6 +2731,9 @@
               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"`
@@ -3958,7 +3961,9 @@
           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 @@
         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
@@ -6507,6 +6514,9 @@
     ;;
 
   extract-dependencies )
+    if test -n "$avoidlist"; then
+      func_fatal_error "cannot combine --avoid and --extract-dependencies"
+    fi
     for module
     do
       func_verify_module