automake-commit
[Top][All Lists]
Advanced

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

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


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-575-ga297a16
Date: Fri, 07 Jan 2011 21:10:58 +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=a297a16568c8749e770b50a8910ab833d2837592

The branch, master has been updated
       via  a297a16568c8749e770b50a8910ab833d2837592 (commit)
       via  ed2c8bc8d83137428ce1976061d199768c1917eb (commit)
       via  a7d14dfbd4bbf58e03b007cea9e97d1c47f17c7c (commit)
       via  23934e1f5b4c552065c9499bf61c65455266989c (commit)
       via  d5a408d73bec98becd56cacfcc7422790fc8a9a7 (commit)
      from  b9ab6dd38be370a76db85c32e0c0ab9e7189eed6 (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 a297a16568c8749e770b50a8910ab833d2837592
Merge: a7d14df ed2c8bc
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jan 7 22:01:20 2011 +0100

    Merge branch 'yacc-clean'

commit ed2c8bc8d83137428ce1976061d199768c1917eb
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jan 7 15:44:47 2011 +0100

    yacc: "make clean" removes .c and .h files from non-distributed .y
    
    Previously, while automake did *not* distribute C source and header
    files derived from non-distributed Yacc sources, it still caused
    them to be removed only by "make maintainer-clean" only, and not by
    simply "make clean" or "make distclean".
    This caused "make distcheck" to fail, unless the developer put
    those generated .c and .h files in CLEANFILES or in DISTCLEANFILES
    by hand.
    This change fixes this issue, by making non-distributed `.c' and
    `.h' files generated by non-distributed Yacc sources cleaned by
    "make clean".
    
    * tests/automake.in (lang_yacc_target_hook): Make C source and
    header files derived from non-distributed Yacc files cleaned by
    "make clean", not only by "make maintainer-clean".
    * tests/yacc-clean.test: New test.
    * tests/Makefile.am (TESTS): Update.
    * NEWS: Update.

commit a7d14dfbd4bbf58e03b007cea9e97d1c47f17c7c
Author: Stefano Lattarini <address@hidden>
Date:   Sun Jan 2 15:49:16 2011 +0100

    Tests: normalize use of the 'errexit' shell flag.
    
    * tests/maken3.test (check_targets): Remove redundant call to
    'set -e'.
    * tests/maken4.test: Likewise.
    * tests/ansi5.test: Call 'set -e' just after './defs' has been
    sourced.
    * tests/ansi6.test: Likewise.
    * tests/ansi7.test: Likewise.
    * tests/cond16.test: Likewise.
    * tests/cond17.test: Likewise.
    * tests/cond18.test: Likewise.
    * tests/cond19.test: Likewise.
    * tests/cond20.test: Likewise.
    * tests/cond21.test: Likewise.
    * tests/instdat2.test: Likewise.
    * tests/instdir-texi.test: Likewise.
    * tests/parallel-tests3.test: Likewise.
    * tests/remake1a.test: Likewise.
    * tests/ccnoco.test: Likewise, and add trailing `:' command.
    * tests/comment4.test: Likewise.
    * tests/gcj4.test: Likewise.
    * tests/nodist2.test: Likewise.
    * tests/nodist3.test: Enable 'errexit' shell flag (this should
    have been done in commit v1.11-248-g317e17b, but the relevant
    hunk has been forgotten somehow).
    * tests/output.test: Likewise.
    * tests/gnits2.test: Likewise, and display captured stderr to
    script's stderr, not to script's stdout.
    * tests/gnits3.test: Likewise.  Also, prefer 'cat' over 'echo'
    to append to Makefile.am, and really check that the exit status
    of "make installcheck" indicates failure.

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

Summary of changes:
 ChangeLog                  |   66 ++++++++++++++++++
 NEWS                       |    5 +-
 automake.in                |   15 ++---
 doc/automake.texi          |   30 ++++++++-
 tests/Makefile.am          |    1 +
 tests/Makefile.in          |    1 +
 tests/ansi5.test           |    6 +-
 tests/ansi6.test           |    6 +-
 tests/ansi7.test           |    6 +-
 tests/ccnoco.test          |    9 ++-
 tests/comment4.test        |    5 +-
 tests/cond16.test          |    6 +-
 tests/cond17.test          |    6 +-
 tests/cond18.test          |    6 +-
 tests/cond19.test          |    6 +-
 tests/cond20.test          |    6 +-
 tests/cond21.test          |    6 +-
 tests/gcj4.test            |    8 ++-
 tests/gnits2.test          |   11 ++-
 tests/gnits3.test          |   15 +++--
 tests/instdat2.test        |    5 +-
 tests/instdir-texi.test    |    7 +-
 tests/maken3.test          |    3 +-
 tests/maken4.test          |    3 +-
 tests/nodist2.test         |    8 ++-
 tests/nodist3.test         |    4 +-
 tests/output.test          |    6 +-
 tests/parallel-tests3.test |    6 +-
 tests/remake1a.test        |    6 +-
 tests/yacc-clean.test      |  160 ++++++++++++++++++++++++++++++++++++++++++++
 30 files changed, 351 insertions(+), 77 deletions(-)
 create mode 100755 tests/yacc-clean.test

diff --git a/ChangeLog b/ChangeLog
index 472dc55..79bdc3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,69 @@
+2011-01-07   Stefano Lattarini  <address@hidden>
+
+       yacc: "make clean" removes .c and .h files from non-distributed .y
+       Previously, while automake did *not* distribute C source and header
+       files derived from non-distributed Yacc sources, it still caused
+       them to be removed only by "make maintainer-clean" only, and not by
+       simply "make clean" or "make distclean".
+       This caused "make distcheck" to fail, unless the developer put
+       those generated .c and .h files in CLEANFILES or in DISTCLEANFILES
+       by hand.
+       This change fixes this issue, by making non-distributed `.c' and
+       `.h' files generated by non-distributed Yacc sources cleaned by
+       "make clean".
+       * tests/automake.in (lang_yacc_target_hook): Make C source and
+       header files derived from non-distributed Yacc files cleaned by
+       "make clean", not only by "make maintainer-clean".
+       * tests/yacc-clean.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+       * NEWS: Update.
+
+2011-01-02   Stefano Lattarini  <address@hidden>
+
+       * NEWS: Fix typo (forgotten word).
+
+2011-01-02   Stefano Lattarini  <address@hidden>
+            Ralf Wildenhues  <address@hidden>
+
+       docs: how to work around checks on invalid primary/directory couples
+       * doc/automake.texi (Uniform): Document the blessed idiom which can
+       be used to work around automake checks on invalid primary/directory
+       couples (such as `lib_PROGRAMS' or `doc_LIBRARIES').
+
+2010-01-03  Stefano Lattarini  <address@hidden>
+
+       Tests: normalize use of the 'errexit' shell flag.
+       * tests/maken3.test (check_targets): Remove redundant call to
+       'set -e'.
+       * tests/maken4.test: Likewise.
+       * tests/ansi5.test: Call 'set -e' just after './defs' has been
+       sourced.
+       * tests/ansi6.test: Likewise.
+       * tests/ansi7.test: Likewise.
+       * tests/cond16.test: Likewise.
+       * tests/cond17.test: Likewise.
+       * tests/cond18.test: Likewise.
+       * tests/cond19.test: Likewise.
+       * tests/cond20.test: Likewise.
+       * tests/cond21.test: Likewise.
+       * tests/instdat2.test: Likewise.
+       * tests/instdir-texi.test: Likewise.
+       * tests/parallel-tests3.test: Likewise.
+       * tests/remake1a.test: Likewise.
+       * tests/ccnoco.test: Likewise, and add trailing `:' command.
+       * tests/comment4.test: Likewise.
+       * tests/gcj4.test: Likewise.
+       * tests/nodist2.test: Likewise.
+       * tests/nodist3.test: Enable 'errexit' shell flag (this should
+       have been done in commit v1.11-248-g317e17b, but the relevant
+       hunk has been forgotten somehow).
+       * tests/output.test: Likewise.
+       * tests/gnits2.test: Likewise, and display captured stderr to
+       script's stderr, not to script's stdout.
+       * tests/gnits3.test: Likewise.  Also, prefer 'cat' over 'echo'
+       to append to Makefile.am, and really check that the exit status
+       of "make installcheck" indicates failure.
+
 2011-01-02  Ralf Wildenhues  <address@hidden>
 
        Sync auxiliary files from upstream.
diff --git a/NEWS b/NEWS
index a7c5914..e83fd2b 100644
--- a/NEWS
+++ b/NEWS
@@ -41,6 +41,9 @@ New in 1.11a:
     adds them to the normal list of dependencies, but without overwriting the
     foo_DEPENDENCIES variable, which is normally computed by automake.
 
+  - C source and header files derived from non-distributed Yacc sources are
+    now removed by "make clean", not only by "make maintainer-clean".
+
 Bugs fixed in 1.11a:
 
   - Lots of minor bugfixes.
@@ -95,7 +98,7 @@ Bugs fixed in 1.11a:
 
   - The code for automatic dependency tracking works around a Solaris
     make bug triggered by sources containing repeated slashes when the
-    `subdir-objects' was used.
+    `subdir-objects' option was used.
 
 New in 1.11:
 
diff --git a/automake.in b/automake.in
index 57edd04..7737ff0 100644
--- a/automake.in
+++ b/automake.in
@@ -6128,17 +6128,14 @@ sub lang_yacc_target_hook
        &push_dist_common ($header)
          if $transform{'DIST_SOURCE'};
 
-       # If the files are built in the build directory, then we want
-       # to remove them with `make clean'.  If they are in srcdir
-       # they shouldn't be touched.  However, we can't determine this
-       # statically, and the GNU rules say that yacc/lex output files
-       # should be removed by maintainer-clean.  So that's what we
-       # do.
-       $clean_files{$header} = MAINTAINER_CLEAN;
-    }
-    # Erase $OUTPUT on `make maintainer-clean' (by GNU standards).
+       # The GNU rules say that yacc/lex output files should be removed
+       # by maintainer-clean.  However, if the files are not distributed,
+       # then we want to remove them with "make clean"; otherwise,
+       # "make distcheck" will fail.
+       $clean_files{$header} = $transform{'DIST_SOURCE'} ? MAINTAINER_CLEAN : 
CLEAN;
+    }
     # See the comment above for $HEADER.
-    $clean_files{$output} = MAINTAINER_CLEAN;
+    $clean_files{$output} = $transform{'DIST_SOURCE'} ? MAINTAINER_CLEAN : 
CLEAN;
 }
 
 # This is a lex helper which is called whenever we have decided to
diff --git a/doc/automake.texi b/doc/automake.texi
index 541d448..0e374d2 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -1986,7 +1986,8 @@ variable names; thus one writes @samp{bin_PROGRAMS} and 
not
 @samp{bindir_PROGRAMS}.
 
 Not every sort of object can be installed in every directory.  Automake
-will flag those attempts it finds in error.
+will flag those attempts it finds in error (but see below how to override
+the check if you really need to).
 Automake will also diagnose obvious misspellings in directory names.
 
 @cindex Extending list of installation directories
@@ -2008,6 +2009,33 @@ xmldir = $(datadir)/xml
 xml_DATA = file.xml
 @end example
 
+This feature can also be used to override the sanity checks Automake
+performs to diagnose suspicious directory/primary couples (in the
+unlikely case these checks are undesirable, and you really know what
+you're doing).  For example, Automake would error out on this input:
+
address@hidden
+# Forbidden directory combinations, automake will error out on this.
+pkglib_PROGRAMS = foo
+doc_LIBRARIES = libquux.a
address@hidden example
+
address@hidden
+but it will succeed with this:
+
address@hidden
+# Work around forbidden directory combinations.  Do not use this
+# without a very good reason!
+my_execbindir = $(pkglibdir)
+my_doclibdir = $(docdir)
+my_execbin_PROGRAMS = foo
+my_doclib_LIBRARIES = libquux.a
address@hidden example
+
+The @samp{exec} substring of the @samp{my_execbindir} variable lets
+the files be installed at the right time (@pxref{The Two Parts of
+Install}).
+
 @cindex @samp{noinst_} primary prefix, definition
 @vindex noinst_
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ea0b64a..5ec73d0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -938,6 +938,7 @@ whoami.test \
 xsource.test \
 xz.test \
 yacc-basic.test \
+yacc-clean.test \
 yacc.test \
 yacc2.test \
 yacc3.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 9e78c97..2b73372 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1201,6 +1201,7 @@ whoami.test \
 xsource.test \
 xz.test \
 yacc-basic.test \
+yacc-clean.test \
 yacc.test \
 yacc2.test \
 yacc3.test \
diff --git a/tests/ansi5.test b/tests/ansi5.test
index 2652cb7..1e3b21c 100755
--- a/tests/ansi5.test
+++ b/tests/ansi5.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 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 @@
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT(one/joe.c)
 AM_INIT_AUTOMAKE(liver, 0.23)
@@ -63,8 +65,6 @@ main (int argc, char *argv[])
 }
 END
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
diff --git a/tests/ansi6.test b/tests/ansi6.test
index 10196ea..76f4d22 100755
--- a/tests/ansi6.test
+++ b/tests/ansi6.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006, 2008, 2011 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,6 +20,8 @@
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT(ansi6, 1.0)
 AM_INIT_AUTOMAKE
@@ -58,8 +60,6 @@ foo ()
 }
 END
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
diff --git a/tests/ansi7.test b/tests/ansi7.test
index e97f517..2524d33 100755
--- a/tests/ansi7.test
+++ b/tests/ansi7.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2008, 2011 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,6 +21,8 @@
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT(ansi6, 1.0)
 AM_INIT_AUTOMAKE
@@ -60,8 +62,6 @@ foo ()
 }
 END
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
diff --git a/tests/ccnoco.test b/tests/ccnoco.test
index d6ed136..d7c0360 100755
--- a/tests/ccnoco.test
+++ b/tests/ccnoco.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2008, 2011 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,6 +20,8 @@
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.1 << 'END'
 AC_INIT(a.c)
 AM_INIT_AUTOMAKE(nonesuch, 0.23)
@@ -68,9 +70,6 @@ END
 
 chmod +x Mycomp
 
-set -e
-
-
 # Ignore user CFLAGS.
 CFLAGS=
 export CFLAGS
@@ -95,3 +94,5 @@ for conf in configure.1 configure.3; do
 
    cd ..
 done
+
+:
diff --git a/tests/comment4.test b/tests/comment4.test
index f6e6a3f..6f3f8cc 100755
--- a/tests/comment4.test
+++ b/tests/comment4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2011 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 >> configure.in <<'EOF'
 AC_OUTPUT
 EOF
@@ -29,7 +31,6 @@ cat > Makefile.am << 'EOF'
 mumble = UnIqUe_MUMBLE_VALUE
 EOF
 
-set -e
 $ACLOCAL
 $AUTOMAKE
 # UnIqUe_COPYRIGHT_BOILERPLATE should appear near the top of the file
diff --git a/tests/cond16.test b/tests/cond16.test
index 467b718..24f18df 100755
--- a/tests/cond16.test
+++ b/tests/cond16.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 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,6 +20,8 @@
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT(hello.c)
 AM_INIT_AUTOMAKE(hello,0.23)
@@ -51,8 +53,6 @@ END
 CFLAGS=
 export CFLAGS
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
diff --git a/tests/cond17.test b/tests/cond17.test
index 7368d9a..962dec3 100755
--- a/tests/cond17.test
+++ b/tests/cond17.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 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,6 +20,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT(Makefile.am)
 AM_INIT_AUTOMAKE(hello,0.23)
@@ -38,7 +40,5 @@ helldl_SOURCES = foo.c
 endif
 END
 
-set -e
-
 $ACLOCAL
 $AUTOMAKE -a
diff --git a/tests/cond18.test b/tests/cond18.test
index 3119658..c4ebed2 100755
--- a/tests/cond18.test
+++ b/tests/cond18.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 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,6 +20,8 @@
 required='GNUmake gcc'
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT(Makefile.am)
 AM_INIT_AUTOMAKE(hello,0.23)
@@ -57,8 +59,6 @@ END
 CFLAGS=
 export CFLAGS
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
diff --git a/tests/cond19.test b/tests/cond19.test
index 14dfb51..93545e0 100755
--- a/tests/cond19.test
+++ b/tests/cond19.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 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,6 +20,8 @@
 required='GNUmake gcc'
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT(Makefile.am)
 AM_INIT_AUTOMAKE(hello,0.23)
@@ -59,8 +61,6 @@ END
 CFLAGS=
 export CFLAGS
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
diff --git a/tests/cond20.test b/tests/cond20.test
index d0557e5..8e16e9f 100755
--- a/tests/cond20.test
+++ b/tests/cond20.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 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
+
 cat > configure.in << 'END'
 AC_INIT(Makefile.am)
 AM_INIT_AUTOMAKE(hello,0.23)
@@ -42,8 +44,6 @@ helldl_SOURCES = $(var2)
 bin_PROGRAMS = helldl
 END
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 AUTOMAKE_fails -a
diff --git a/tests/cond21.test b/tests/cond21.test
index 160c76f..37b6b6f 100755
--- a/tests/cond21.test
+++ b/tests/cond21.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2005, 2011 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 >> configure.in << 'END'
 AC_PROG_CC
 AM_CONDITIONAL(COND1, true)
@@ -66,8 +68,6 @@ test:
        @echo FOO: $(FOO) :FOO
 END
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
diff --git a/tests/gcj4.test b/tests/gcj4.test
index f3828ea..b7e14ab 100755
--- a/tests/gcj4.test
+++ b/tests/gcj4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2011 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 @@
 required=gcj
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AM_PROG_GCJ
 AC_OUTPUT
@@ -29,8 +31,6 @@ bin_PROGRAMS = convert
 convert_SOURCES = convert.java
 END
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
@@ -47,3 +47,5 @@ test `wc -l < filt` = 1
 # Accept any outcome but `none'
 # (at the time of writing it should be gcc or gcc3).
 grep -v none filt
+
+:
diff --git a/tests/gnits2.test b/tests/gnits2.test
index 4c5d54f..bb6abaa 100755
--- a/tests/gnits2.test
+++ b/tests/gnits2.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2007, 2011 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 +20,8 @@
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_OUTPUT
@@ -90,8 +93,6 @@ chmod +x sub/scriptnok.sh
 # (alpha.test checks the case where it must be distributed.)
 : > README-alpha
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
@@ -106,5 +107,7 @@ cd build
 $MAKE all
 $MAKE test-install
 $MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
-cat stderr
+cat stderr >&2
 $MAKE grep-stderr
+
+:
diff --git a/tests/gnits3.test b/tests/gnits3.test
index 7a08fb8..3224652 100755
--- a/tests/gnits3.test
+++ b/tests/gnits3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2011 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 @@
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_OUTPUT
@@ -70,8 +72,6 @@ chmod +x sub/nok.sh
 : > ChangeLog
 : > THANKS
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
@@ -83,14 +83,19 @@ cd build
 ../configure "--prefix=`pwd`/../inst-dir" --program-prefix=p
 $MAKE
 $MAKE install
+$MAKE installcheck && Exit 1
 $MAKE -k installcheck 2>stderr || : # Never trust the exit status of make -k.
-cat stderr
+cat stderr >&2
 $MAKE grep-stderr
 
 # Make sure there is no more error when all targets are exempted.
 cd ..
-echo 'AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += sub/nok$(EXEEXT) sub/nok.sh' >> 
Makefile.am
+cat >> Makefile.am <<'END'
+AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += sub/nok$(EXEEXT) sub/nok.sh
+END
 $AUTOMAKE
 cd build
 ./config.status  # Don't rely on the rebuild rules (they need GNU make).
 $MAKE installcheck
+
+:
diff --git a/tests/instdat2.test b/tests/instdat2.test
index 966f0cf..c637397 100755
--- a/tests/instdat2.test
+++ b/tests/instdat2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2011 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
+
 cat >Makefile.am << 'EOF'
 # User directories.
 inclexecdir = $(exec_prefix)/include
@@ -62,7 +64,6 @@ pkgdata_SCRIPTS = script
 ##pkginclude_SCRIPTS = script
 EOF
 
-set -e
 $ACLOCAL || Exit 1
 $AUTOMAKE
 
diff --git a/tests/instdir-texi.test b/tests/instdir-texi.test
index 50617c8..b3e3c84 100755
--- a/tests/instdir-texi.test
+++ b/tests/instdir-texi.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 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,12 +20,12 @@
 required='makeinfo-html tex texi2dvi'
 . ./defs || Exit 1
 
+set -e
+
 (dvips --help 2>/dev/null >/dev/null) || Exit 77
 (pdfetex --help 2>/dev/null >/dev/null) ||
   (pdftex --help 2>/dev/null >/dev/null) || Exit 77
 
-set -e
-
 cat >>configure.in <<'END'
 AC_OUTPUT
 END
@@ -67,4 +67,5 @@ $MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
 cat stdout
 grep 'rm -f' stdout && Exit 1
 $MAKE -e uninstall DESTDIR="$destdir"
+
 :
diff --git a/tests/maken3.test b/tests/maken3.test
index b839d0d..a3768bd 100755
--- a/tests/maken3.test
+++ b/tests/maken3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 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
@@ -122,7 +122,6 @@ $AUTOCONF
 
 check_targets ()
 {
-  set -e
   for target in \
     all install install-strip uninstall clean distclean check \
     info html dvi pdf ps \
diff --git a/tests/maken4.test b/tests/maken4.test
index ae5ce27..09aba67 100755
--- a/tests/maken4.test
+++ b/tests/maken4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 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
@@ -124,7 +124,6 @@ $AUTOCONF
 
 check_targets ()
 {
-  set -e
   for target in \
     all install install-strip uninstall clean distclean check \
     info html dvi pdf ps \
diff --git a/tests/nodist2.test b/tests/nodist2.test
index 3d9e6ce..4c875b1 100755
--- a/tests/nodist2.test
+++ b/tests/nodist2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2007, 2011 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
+
 cat >> configure.in <<'EOF'
 AC_OUTPUT
 EOF
@@ -29,10 +31,10 @@ EOF
 
 : > baz.h
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 ./configure --prefix "`pwd`/install"
 $MAKE install-data
+
+:
diff --git a/tests/nodist3.test b/tests/nodist3.test
index c5470e7..ec21eaf 100755
--- a/tests/nodist3.test
+++ b/tests/nodist3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2010, 2011 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 >> configure.in << 'END'
 AC_PROG_CC
 END
diff --git a/tests/output.test b/tests/output.test
index 3931fc5..ad29300 100755
--- a/tests/output.test
+++ b/tests/output.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010, 2011 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
+
 cat > configure.in <<END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
diff --git a/tests/parallel-tests3.test b/tests/parallel-tests3.test
index a138f90..210be57 100755
--- a/tests/parallel-tests3.test
+++ b/tests/parallel-tests3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009, 2010  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011 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,13 @@ parallel_tests=yes
 required=GNUmake
 . ./defs || Exit 1
 
+set -e
+
 # This test does not work well if $MAKE contains -j.
 case $MAKE in
 *\ -j*) Exit 77 ;;
 esac
 
-set -e
-
 cat >> configure.in << 'END'
 AC_OUTPUT
 END
diff --git a/tests/remake1a.test b/tests/remake1a.test
index ce80c19..ec8c641 100755
--- a/tests/remake1a.test
+++ b/tests/remake1a.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 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,10 +19,10 @@
 
 . ./defs || Exit 1
 
-fingerprint='=/FiNgErPrInT/='
-
 set -e
 
+fingerprint='=/FiNgErPrInT/='
+
 cat > configure.in <<END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
diff --git a/tests/yacc-clean.test b/tests/yacc-clean.test
new file mode 100755
index 0000000..a8df065
--- /dev/null
+++ b/tests/yacc-clean.test
@@ -0,0 +1,160 @@
+#! /bin/sh
+# Copyright (C) 2011 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that .c and .h files derived from non-distributed .y sources
+# are cleaned by "make clean", while .c and .h files derived from
+# distributed .y sources are cleaned by "make maintainer-clean".
+
+required=bison
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+# Use two subdirectories, one to test with `-d' in YFLAGS, the
+# other one to test with empty YFLAGS.
+SUBDIRS = sub1 sub2
+END
+
+mkdir sub1 sub2
+
+cat > sub1/Makefile.am << 'END'
+bin_PROGRAMS = foo bar baz qux
+
+foo_SOURCES = main.c parse.y
+
+bar_SOURCES = main.c parse.y
+bar_YFLAGS = $(AM_YFLAGS)
+
+baz_SOURCES = main.c
+nodist_baz_SOURCES = baz.y
+
+qux_SOURCES = main.c
+nodist_qux_SOURCES = baz.y
+qux_YFLAGS = $(AM_YFLAGS)
+
+baz.y:
+       cp $(srcdir)/parse.y $@
+
+CLEANFILES = baz.y
+END
+
+cat > sub2/Makefile.am << 'END'
+include $(top_srcdir)/sub1/Makefile.am
+AM_YFLAGS = -d
+## FIXME: these apparently redundant definitions are required to
+## work around automake bug#7800.
+bar_YFLAGS += -d
+qux_YFLAGS += -d
+END
+
+cat > sub1/parse.y << 'END'
+%{
+int yylex () { return (getchar ()); }
+void yyerror (char *s) {}
+%}
+%%
+x : 'x' { };
+END
+cp sub1/parse.y sub2/parse.y
+
+cat > sub1/main.c << 'END'
+int main ()
+{
+  return yyparse ();
+}
+END
+cp sub1/main.c sub2/main.c
+
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+cp config.status config.sav
+
+$MAKE
+ls -l . sub1 sub2
+# Sanity checks.
+test -f sub1/parse.y
+test -f sub1/parse.c
+test -f sub1/bar-parse.c
+test -f sub1/baz.y
+test -f sub1/baz.c
+test -f sub1/qux-baz.c
+test -f sub2/parse.y
+test -f sub2/parse.c
+test -f sub2/parse.h
+test -f sub2/bar-parse.c
+test -f sub2/bar-parse.h
+test -f sub2/baz.y
+test -f sub2/baz.c
+test -f sub2/baz.h
+test -f sub2/qux-baz.c
+test -f sub2/qux-baz.h
+
+for target in clean distclean; do
+  $MAKE $target
+  ls -l . sub1 sub2
+  test -f sub1/parse.y
+  test -f sub1/parse.c
+  test -f sub1/bar-parse.c
+  test ! -r sub1/baz.y
+  test ! -r sub1/baz.c
+  test ! -r sub1/qux-baz.c
+  test -f sub2/parse.y
+  test -f sub2/parse.c
+  test -f sub2/parse.h
+  test -f sub2/bar-parse.c
+  test -f sub2/bar-parse.h
+  test ! -r sub2/baz.y
+  test ! -r sub2/baz.c
+  test ! -r sub2/baz.h
+  test ! -r sub2/qux-baz.c
+  test ! -r sub2/qux-baz.h
+done
+
+cp config.sav config.status
+./config.status # re-create Makefile
+
+$MAKE maintainer-clean
+ls -l . sub1 sub2
+test -f sub1/parse.y
+test ! -r sub1/parse.c
+test ! -r sub1/bar-parse.c
+test -f sub2/parse.y
+test ! -r sub2/parse.c
+test ! -r sub2/parse.h
+test ! -r sub2/bar-parse.c
+test ! -r sub2/bar-parse.h
+
+cp config.sav config.status
+./config.status # re-create Makefile
+
+# The distribution must work correctly, assuming the user has
+# the proper tools to process yacc files.
+$MAKE distcheck
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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