]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Modernize, improve and/or fix various test scripts.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 7 May 2010 23:27:36 +0000 (01:27 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 9 Jun 2010 19:01:18 +0000 (21:01 +0200)
* tests/sanity.test: Rely on the `configure.in' stub created by
`./defs', rather than writing one from scratch.
* tests/depend2.test: Likewise.  Also, call `set -e' just after
the inclusion of `./defs', instead that later in the script.
* tests/canon5.test: Avoid a useless `|| Exit 1' after a call to
$AUTOMAKE, and improve the positioning of an $ACLOCAL call.
* tests/exeext4.test: Use $FGREP instead of grep, where possible.
Make auxiliary rules in the generated Makefile more silent.
These changes make some checks slighty stricter.
* tests/ext2.test: Call `Exit 1' if inclusion of `./defs' fails.
* tests/gettext2.test: Place final `:' at the end of the script,
rather than in the middle.
* tests/exeext.test: Call `set -e' just after the inclusion of
`./defs', instead that later in the script.
* tests/extra5.test: Likewise.
* tests/confdeps.test: Likewise.  Also, prefer `mv -f' over
plain `mv', just to be sure.
* tests/depcomp.test: Enable `errexit' shell flag, with related
changes.  Also, modernize the generated configure.in.
* tests/cond9.test: Likewise.  Also, rely on the `configure.in'
stub created by `./defs', rather than writing one from scratch.
* tests/cond10.test: Likewise.
* tests/depcomp2.test: Likewise.
* tests/depend3.test: Likewise.
* tests/distcom7.test: Likewise.
* tests/fortdep.test: Likewise.  Also, remove definition of
AUTOMAKE_OPTIONS to `foreign' in the generated Makefile.am,
since that flag is already provided by $AUTOMAKE.
* tests/mdate.test: Made stricter, by checking that Automake
actually failed, and by making a stricter grep on the error
message.  Also, set shell `errexit flag'.
* tests/python2.test: Improved verbose messages.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19 files changed:
ChangeLog
tests/canon5.test
tests/cond10.test
tests/cond9.test
tests/confdeps.test
tests/depcomp.test
tests/depcomp2.test
tests/depend2.test
tests/depend3.test
tests/distcom7.test
tests/exeext.test
tests/exeext4.test
tests/ext2.test
tests/extra5.test
tests/fortdep.test
tests/gettext2.test
tests/mdate.test
tests/python2.test
tests/sanity.test

index 4683ee93c63631ae5b4aa858eb1a392416877b6d..28786b07950c44164b3c12aa95977ae7f8b9c688 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,39 @@
 2010-06-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Modernize, improve and/or fix various test scripts.
+       * tests/sanity.test: Rely on the `configure.in' stub created by
+       `./defs', rather than writing one from scratch.
+       * tests/depend2.test: Likewise.  Also, call `set -e' just after
+       the inclusion of `./defs', instead that later in the script.
+       * tests/canon5.test: Avoid a useless `|| Exit 1' after a call to
+       $AUTOMAKE, and improve the positioning of an $ACLOCAL call.
+       * tests/exeext4.test: Use $FGREP instead of grep, where possible.
+       Make auxiliary rules in the generated Makefile more silent.
+       These changes make some checks slighty stricter.
+       * tests/ext2.test: Call `Exit 1' if inclusion of `./defs' fails.
+       * tests/gettext2.test: Place final `:' at the end of the script,
+       rather than in the middle.
+       * tests/exeext.test: Call `set -e' just after the inclusion of
+       `./defs', instead that later in the script.
+       * tests/extra5.test: Likewise.
+       * tests/confdeps.test: Likewise.  Also, prefer `mv -f' over
+       plain `mv', just to be sure.
+       * tests/depcomp.test: Enable `errexit' shell flag, with related
+       changes.  Also, modernize the generated configure.in.
+       * tests/cond9.test: Likewise.  Also, rely on the `configure.in'
+       stub created by `./defs', rather than writing one from scratch.
+       * tests/cond10.test: Likewise.
+       * tests/depcomp2.test: Likewise.
+       * tests/depend3.test: Likewise.
+       * tests/distcom7.test: Likewise.
+       * tests/fortdep.test: Likewise.  Also, remove definition of
+       AUTOMAKE_OPTIONS to `foreign' in the generated Makefile.am,
+       since that flag is already provided by $AUTOMAKE.
+       * tests/mdate.test: Made stricter, by checking that Automake
+       actually failed, and by making a stricter grep on the error
+       message.  Also, set shell `errexit flag'.
+       * tests/python2.test: Improved verbose messages.
+
        Make test `ammissing.test' stricter.
        * tests/ammissing.test: Fail if $ACLOCAL succeds unexpectedly.
        Enable `errexit' shell flag.
index 768e087fe422099de651eeee06b0128721d494cd..53cdeb2a277090e733e4c184a4fc1aacca0f8f93 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,13 +24,14 @@ set -e
 
 echo AC_PROG_CC >> configure.in
 
+$ACLOCAL
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = 123test
 123test_SOURCES = 123.c
 END
 
-$ACLOCAL
-$AUTOMAKE || Exit 1
+$AUTOMAKE
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = _foo
index ec5766b16b856d515064dde64b21dde0ffb6814c..974dfdc2fbea1b794b156d6ff0a79969426a879f 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(foo,0.0)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
 AM_CONDITIONAL(USE_A,[test x = y])
 AM_CONDITIONAL(USE_B,[test x = z])
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -42,6 +42,6 @@ noinst_PROGRAMS=foo
 foo_SOURCES=foo.c $(out)
 END
 
-$ACLOCAL \
-  && $AUTOMAKE -a \
-  && grep 'USE_A_FALSE.*USE_B_FALSE.*output_c\...OBJEXT.' Makefile.in
+$ACLOCAL
+$AUTOMAKE -a
+grep 'USE_A_FALSE.*USE_B_FALSE.*output_c\...OBJEXT.' Makefile.in
index dd5975873d60a6d0f4100d1d77519b5df73efb11..e79809904bb9ed4a4e875daa633aead910dbde03 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(foo,0.0)
+set -e
+
+cat >> configure.in << 'END'
 AM_CONDITIONAL(WRONG, [test x = y])
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -36,8 +36,8 @@ echo-something:
        echo '$(this)'
 END
 
-$ACLOCAL \
-  && $AUTOCONF \
-  && $AUTOMAKE -a \
-  && ./configure \
-  && $MAKE echo-something | grep interesting > /dev/null
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+$MAKE echo-something | grep interesting > /dev/null
index 47cdc16c485a4b2afe0a334bb96f75a0769fc3ed..8e1cc64e10a556a3c3f459db630d38da6ca236a5 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-echo "FOO = foo"        > Makefile.am
 set -e
 
-echo "$me: Generated by aclocal..."
+echo "FOO = foo" > Makefile.am
+
 $ACLOCAL
+
+echo "$me: Generated by aclocal..."
 $AUTOMAKE
 grep '^\$(ACLOCAL_M4):' Makefile.in
 
@@ -30,7 +32,7 @@ echo "$me: Not generated by aclocal..."
 # Pretend it is not from aclocal (remove the signature),
 # but keep it correct, i.e., with AM_INIT_AUTOMAKE etc.
 sed -n '3,$p' aclocal.m4 >aclocal.m4t
-mv aclocal.m4t aclocal.m4
+mv -f aclocal.m4t aclocal.m4
 $AUTOMAKE
 grep '^\$(ACLOCAL_M4):' Makefile.in && Exit 1
 
index 7e4061751beada65cba10eb126fb5af7dace4e27..8b9be2948bfb7a66484165a2a857b1cd0f304048 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([subdir/Makefile subdir2/Makefile])
 AC_PROG_CC
-AC_OUTPUT(subdir/Makefile subdir2/Makefile)
+AC_OUTPUT
 END
 
 rm -f depcomp
@@ -40,9 +43,9 @@ cp subdir/Makefile.am subdir2/Makefile.am
 : > subdir/foo.c
 : > subdir2/foo.c
 
-$ACLOCAL || Exit 1
-$AUTOMAKE --add-missing || Exit 1
+$ACLOCAL
+$AUTOMAKE --add-missing
 
 # There used to be a bug where this was created in the first subdir with C
 # sources in it instead of in $top_srcdir or $ac_auxdir
-test -f depcomp || Exit 1
+test -f depcomp
index 4653c903fb3ab762b02c4135012999418f132dde..2b4353c516471efedc51126b518597df7154c24d 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 required=gcc
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(subdir/foo.c)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([subdir/Makefile])
 AC_PROG_CC
-AC_OUTPUT(Makefile subdir/Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -45,8 +46,8 @@ END
 CFLAGS=
 export CFLAGS
 
-$ACLOCAL || Exit 1
-$AUTOMAKE --add-missing || Exit 1
-$AUTOCONF || Exit 1
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
 ./configure CC='gcc' 2>error.log
 test -z "`cat error.log`"
index c259108f4acff3027be02748b7f723f2296c0ef0..57d87d76353032e04076da77ec1ec283bfab971f 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 required=gcc
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(hello.c)
-AM_INIT_AUTOMAKE(hello,0.23)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -47,8 +47,6 @@ main (int argc, char *argv[])
 }
 END
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
index 080fc56ad8cd383f9d4d29eed4256ad5dfae7887..f12e460ec12398385fde942515dade30af258492 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1997, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2010 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
 AC_SUBST(DEPS)
-AC_OUTPUT(Makefile)
 END
 
 cat > Makefile.am << 'END'
@@ -45,5 +45,5 @@ DEPS = @DEPS@
 TerraVision_DEPENDENCIES = $(DEPS)
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
index 500c909a5212aaac30caca80148e3b207b76161e..b2d19d6151a06666cdad1e865a56ab29eea0ced5 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2009, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(subdir/foo.c)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([subdir/Makefile])
 AC_PROG_CC
-AC_OUTPUT(Makefile subdir/Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
index 4ad837b80fdf6d5a5b1ef02212e777ae36354ced..3fd42a81e56df5ee4a24ca141f67960b4c212ad8 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,6 +23,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_CONDITIONAL([WANT_MT], [test -z "$revert"])
@@ -52,8 +54,6 @@ print:
        @echo 4BEG: $(libexec_PROGRAMS) :END4
 END
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
index 7bea7d492faeb6a6ef8f612274275f4fb5398cfd..e6cfe7df6e296b7773d9d79678c40452e6402e8c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,13 +41,13 @@ EXTRA_PROGRAMS = prg1 prg2 prg3
 TESTS = prg1 prg3 prg4 $(BAZ)
 
 print-bin:
-       echo BEG: $(bin_PROGRAMS) :END
+       @echo BEG: $(bin_PROGRAMS) :END
 print-extra:
-       echo BEG: $(EXTRA_PROGRAMS) :END
+       @echo BEG: $(EXTRA_PROGRAMS) :END
 print-tests:
-       echo BEG: $(TESTS) :END
+       @echo BEG: $(TESTS) :END
 print-barbaz:
-       echo BEG: $(BAR) $(BAZ) :END
+       @echo BEG: $(BAR) $(BAZ) :END
 END
 
 $ACLOCAL
@@ -56,24 +56,24 @@ $AUTOMAKE
 ./configure
 $MAKE print-bin > output
 cat output
-grep 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin' output
+$FGREP 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin' output
 $MAKE print-extra > output
 cat output
-grep 'prg1.bin prg2.bin prg3.bin' output
+$FGREP 'prg1.bin prg2.bin prg3.bin' output
 $MAKE print-tests > output
 cat output
-grep 'prg1.bin prg3.bin prg4' output
+$FGREP 'prg1.bin prg3.bin prg4' output
 
 ./configure cond=yes
 $MAKE print-bin > output
 cat output
-grep 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin bar.bin baz.bin' output
+$FGREP 'prg1.bin prg2.bin prg1.bin prg2.bin prg3.bin bar.bin baz.bin' output
 $MAKE print-tests > output
 cat output
-grep 'prg1.bin prg3.bin prg4 baz.bin bar.bin' output
+$FGREP 'prg1.bin prg3.bin prg4 baz.bin bar.bin' output
 $MAKE print-barbaz > output
 cat output
-grep 'bar baz bar' output
+$FGREP 'bar baz bar' output
 
 # Only two am__EXEEXT_* variables are needed here: one for BAR, and one
 # BAZ.  The latter must use the former.
index 3262f4955ffb43ab1f214dd8cdc3a47ea63da7a1..185b7085ace3f9660c4368ba8280f70102398255 100755 (executable)
@@ -18,7 +18,7 @@
 # Using different extensions for the same language should not
 # output the build rules several times.
 
-. ./defs
+. ./defs || Exit 1
 
 set -e
 
index 21f756e079d7a12342f0714846a804fa749e8a54..ebdda3225a8019be57dd20e54167d2fbd2dc83e9 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 echo AC_OUTPUT >> configure.in
 
 cat > Makefile.am << 'END'
@@ -29,8 +31,6 @@ foo:
        touch foo/bar
 END
 
-set -e
-
 $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
index 8e622984f4a2350e405f1d71c9fbeb21d93f5dc6..585e7c15ae52094c5daa41f6df1ea51aec0ccf3f 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 1.0, martin@tropos.de)
-AM_INIT_AUTOMAKE(foo, 1.0)
-AC_CONFIG_SRCDIR(foo.f)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_SRCDIR([foo.f])
 AC_PROG_F77
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS=foreign
 bin_PROGRAMS=foo
 foo_SOURCES=foo.f
 END
 
 : > foo.f
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep 'foo\.Po' Makefile.in && Exit 1
 Exit 0
index 41128e284efaf6adfbfdaf7835109d09409d4a61..a8c95ad36021fbac194f4198cd8816d122275de7 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -52,7 +52,6 @@ $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
-:
 
 # intl/ isn't wanted with AM_GNU_GETTEXT([external]).
 
@@ -60,3 +59,5 @@ mkdir intl
 echo 'SUBDIRS = po intl' >Makefile.am
 AUTOMAKE_fails --add-missing
 grep 'intl.*AM_GNU_GETTEXT' stderr
+
+:
index 92a736f9810a6b9947a4c5d1e3aafc2247908692..0dfba07e3b01ec492c77a1ba0766bdf3d81ca534 100755 (executable)
@@ -33,6 +33,8 @@ END
 # Required when using Texinfo.
 : > texinfo.tex
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 AUTOMAKE_fails
-grep 'required file.*mdate-sh' stderr
+grep 'required file.*mdate-sh.*not found' stderr
+
+:
index 7768e81fcc27bf90b2730a27265094c323eec097..3e14fa2b588fb4caeb120fddf738e69ce153c583 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,8 +20,8 @@
 
 set -e
 
-echo 1
-# pythondir not defined
+
+echo 1. pythondir not defined
 
 cat > Makefile.am <<'END'
 PYTHON = x
@@ -32,8 +32,8 @@ $ACLOCAL
 AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
-echo 2
-# pkgpythondir not defined
+
+echo 2. pkgpythondir not defined
 
 cat > Makefile.am <<'END'
 PYTHON = x
@@ -45,8 +45,7 @@ AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
-echo 3
-# pyexecdir not defined
+echo 3. pyexecdir not defined
 
 cat > Makefile.am <<'END'
 PYTHON = x
@@ -58,8 +57,7 @@ AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
-echo 4
-# pkgpyexecdir not defined
+echo 4. pkgpyexecdir not defined
 
 cat > Makefile.am <<'END'
 PYTHON = x
@@ -71,8 +69,7 @@ AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
-echo 5
-# PYTHON not defined.
+echo 5. PYTHON not defined.
 
 cat > Makefile.am <<'END'
 pkgpyexecdir = /here/we/go
@@ -84,8 +81,7 @@ AUTOMAKE_fails -a
 grep AM_PATH_PYTHON stderr
 
 
-echo 6
-# Ok.
+echo 6. Ok.
 
 cat > Makefile.am <<'END'
 PYTHON = x
@@ -98,8 +94,7 @@ $AUTOMAKE -a
 test -f py-compile
 
 
-echo 7
-# Ok.
+echo 7. Ok again.
 
 cat > Makefile.am <<'END'
 PYTHON = x
index 1c96c7892bdf4986a33d473df943987b443721bc..ed7fe2809117312b6ec652dc6eb9d63e61701515 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,13 +23,8 @@ set -e
 mkdir 'unsafe$'
 cd 'unsafe$'
 
-cat > configure.in << 'END'
-AC_INIT([sanity], [1.0])
-AM_INIT_AUTOMAKE([foreign])
-AC_OUTPUT(Makefile)
-END
-
-cp ../install-sh ../missing .
+mv ../configure.in .
+mv ../install-sh ../missing .
 
 : > Makefile.am
 
@@ -37,13 +32,14 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 ./configure 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr
+cat stderr >&2
 grep 'unsafe absolute working directory' stderr
 
 cd ..
 mkdir build
 cd build
 ../unsafe$/configure 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr
+cat stderr >&2
 grep 'unsafe srcdir' stderr
+
 :