automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests: make tests behave for the AR=lib case


From: Peter Rosin
Subject: [PATCH] tests: make tests behave for the AR=lib case
Date: Wed, 29 Feb 2012 13:02:09 +0100

These below tests were left mostly as-is when AM_PROG_AR was
introduced (with libobj16b being the exception, that test was
forgotten or has regressed since), in a misguided attempt to
not make them diverge from the original problem reports.

Modernize them so that they do not FAIL when AR=lib.

* tests/libobj16b.test: Add AM_PROG_AR to configure.ac and remove
the no-longer-needed -Wno-extra-portability option when invoking
automake.
* tests/pr300-lib.test: Likewise.
* tests/pr300-ltlib.test: Likewise.
* tests/pr307.test: Likewise.
* tests/pr401.test: Likewise.  Also fetch the 'ar-lib' script.
* tests/pr401b.test: Likewise.
* tests/pr401c.test: Likewise.
---
 tests/libobj16b.test   |    5 +++--
 tests/pr300-lib.test   |    3 ++-
 tests/pr300-ltlib.test |    3 ++-
 tests/pr307.test       |    3 ++-
 tests/pr401.test       |   13 ++++++++-----
 tests/pr401b.test      |   13 ++++++++-----
 tests/pr401c.test      |   13 ++++++++-----
 7 files changed, 33 insertions(+), 20 deletions(-)

Hi!

Here's a patch fixing the things I mentioned last week in the
"[PATCH] tests: prefer 'configure.ac' over 'configure.in'" thread
ending here:
https://lists.gnu.org/archive/html/automake-patches/2012-02/msg00250.html

Ok for master?

Cheers,
Peter

diff --git a/tests/libobj16b.test b/tests/libobj16b.test
index 23432b3..110ba19 100755
--- a/tests/libobj16b.test
+++ b/tests/libobj16b.test
@@ -23,6 +23,7 @@ required=cc
 mv configure.ac configure.proto
 cat >> configure.proto << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 %LIBOBJ-STUFF% # Will be activated later.
 AC_OUTPUT
@@ -85,7 +86,7 @@ END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability
+$AUTOMAKE --add-missing
 
 ./configure
 
@@ -122,7 +123,7 @@ cat configure.ac # For debugging.
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability
+$AUTOMAKE
 
 ./configure MAUDE=yes
 $MAKE
diff --git a/tests/pr300-lib.test b/tests/pr300-lib.test
index 9f9791f..b655cf0 100755
--- a/tests/pr300-lib.test
+++ b/tests/pr300-lib.test
@@ -23,6 +23,7 @@ required=cc
 cat >> configure.ac << 'END'
 AC_PROG_RANLIB
 AC_PROG_CC
+AM_PROG_AR
 AC_OUTPUT
 END
 
@@ -43,7 +44,7 @@ END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability --copy --add-missing
+$AUTOMAKE --copy --add-missing
 
 # We pass '--libdir' explicitly, to avoid spurious failures due to users
 # or distributions possibly overriding '${libdir}' in their $CONFIG_SITE
diff --git a/tests/pr300-ltlib.test b/tests/pr300-ltlib.test
index 09ae870..8db6b07 100755
--- a/tests/pr300-ltlib.test
+++ b/tests/pr300-ltlib.test
@@ -22,6 +22,7 @@ required='cc libtoolize'
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
@@ -41,7 +42,7 @@ END
 libtoolize
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability --copy --add-missing
+$AUTOMAKE --copy --add-missing
 
 # We pass '--libdir' explicitly, to avoid spurious failures due to users
 # or distributions possibly overriding '${libdir}' in their $CONFIG_SITE
diff --git a/tests/pr307.test b/tests/pr307.test
index 69c0f99..abcff80 100755
--- a/tests/pr307.test
+++ b/tests/pr307.test
@@ -37,6 +37,7 @@ required='libtoolize gcc'
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
@@ -66,7 +67,7 @@ done
 libtoolize --force
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability -a
+$AUTOMAKE -a
 
 # Sanity check: make sure the variable we are attempting to force
 # is indeed used by configure.
diff --git a/tests/pr401.test b/tests/pr401.test
index 9652786..a143498 100755
--- a/tests/pr401.test
+++ b/tests/pr401.test
@@ -49,6 +49,7 @@ AC_PROG_CC
 #x AM_PROG_CC_C_O
 AC_LIBOBJ([feep])
 AC_LIBSOURCE([feep.c])
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_CONFIG_FILES([lib/Makefile src/Makefile])
 AM_CONDITIONAL([CROSS_COMPILING], [test $cross_compiling = yes])
@@ -78,9 +79,11 @@ TESTS = main
 endif
 EOF
 
+cp "$am_scriptdir/ar-lib" . || fatal_ "fetching auxiliary script 'ar-lib'"
+
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability
+$AUTOMAKE
 ./configure
 $MAKE distcheck
 
@@ -96,7 +99,7 @@ mv -f configure.int configure.ac
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability
+$AUTOMAKE
 ./configure
 test ! -d lib/lib
 $MAKE distcheck
@@ -107,7 +110,7 @@ $MAKE distcheck
 
 mv -f src/Makefile.am src/t
 sed 's/LDADD = .*/LDADD = @LIBOBJS@/' src/t > src/Makefile.am
-AUTOMAKE_fails -Wno-extra-portability
+AUTOMAKE_fails
 grep 'cannot be used outside.*lib' stderr
 mv -f src/t src/Makefile.am
 
@@ -140,7 +143,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability --add-missing
+$AUTOMAKE --add-missing
 ./configure
 test ! -d src/lib
 test ! -d 'src/$(top_builddir)'
@@ -179,7 +182,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability
+$AUTOMAKE
 ./configure
 $MAKE distcheck
 
diff --git a/tests/pr401b.test b/tests/pr401b.test
index 7567866..3d15671 100755
--- a/tests/pr401b.test
+++ b/tests/pr401b.test
@@ -49,6 +49,7 @@ AC_PROG_CC
 #x AM_PROG_CC_C_O
 AC_LIBOBJ([feep])
 AC_LIBSOURCE([feep.c])
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_CONFIG_FILES([lib/Makefile src/Makefile])
 AM_CONDITIONAL([CROSS_COMPILING], [test $cross_compiling = yes])
@@ -78,10 +79,12 @@ TESTS = main
 endif
 EOF
 
+cp "$am_scriptdir/ar-lib" . || fatal_ "fetching auxiliary script 'ar-lib'"
+
 libtoolize
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability -a
+$AUTOMAKE -a
 ./configure
 $MAKE distcheck
 
@@ -97,7 +100,7 @@ mv -f configure.int configure.ac
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability -a
+$AUTOMAKE -a
 ./configure
 test ! -d lib/lib
 $MAKE distcheck
@@ -108,7 +111,7 @@ $MAKE distcheck
 
 mv -f src/Makefile.am src/t
 sed 's/LDADD = .*/LDADD = @LTLIBOBJS@/' src/t > src/Makefile.am
-AUTOMAKE_fails -Wno-extra-portability
+AUTOMAKE_fails
 grep 'cannot be used outside.*lib' stderr
 mv -f src/t src/Makefile.am
 
@@ -140,7 +143,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability --add-missing
+$AUTOMAKE --add-missing
 ./configure
 test ! -d src/lib
 test ! -d 'src/$(top_builddir)'
@@ -179,7 +182,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability
+$AUTOMAKE
 ./configure
 $MAKE distcheck
 
diff --git a/tests/pr401c.test b/tests/pr401c.test
index 50b2633..1f238f6 100755
--- a/tests/pr401c.test
+++ b/tests/pr401c.test
@@ -50,6 +50,7 @@ cat >>configure.ac << 'EOF'
 #: AC_CONFIG_LIBOBJ_DIR([lib])
 AC_PROG_CC
 #x AM_PROG_CC_C_O
+AM_PROG_AR
 AC_PROG_RANLIB
 AC_FUNC_ALLOCA
 AC_CONFIG_FILES([lib/Makefile src/Makefile])
@@ -80,9 +81,11 @@ TESTS = main
 endif
 EOF
 
+cp "$am_scriptdir/ar-lib" . || fatal_ "fetching auxiliary script 'ar-lib'"
+
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability
+$AUTOMAKE
 ./configure
 $MAKE distcheck
 
@@ -99,7 +102,7 @@ mv -f configure.int configure.ac
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability
+$AUTOMAKE
 ./configure
 test ! -d lib/lib
 $MAKE distcheck
@@ -110,7 +113,7 @@ $MAKE distcheck
 
 mv -f src/Makefile.am src/t
 sed 's/LDADD = .*/LDADD = @ALLOCA@/' src/t > src/Makefile.am
-AUTOMAKE_fails -Wno-extra-portability
+AUTOMAKE_fails
 grep 'cannot be used outside.*lib' stderr
 mv -f src/t src/Makefile.am
 
@@ -143,7 +146,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability --add-missing
+$AUTOMAKE --add-missing
 ./configure
 $MAKE
 test ! -d src/lib
@@ -182,7 +185,7 @@ EOF
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -Wno-extra-portability
+$AUTOMAKE
 ./configure
 $MAKE distcheck
 
-- 
1.7.9




reply via email to

[Prev in Thread] Current Thread [Next in Thread]