From 8abcf86083171338f05eda5d382fc9ce7da24b51 Mon Sep 17 00:00:00 2001
From: Bruce Korb <bkorb@gnu.org>
Date: Fri, 7 Jan 2011 15:44:41 -0800
Subject: [PATCH] libposix/bootstrap: disable testing of error-module-using
 modules

---
 libposix/bootstrap | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/libposix/bootstrap b/libposix/bootstrap
index d96524073d..e5f6d601cb 100755
--- a/libposix/bootstrap
+++ b/libposix/bootstrap
@@ -41,22 +41,6 @@ cat > tmp/modules/libposix <<- _EOF_
 	Gary V. Vaughan
 	_EOF_
 
-# We cannot tell which modules will get pulled in via dependencies
-# when gnulib-tool gets run.  Therefore, strip out "error" from all
-# modules that mention it.  Either we won't use the module, or the
-# module will have to be tweaked to remove the dependency for libposix.
-# "GNULIB_LIBPOSIX" is a CPP symbol for libposix.
-#
-set -- `egrep -l '^error$' ../modules/[a-z]*`
-
-for mod
-do
-    test "X$mod" = Xerror && continue
-    echo 'NOTE: removing "error" dependency from' ${mod}
-    d=`basename $mod`
-    sed '/^error$/d' ${mod} > tmp/modules/$d
-done >&2
-
 opts='--local-dir=tmp
 	--import
 	--lib=libposix
@@ -69,8 +53,24 @@ opts='--local-dir=tmp
 	--with-c++-tests
 	--with-longrunning-tests'
 
+# We cannot tell which modules will get pulled in via dependencies
+# when gnulib-tool gets run.  Therefore, strip out "error" from all
+# modules that mention it.  Either we won't use the module, or the
+# module will have to be tweaked to remove the dependency for libposix.
+# "GNULIB_LIBPOSIX" is a CPP symbol for libposix.  Also, avoid testing
+# any module that has had its error dependency removed.
+#
+for mod in `egrep -l '^error$' ../modules/[a-z]*`
+do
+    test "X$mod" = Xerror && continue
+    d=`basename $mod`
+    opts="${opts} --avoid=${d}-tests"
+    sed '/^error$/d' ${mod} > tmp/modules/$d
+done >&2
+
 # Bootstrap for autotools.
 #
+echo gnulib-tool ${opts} git-version-gen libposix
 gnulib-tool ${opts} git-version-gen libposix
 
 # No need to maintain a Makefile.am just to include gnulib.mk.
-- 
2.39.5