]> Savannah Git Hosting - gnulib.git/commitdiff
libposix: vastly simplified bootstrap sanity check
authorGary V. Vaughan <gary@gnu.org>
Sun, 7 Nov 2010 05:31:27 +0000 (12:31 +0700)
committerGary V. Vaughan <gary@gnu.org>
Sun, 7 Nov 2010 05:35:23 +0000 (12:35 +0700)
* libposix/bootstrap: Use a much simpler script to ensure that the
output of the posix-modules script remains in sync with the module
list of the libposix module.

ChangeLog
libposix/bootstrap

index cef505a712af93e30c5758c9e22ddbdcad75bc7a..772bb142e3851c17c57527ba9cd10ee2b0f61982 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-06  Gary V. Vaughan  <gary@gnu.org>
+
+       libposix: vastly simplified bootstrap sanity check
+       * libposix/bootstrap: Use a much simpler script to ensure that the
+       output of the posix-modules script remains in sync with the module
+       list of the libposix module.
+
 2010-10-13  Gary V. Vaughan  <gary@gnu.org>
 
        libposix: reindent with spaces instead of tabs
index a90aa866ce6d8be917ed22e45da9b5cd39517a48..987bd31026cf24f3f53749f9b650744744b304c9 100755 (executable)
@@ -2,54 +2,29 @@
 
 PATH=..:$PATH
 
+# Bootstrap for autotools.
 gnulib-tool --import --lib=libposix --makefile-name=gnulib.mk \
   --macro-prefix=LIBPOSIX --libtool --no-changelog --symlink \
   --with-tests --with-c++-tests --with-longrunning-tests \
   git-version-gen libposix
 
+
+# No need to maintain a Makefile.am just to include gnulib.mk.
 mv tests/gnulib.mk tests/Makefile.am
 
-# sanity check the module list for synchronisation issues.
-echo "posix-modules :
-`posix-modules`
-libposix :
-`gnulib-tool --extract-dependencies libposix`" |awk '
-/^$/            { next; }
-/^[a-z-]+ :/    { tag=$1; next; }
-                { if (modules[$1])
-                        modules[$1] = "both";
-                  else
-                        modules[$1] = tag;
-                }
-END             { # posix-modules only
-                  header=0;
-                  for (i in modules)
-                    {
-                      if ("posix-modules" == modules[i])
-                        {
-                          if (0 == header)
-                            {
-                              print "Modules in posix-modules list only:"
-                              header = 1
-                            }
-                          printf ("\t%s\n", i);
-                        }
-                    }
-                  # libposix only
-                  header=0;
-                  for (i in modules)
-                    {
-                      if ("libposix" == modules[i])
-                        {
-                          if (0 == header)
-                            {
-                              print "Modules in libposix only:"
-                              header = 1
-                            }
-                          printf ("\t%s\n", i);
-                        }
-                    }
-                }
-'
 
+# Sanity check the module list for synchronisation issues.
+{
+    sed_noblanks='/^$/d'
+    posix-modules |sed -e "$sed_noblanks" -e 's|$| posix-modules|'
+    gnulib-tool --extract-dependencies libposix \
+        |sed -e "$sed_noblanks" -e 's|$| libposix|'
+} | awk '_[$1] {delete _[$1]; next}
+               {_[$1]=$2}
+         END   {for (k in _)
+                  printf ("bootstrap: warning: `%s'\'' only appears in %s\n", k, _[k])}' \
+  | sort
+
+
+# Run autotools.
 autoreconf --force --install --verbose --symlink