]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] tests: avoid spurious failure in a gettext test
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Aug 2012 15:15:54 +0000 (17:15 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Aug 2012 15:16:01 +0000 (17:16 +0200)
* t/gettext2.sh: Here, remove obsolete grepping checks in favor
of more modern ones.
* t/gettext.sh: Likewise.  This doesn't fix any failure, but
makes the test more reliable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/gettext.sh
t/gettext2.sh

index a1925f17bdae301ea7ab8759a6999e1a3aa24209..3527f7071d5e6d078642e334778ba1f2e03d2881 100755 (executable)
@@ -35,7 +35,6 @@ mkdir po intl
 # If aclocal fails here, it may be that gettext is too old to
 # provide AM_GNU_GETTEXT_VERSION.
 if $ACLOCAL; then
-
   # autopoint will fail if it's from an older version.
   # If gettext is too old to provide autopoint, this will
   # fail as well, so we're safe here.
@@ -49,7 +48,9 @@ fi
 sed '/AM_GNU_GETTEXT_VERSION/d' configure.ac >configure.int
 mv -f configure.int configure.ac
 
+rm -rf autom4te.cache
 $ACLOCAL
+$AUTOCONF
 
 # po/ and intl/ are required.
 
@@ -70,12 +71,15 @@ echo 'SUBDIRS = po intl' >Makefile.am
 $AUTOMAKE --add-missing
 
 # Make sure distcheck runs './configure --with-included-gettext'.
-grep 'with-included-gettext' Makefile.in
+./configure
+echo distdir: > po/Makefile
+echo distdir: > intl/Makefile
+$MAKE -n distcheck | grep '.*--with-included-gettext'
 
 # 'SUBDIRS = po intl' isn't required if po/ doesn't exist.
 # PR/381.
 
-rmdir po
+rm -rf po
 mkdir sub
 echo 'SUBDIRS = sub' >Makefile.am
 $AUTOMAKE
@@ -85,3 +89,5 @@ $AUTOMAKE
 : >Makefile.am
 AUTOMAKE_fails --add-missing
 grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
+
+:
index f3d91b04f7b8ec8305a470e90ccc8b1419a0962e..960ef361576ff42eb7324079af1fe80d1c60b967 100755 (executable)
@@ -29,6 +29,7 @@ END
 mkdir foo po
 
 $ACLOCAL
+$AUTOCONF
 
 # config.rpath is required.
 : >config.rpath
@@ -49,7 +50,8 @@ $AUTOMAKE --add-missing
 
 # Don't try running ./configure --with-included-gettext if the
 # user is using AM_GNU_GETTEXT([external]).
-grep 'with-included-gettext' Makefile.in && exit 1
+./configure
+$MAKE -n distcheck | grep 'with-included-gettext' && exit 1
 
 # intl/ isn't wanted with AM_GNU_GETTEXT([external]).