From e633b39f10d3cb5fd11ff4e043668b009ca6ee8b Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Sun, 7 Nov 2010 12:31:27 +0700 Subject: [PATCH] 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. --- ChangeLog | 7 ++++++ libposix/bootstrap | 59 +++++++++++++--------------------------------- 2 files changed, 24 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index cef505a712..772bb142e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-11-06 Gary V. Vaughan + + 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 libposix: reindent with spaces instead of tabs diff --git a/libposix/bootstrap b/libposix/bootstrap index a90aa866ce..987bd31026 100755 --- a/libposix/bootstrap +++ b/libposix/bootstrap @@ -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 -- 2.39.5