automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11.1-143-ga3daa68
Date: Mon, 26 Jul 2010 21:26:38 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=a3daa68ee01a8da113f7d7f8b713582453288ac7

The branch, branch-1.11 has been updated
       via  a3daa68ee01a8da113f7d7f8b713582453288ac7 (commit)
       via  fad7b920a2d3605495e09d0fe82db49f46fc852a (commit)
       via  ee9fe91c5b01466e9e60757dd1fa673675ec6809 (commit)
       via  4deaab9eaef915d4bef78e27e8e2d64d4629d01a (commit)
      from  7998ec9fb9fcd753f91477e9f0c0ca68093bbf77 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a3daa68ee01a8da113f7d7f8b713582453288ac7
Merge: 7998ec9 fad7b92
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 26 19:24:50 2010 +0200

    Merge branch 'maint' into branch-1.11

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                     |   56 ++++++++++++++++++++++++++++++++++++++++-
 tests/distcleancheck.test     |    8 ++++-
 tests/distcom2.test           |   20 ++++++---------
 tests/distcom3.test           |   13 ++++++---
 tests/distcom4.test           |    7 ++++-
 tests/distcom5.test           |   47 +++++++++++++++++-----------------
 tests/distcom6.test           |   23 ++++++----------
 tests/distcom7.test           |    7 ++++-
 tests/distdir.test            |   17 +++++++-----
 tests/distlinks.test          |    6 +++-
 tests/distname.test           |   23 +++++++++--------
 tests/subdir.test             |   16 +++++++----
 tests/subdir10.test           |    4 +-
 tests/subdir2.test            |   16 +++++++----
 tests/subdir3.test            |   15 +++++------
 tests/subdir4.test            |   17 ++++++------
 tests/subdir5.test            |   51 ++++++++++++++++++++++---------------
 tests/subdir6.test            |    3 +-
 tests/subdir7.test            |   10 ++++---
 tests/subdir8.test            |   37 ++++++++++++++++++---------
 tests/subdir9.test            |   10 +++++--
 tests/subdirbuiltsources.test |   13 +++------
 22 files changed, 262 insertions(+), 157 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1c8c9ae..d28525b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,57 @@
+2010-07-21  Stefano Lattarini  <address@hidden>
+
+       Modernize and improve test scripts `subdir*.test'.
+       * tests/subdir.test: Enable `errexit' shell flag, and related
+       changes.  Use the `configure.in' stub created by `./defs',
+       rather than writing one from scratch.
+       * tests/subdir2.test: Likewise.
+       * tests/subdir4.test: Likewise.
+       * tests/subdir3.test: Enable `errexit' shell flag, and related
+       changes.  Do not create useless dummy source files.
+       * tests/subdir5.test: Make grepping of Makefile.in (in topdir
+       and in subdirs) stricter.  Some minor changes to keep it more
+       in sync with the related test `subdir8.test'.
+       * tests/subdir8.test: Likewise (but with the related test being
+       `subdir5.test' here).
+       * tests/subdir6.test: Cosmetic change in spacing.
+       * tests/subdir9.test: Define and use new variable `$distdir'.  Add
+       trailing `:' command.
+       * tests/subdir10.test: Cosmetic consistency-related change.
+       * tests/subdirbuiltsources.test: Cosmetic changes in spacings.
+       (configure.in): Use stub created by `./defs', rather than writing
+       it from scratch.  Do not use obsoleted and/or deprecated forms of
+       autoconf/automake macros.
+
+       Modernize and improve test scripts `dist*.test'.
+       * tests/distcleancheck.test: Do not add useless `-e' option to
+       a $MAKE call.  Extend test by grepping stderr of make.
+       * tests/distcom2.test: Do not run the same test script on the
+       Makefile.in twice, but save its output in an intermediate file
+       instead.  Make grepping of DIST_COMMON definition stricter.
+       Display the content of more files, to ease debugging.  Add a
+       trailing `:' command.  Improved heading comments w.r.t. sister
+       test(s).
+       * tests/distcom6.test: Likewise, and avoid to uselessly run
+       autoconf.
+       * tests/distcom3.test: Ensure verbose printing of captured stdout
+       and stderr.  Make grepping of captured stderr stricter.  Also,
+       add trailing `:' command.
+       * tests/distcom4.test: Declare the target `test' in the generated
+       Makefile.am as `.PHONY'.  Display content of more files, to ease
+       debugging.  Add trailing `:' command.
+       * tests/distcom5.test: Likewise.  Also, factor out common sed
+       script in subroutine `extract_distcommon'.
+       * tests/distcom7.test: Prefer cat + here-doc over echo to write
+       test Makefile.am files.  Add a trailing `:' command.
+       * tests/distname.test: Prefer `gzip -d' over `gunzip'.  Move the
+       call to `set -e' earlier.  Be stricter and more verbose in the
+       checking of the generated tarball.
+       (configure.in): Use the stub provided by ./defs, instead of
+       writing it from scratch.  Avoid obsoleted constructs.  Remove
+       useless call to `AM_PROG_CC_C_O'.
+       * tests/distdir.test: Various minor improvements/normalizations.
+       * tests/distlinks.test: Likewise.
+
 2010-07-18  Stefano Lattarini  <address@hidden>
 
        Improve and extend test cond5.test.
@@ -408,7 +462,7 @@
        * tests/nodepcomp.test: Likewise.
        * tests/f90only.test: Likewise, and remove botched/obsoleted
        comments and unecessary commands.
-       * tests/fonly.test: Likewise, and removed botched/obsolted
+       * tests/fonly.test: Likewise, and remove botched/obsoleted
        comments and unecessary commands.
        * tests/discover.test: Likewise, and made stricter.
 
diff --git a/tests/distcleancheck.test b/tests/distcleancheck.test
index 8603329..0f32e33 100755
--- a/tests/distcleancheck.test
+++ b/tests/distcleancheck.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2008, 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
@@ -63,6 +63,10 @@ mv -f t Makefile.am
 $AUTOMAKE
 ./configure
 $MAKE
-$MAKE -e distcheck && Exit 1
+$MAKE distcheck 2>stderr && { cat srderr >&2; Exit 1; }
+cat stderr >&2
+
+grep 'ERROR:.*files left in build directory after distclean' stderr
+grep '^\./foo\.1$' stderr
 
 :
diff --git a/tests/distcom2.test b/tests/distcom2.test
index 19d3377..23841c6 100755
--- a/tests/distcom2.test
+++ b/tests/distcom2.test
@@ -17,6 +17,7 @@
 
 # Test to make sure that depcomp and compile are added to DIST_COMMON
 # From Pavel Roskin.
+# Please keep this in sync with sister test 'distcom6.test'.
 
 . ./defs || Exit 1
 
@@ -60,16 +61,11 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
    t loop
    p
    n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep compile
+   }' -e 's/$/ /' -e '/^DIST_COMMON =/p' Makefile.in > dc.txt
 
-sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep depcomp
+cat dc.txt # might be useful for debugging
+
+$FGREP ' compile ' dc.txt
+$FGREP ' depcomp ' dc.txt
+
+:
diff --git a/tests/distcom3.test b/tests/distcom3.test
index 04bf365..9cc62ea 100755
--- a/tests/distcom3.test
+++ b/tests/distcom3.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 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
@@ -34,9 +35,9 @@ END
 $ACLOCAL
 
 # Should not warn about missing README, since it is a target.
-$AUTOMAKE --add-missing --gnu >stdout 2>&1
-cat stdout
-grep README stdout && Exit 1
+$AUTOMAKE --add-missing --gnu >output 2>&1 || { cat output; Exit 1; }
+cat output
+grep README output && Exit 1
 
 sed -n -e '/^DIST_COMMON =.*\\$/ {
    :loop
@@ -54,4 +55,6 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
 # Should warn about missing README.
 : > Makefile.am
 AUTOMAKE_fails --add-missing --gnu
-grep README stderr
+grep 'required file.*README.*not found' stderr
+
+:
diff --git a/tests/distcom4.test b/tests/distcom4.test
index 32be702..5dde663 100755
--- a/tests/distcom4.test
+++ b/tests/distcom4.test
@@ -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
@@ -46,6 +46,7 @@ mkdir tests
 : > README
 : > tests/wrapper.in
 cat > Makefile.am << 'END'
+.PHONY: test
 test: distdir
        test -f $(distdir)/tests/wrapper.in
 END
@@ -68,7 +69,11 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
    n
    }' -e '/^DIST_COMMON =/ p' Makefile.in > dc.txt
 
+cat dc.txt # might be useful for debugging
+
 test 1 = `grep tests dc.txt | wc -l`
 grep configure dc.txt
 # README must come first.
 grep 'DIST_COMMON = README' Makefile.in
+
+:
diff --git a/tests/distcom5.test b/tests/distcom5.test
index 2462685..7cadfd5 100755
--- a/tests/distcom5.test
+++ b/tests/distcom5.test
@@ -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
@@ -23,6 +23,21 @@
 
 set -e
 
+extract_distcommon ()
+{
+  sed -n -e '/^DIST_COMMON =.*\\$/ {
+    :loop
+    p
+    n
+    t clear
+    :clear
+    s/\\$/\\/
+    t loop
+    p
+    n
+    }' -e '/^DIST_COMMON =/ p' ${1+"$@"}
+}
+
 cat >> configure.in << 'END'
    AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
                    [chmod +x tests/autoconf])
@@ -47,6 +62,7 @@ mkdir tests
 : > tests/Makefile.am
 cat > Makefile.am << 'END'
 SUBDIRS = tests
+.PHONY: test
 test: distdir
        test -f $(distdir)/tests/wrapper.in
 END
@@ -57,29 +73,14 @@ $AUTOMAKE --add-missing
 ./configure
 $MAKE test
 
-sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in > top.txt
+extract_distcommon Makefile.in > top.txt
+extract_distcommon tests/Makefile.in > inner.txt
 
-sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' tests/Makefile.in > inner.txt
+# might be useful for debugging
+cat top.txt
+cat inner.txt
 
 test 0 = `grep tests top.txt | wc -l`
 test 1 = `grep wrapper inner.txt | wc -l`
+
+:
diff --git a/tests/distcom6.test b/tests/distcom6.test
index b7abba3..ca71571 100755
--- a/tests/distcom6.test
+++ b/tests/distcom6.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 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
@@ -18,6 +18,7 @@
 # are added to the top-level DIST_COMMON even with --no-force.
 # This is similar to distcom2.test, but with --no-force added.
 # Report from Scott James Remnant (Debian #206299).
+# Please keep this in sync with sister test 'distcom2.test'.
 
 . ./defs || Exit 1
 
@@ -46,7 +47,6 @@ END
 rm -f compile depcomp
 
 $ACLOCAL
-$AUTOCONF
 $AUTOMAKE --add-missing --no-force
 
 test -f compile
@@ -62,16 +62,11 @@ sed -n -e '/^DIST_COMMON =.*\\$/ {
    t loop
    p
    n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep compile
+   }' -e 's/$/ /' -e '/^DIST_COMMON =/p' Makefile.in > dc.txt
 
-sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep depcomp
+cat dc.txt # might be useful for debugging
+
+$FGREP ' compile ' dc.txt
+$FGREP ' depcomp ' dc.txt
+
+:
diff --git a/tests/distcom7.test b/tests/distcom7.test
index b2d19d6..3ea5096 100755
--- a/tests/distcom7.test
+++ b/tests/distcom7.test
@@ -34,9 +34,14 @@ END
 rm -f depcomp
 mkdir subdir
 
-echo bin_PROGRAMS = foo > subdir/Makefile.am
+cat > subdir/Makefile.am << 'END'
+bin_PROGRAMS = foo
+END
+
 : > subdir/foo.c
 
 $ACLOCAL
 AUTOMAKE_fails --add-missing subdir/Makefile
 grep 'full run' stderr
+
+:
diff --git a/tests/distdir.test b/tests/distdir.test
index af2d01a..04ba363 100755
--- a/tests/distdir.test
+++ b/tests/distdir.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2006, 2007, 2009  Free Software
-# Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2006, 2007, 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
@@ -26,7 +26,9 @@
 
 set -e
 
-echo AC_OUTPUT >>configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 cat > Makefile.am << 'END'
 include_HEADERS = some/file another/sub/subsub/file2 yet/another/file3
@@ -67,16 +69,17 @@ $MAKE distdir
 # Check to make sure `foo' isn't made in build directory.
 test -d foo && Exit 1
 
-rm -rf distdir-1.0
+rm -rf $me-1.0
 # Remove the dot from VERSION for the next grep.
-VERSION=10 MKDIR_P='echo MKDIR_P' $MAKE -e distdir >make.log || :
+VERSION=10 MKDIR_P='echo MKDIR_P' $MAKE -e distdir >stdout || :
+cat stdout
 
 # Make sure no `./' appear in the directory names.  srcdir is `..', so
 # this also checks that no directory is created in the source tree.
-grep 'MKDIR_P.*\.' make.log && Exit 1
+grep 'MKDIR_P.*\.' stdout && Exit 1
 
 cd ..
 ./configure --prefix "`pwd`"
 $MAKE distcheck
 
-Exit 0
+:
diff --git a/tests/distlinks.test b/tests/distlinks.test
index 41a783d..268cfcb 100755
--- a/tests/distlinks.test
+++ b/tests/distlinks.test
@@ -43,7 +43,9 @@ ln -s bar2 bar3
 
 ln -s "`pwd`/foo" quux
 
-echo AC_OUTPUT >>configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
 
 echo "me = $me" > Makefile.am  # for better failure messages
 cat >> Makefile.am << 'END'
@@ -71,3 +73,5 @@ $AUTOMAKE
 
 ./configure
 $MAKE test
+
+:
diff --git a/tests/distname.test b/tests/distname.test
index 6c18608..117d986 100755
--- a/tests/distname.test
+++ b/tests/distname.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 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,12 +19,12 @@
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(a.c)
-AM_INIT_AUTOMAKE(nonesuch, 0.23)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_SRCDIR([a.c])
 AC_PROG_CC
-AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -34,14 +34,15 @@ END
 
 : > a.c
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
 ./configure
 $MAKE dist
 
-gunzip nonesuch-0.23.tar.gz
-(tar tf nonesuch-0.23.tar | $FGREP './nonesuch-0.23/a.c') && Exit 1
-Exit 0
+gzip -d $me-1.0.tar.gz
+tar tf $me-1.0.tar > stdout || { cat stdout; Exit 1; }
+cat stdout
+$FGREP ./$me-1.0/a.c stdout && Exit 1
+
+:
diff --git a/tests/subdir.test b/tests/subdir.test
index 85db059..edad4ca 100755
--- a/tests/subdir.test
+++ b/tests/subdir.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
@@ -19,12 +20,13 @@
 
 . ./defs || Exit 1
 
+set -e
+
 mkdir zot
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile zot/Makefile)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([zot/Makefile])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -35,5 +37,7 @@ cat > zot/Makefile.am << 'END'
 pkgdata_DATA =
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/subdir10.test b/tests/subdir10.test
index c71216b..eabd1a9 100755
--- a/tests/subdir10.test
+++ b/tests/subdir10.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -36,4 +36,4 @@ $AUTOMAKE
 ./configure
 env fail=1 $MAKE all clean
 
-Exit 0
+:
diff --git a/tests/subdir2.test b/tests/subdir2.test
index aa83436..9412054 100755
--- a/tests/subdir2.test
+++ b/tests/subdir2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
@@ -18,13 +19,14 @@
 
 . ./defs || Exit 1
 
+set -e
+
 mkdir one
 mkdir one/two
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile one/Makefile one/two/Makefile)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([one/Makefile one/two/Makefile])
+AC_OUTPUT
 END
 
 # Files required because we are using `--gnu'.
@@ -47,5 +49,7 @@ cat > one/two/Makefile.am << 'END'
 pkgdata_DATA =
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE --gnu
+
+:
diff --git a/tests/subdir3.test b/tests/subdir3.test
index aa02be0..3da2cc8 100755
--- a/tests/subdir3.test
+++ b/tests/subdir3.test
@@ -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
@@ -18,6 +18,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz widdershins
 zardoz_SOURCES = y.c x/z.c
@@ -28,12 +30,9 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 END
 
-mkdir x
-
-: > y.c
-: > x/z.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^z\.o: x/z\.c$' Makefile.in
+
+:
diff --git a/tests/subdir4.test b/tests/subdir4.test
index 2f85213..7ea10f8 100755
--- a/tests/subdir4.test
+++ b/tests/subdir4.test
@@ -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
@@ -19,14 +19,15 @@
 
 . ./defs || Exit 1
 
+set -e
+
 mkdir lib src
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
 AC_PROG_RANLIB
 AC_PROG_CC
-AC_OUTPUT(Makefile lib/Makefile src/Makefile)
+AC_CONFIG_FILES([lib/Makefile src/Makefile])
+AC_OUTPUT
 END
 
 # Files required because we are using `--gnu'.
@@ -55,8 +56,8 @@ cat > src/Makefile.am << 'END'
 pkgdata_DATA =
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE --gnu || Exit 1
+$ACLOCAL
+$AUTOMAKE --gnu
 
 # Make sure that depcomp is *not* included in the definition
 # of DIST_COMMON in lib/Makefile.in.  If you change this test
@@ -65,4 +66,4 @@ $AUTOMAKE --gnu || Exit 1
 # continued line.
 grep '^DIST_COMMON.*depcomp' lib/Makefile.in && Exit 1
 
-Exit 0
+:
diff --git a/tests/subdir5.test b/tests/subdir5.test
index 2f0113b..6eb3aaa 100755
--- a/tests/subdir5.test
+++ b/tests/subdir5.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2009  Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2003, 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
@@ -22,16 +22,15 @@
 
 # This test assumes that the `make' utility is able to start
 # over and reload Makefiles which have been remade (a non-POSIX feature).
+# See also the related test subdir8.test.
 required='GNUmake gcc'
 . ./defs || Exit 1
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(maude, 1.0)
-AM_INIT_AUTOMAKE
+cat >> configure.in << 'END'
+AC_PROG_CC
 AM_PROG_CC_C_O
-AC_CONFIG_FILES(Makefile)
 AC_OUTPUT
 END
 
@@ -55,26 +54,30 @@ $AUTOMAKE --include-deps --copy --add-missing
 ./configure
 $MAKE
 
+# Now add new directories.
+#
 # We shouldn't need to $sleep here: configure ensures that files
 # generated by it are newer than configure.  Thus, even if
 # Makefile.in is newer than configure but the updated Makefile.am
 # below has the same timestamp as Makefile.in, the latter should
 # be rebuilt due to its dependency on configure.in.
 
-# Now add a new directory.
-cat > configure.in << 'END'
-AC_INIT(maude, 1.0)
-AM_INIT_AUTOMAKE
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_CONFIG_FILES(Makefile maude/Makefile)
-m4_include([confile.m4])
-AC_OUTPUT
-END
+# First we add a new directory by modifying configure.in directly.
+# We update configure.in *before* updating sub/Makefile.am; subdir8.test
+# does it in the other way: it updates confiles.m4 (which is m4_included
+# by configure.in there) after Makefile.am.
+
+sed <configure.in >configure.tmp -e '/^AC_OUTPUT$/i\
+AC_CONFIG_FILES([maude/Makefile])\
+m4_include([confile.m4])'
+mv -f configure.tmp configure.in
+
+cat configure.in # might be useful for debugging
 
 : > confile.m4
 
 mkdir maude
+
 cat > maude/Makefile.am << 'END'
 include_HEADERS = foo.h
 END
@@ -87,15 +90,21 @@ echo 'SUBDIRS = maude' >> Makefile.am
 $MAKE
 test -f maude/Makefile
 
-# Add yet another directory
+# Then we add a new directory by modifying a file included (through
+# `m4_include') by configure.in.
 mkdir maude2
-echo 'AC_CONFIG_FILES([maude2/Makefile])AC_SUBST([GREPME])' > confile.m4
+cat >> confile.m4 << 'END'
+AC_CONFIG_FILES([maude2/Makefile])
+AC_SUBST([GREPME])
+END
 : > maude2/Makefile.am
 echo 'SUBDIRS += maude2' >> Makefile.am
 
 # We want a simple rebuild to create maude2/Makefile and update
 # all other Makefiles automatically.
 $MAKE
-grep GREPME Makefile
-grep GREPME maude/Makefile
-grep GREPME maude2/Makefile
+grep '^GREPME =' Makefile
+grep '^GREPME =' maude/Makefile
+grep '^GREPME =' maude2/Makefile
+
+:
diff --git a/tests/subdir6.test b/tests/subdir6.test
index 81221ff..f3a2107 100755
--- a/tests/subdir6.test
+++ b/tests/subdir6.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -38,4 +38,5 @@ $MAKE clean
 test -f sub/stamp-h1
 $MAKE distclean
 test -f sub/stamp-h1 && Exit 1
+
 :
diff --git a/tests/subdir7.test b/tests/subdir7.test
index e72f489..b50b250 100755
--- a/tests/subdir7.test
+++ b/tests/subdir7.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 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,7 +23,7 @@ set -e
 mkdir obj
 
 cat >>configure.in << 'END'
-AC_CONFIG_FILES(obj/Makefile)
+AC_CONFIG_FILES([obj/Makefile])
 AC_OUTPUT
 END
 
@@ -35,11 +35,13 @@ $ACLOCAL
 AUTOMAKE_fails
 grep 'Makefile.am:1:.*obj.*BSD' stderr
 
-cat >Makefile.am <<'EOF'
+cat >Makefile.am <<'END'
 SUBDIRS = @STH@
 FOO = obj
 DIST_SUBDIRS = $(FOO)
-EOF
+END
 
 AUTOMAKE_fails
 grep 'Makefile.am:2:.*obj.*BSD' stderr
+
+:
diff --git a/tests/subdir8.test b/tests/subdir8.test
index bc3043e..093fac8 100755
--- a/tests/subdir8.test
+++ b/tests/subdir8.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2003, 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
@@ -21,13 +21,12 @@
 
 # This test assumes that the `make' utility is able to start
 # over and reload Makefiles which have been remade (a non-POSIX feature).
+# See also the related test subdir5.test.
 required='GNUmake gcc'
 . ./defs || Exit 1
 
 set -e
 
-echo 'AC_CONFIG_FILES([sub/Makefile])' >confiles.m4
-
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
@@ -36,6 +35,8 @@ MORE_DEFS
 AC_OUTPUT
 END
 
+echo 'AC_CONFIG_FILES([sub/Makefile])' > confiles.m4
+
 cat > Makefile.am << 'END'
 SUBDIRS = sub
 ACLOCAL_AMFLAGS = -I m4
@@ -66,8 +67,18 @@ $AUTOMAKE --copy --add-missing
 ./configure
 $MAKE
 
-# Now add a new directory.
-# See subdir5.test for why we shouldn't need to $sleep here.
+# Now add new directories.
+#
+# We shouldn't need to $sleep here: configure ensures that files
+# generated by it are newer than configure.  Thus, even if
+# Makefile.in is newer than configure but the updated Makefile.am
+# below has the same timestamp as Makefile.in, the latter should
+# be rebuilt due to its dependency on configure.in.
+
+# The first step users typically do when adding a new subdir is
+# editing configure.in.  That is already tested by subdir5.test,
+# though, so here we try to just edit a file that is included by
+# configure.in, without touching configure.in itself.
 
 mkdir sub/maude
 cat > sub/maude/Makefile.am << 'END'
@@ -81,9 +92,8 @@ echo 'SUBDIRS = maude' >> sub/Makefile.am
 mkdir maude
 : > maude/Makefile.am
 
-# Update confile.m4 *after* updating sub/Makefile.am.
-# (subdir5.test do it in the other way: it updates configure.in
-# before Makefile.am)
+# Update confiles.m4 *after* updating sub/Makefile.am; subdir5.test do
+# it in the other way: it updates configure.in before Makefile.am.
 echo 'AC_CONFIG_FILES([maude/Makefile sub/maude/Makefile])' >> confiles.m4
 
 # We want a simple rebuild from sub/ to create sub/maude/Makefile
@@ -98,7 +108,10 @@ test -f sub/maude/Makefile
 # the top-level directory.
 echo 'AC_DEFUN([MORE_DEFS], [AC_SUBST([GREPME])])' > m4/moredefs.m4
 $MAKE
-grep GREPME Makefile
-grep GREPME maude/Makefile
-grep GREPME sub/Makefile
-grep GREPME sub/maude/Makefile
+
+grep '^GREPME =' Makefile
+grep '^GREPME =' maude/Makefile
+grep '^GREPME =' sub/Makefile
+grep '^GREPME =' sub/maude/Makefile
+
+:
diff --git a/tests/subdir9.test b/tests/subdir9.test
index 4346326..c73ca18 100755
--- a/tests/subdir9.test
+++ b/tests/subdir9.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 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
@@ -43,13 +43,17 @@ cat >src/subdir2/Makefile.am <<'EOF'
 EXTRA_DIST = foo
 EOF
 
+distdir=$me-1.0
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
 ./configure
 $MAKE distdir
-test -f subdir9-1.0/src/subdir/foo
-test -f subdir9-1.0/src/subdir2/foo
+test -f $distdir/src/subdir/foo
+test -f $distdir/src/subdir2/foo
 $MAKE clean
 $MAKE distclean
 test ! -f src/subdir2/Makefile
+
+:
diff --git a/tests/subdirbuiltsources.test b/tests/subdirbuiltsources.test
index 8fe506a..a84f28e 100755
--- a/tests/subdirbuiltsources.test
+++ b/tests/subdirbuiltsources.test
@@ -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
@@ -24,12 +24,11 @@ set -e
 
 mkdir lib
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([lib/Makefile])
 AC_PROG_RANLIB
 AC_PROG_CC
-AC_OUTPUT(Makefile lib/Makefile)
+AC_OUTPUT
 END
 
 # Files required because we are using `--gnu'.
@@ -60,9 +59,7 @@ END
 
 
 $ACLOCAL
-
 $AUTOCONF
-
 $AUTOMAKE --include-deps --copy --force-missing --add-missing --gnu
 
 ./configure
@@ -71,4 +68,4 @@ $AUTOMAKE --include-deps --copy --force-missing --add-missing 
--gnu
 # $MAKE -C lib foo.h
 $MAKE
 
-Exit 0
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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