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.3-15-gbd7ff42
Date: Tue, 14 Feb 2012 12:37:33 +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=bd7ff422f866a08064eb9a01a106ab1fa6425bf5

The branch, branch-1.11 has been updated
       via  bd7ff422f866a08064eb9a01a106ab1fa6425bf5 (commit)
       via  06684c510ab3115093178cdcfb28c2fff41b324c (commit)
       via  f874f9eeb7d996a7fc56c11342e9a094a87a402a (commit)
       via  3974270e2819447efdd3f4749c8f0f910bc9388c (commit)
       via  f5f838a2eba1bb26a755762665095ae76fe59a9e (commit)
       via  947ce0ed641ca226c632a3c05adfc068b802c518 (commit)
       via  ea4f1a91ac1c11a91a21169125b7ed931a4ab7fe (commit)
       via  da0964eb751461516bda1a38b8423cb412b601d6 (commit)
       via  d51da57f66d5ad66d1edfe3898baa0bef625f4e1 (commit)
       via  85cadc4e7738b84cc107b2f7a2adad5a2fa29005 (commit)
      from  c0d107daf4e51056ceb6fd2df4da9f90cdbedb46 (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 bd7ff422f866a08064eb9a01a106ab1fa6425bf5
Merge: c0d107d 06684c5
Author: Stefano Lattarini <address@hidden>
Date:   Tue Feb 14 13:37:05 2012 +0100

    Merge branch 'maint' into branch-1.11
    
    * maint:
      gitattributes: custom merge driver for ChangeLog not needed anymore
      gitattributes: use "union" merge driver for NEWS
      tests: fix a timestamp-related spurious failures
      dryrun: fix regression with '$(am__make_dryrun)'
      test defs: function 'is_newest' now works also with directories
      refactor: new variable telling whether make is running in "dry mode"
      tests: do not clobber the modified CC
      tests: put AM_PROG_CC_C_O before AC_OUTPUT to help losing compilers

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

Summary of changes:
 .gitattributes         |    2 +-
 THANKS                 |    2 +
 lib/am/check.am        |    6 +---
 lib/am/distdir.am      |   14 +++-------
 lib/am/header-vars.am  |   18 +++++++++++++
 lib/am/lisp.am         |    7 +----
 tests/aclocal5.test    |    2 +
 tests/check8.test      |    2 +-
 tests/defs.in          |    2 +-
 tests/depcomp8a.test   |    4 ++-
 tests/depcomp8b.test   |    4 ++-
 tests/list-of-tests.mk |    1 +
 tests/make-dryrun.test |   67 ++++++++++++++++++++++++++++++++++++++++++++++++
 13 files changed, 106 insertions(+), 25 deletions(-)
 create mode 100755 tests/make-dryrun.test

diff --git a/.gitattributes b/.gitattributes
index b6c3614..5126add 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,2 @@
-ChangeLog merge=merge-changelog
+NEWS merge=union
 *.texi* diff=texinfo
diff --git a/THANKS b/THANKS
index fbb7eb4..b512b6b 100644
--- a/THANKS
+++ b/THANKS
@@ -3,6 +3,7 @@ It would not be what it is today without the invaluable help of 
these
 people:
 
 Adam J. Richter                address@hidden
+Adam Sampson           address@hidden
 Adrian Bunk            address@hidden
 Akim Demaille          address@hidden
 Alan Modra             address@hidden
@@ -193,6 +194,7 @@ Klaus Reichl                address@hidden
 Krzysztof Żelechowski address@hidden
 L. Peter Deutsch       address@hidden
 Ladislav Strojil       address@hidden
+Larry Daniel           address@hidden
 Larry Jones            address@hidden
 Lars Hecking           address@hidden
 Lars J. Aas            address@hidden
diff --git a/lib/am/check.am b/lib/am/check.am
index e0a453b..7e2e771 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -272,11 +272,9 @@ check-TESTS recheck:
        done; \
 ## Under "make recheck", remove the logs of the files to recheck, so that
 ## those will be rerun by the "make test-suite.log" recursive invocation
-## below.  But use a proper hack to avoid extra files removal when running
-## under "make -n".
+## below.  But avoid extra files removal when running under "make -n".
        if test $@ = recheck && test -n "$$list"; then \
-         echo "am--clean: ; rm -f $$list" \
-           | $(MAKE) $(AM_MAKEFLAGS) -f - am--clean || exit 1; \
+         $(am__make_dryrun) || rm -f $$list || exit 1; \
        fi; \
        $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
 
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index cd2e4bf..da9028b 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -236,19 +236,13 @@ endif %?TOPDIR_P%
 ## at the top level do the right thing.  If we're in the topmost
 ## directory, then we use `distdir' instead of `top_distdir'; this lets
 ## us work correctly with an enclosing package.
-##
-## Split the loop for the directory creation and the one for recursion,
-## so that with GNU make -n, only the latter is executed.
 if %?SUBDIRS%
        @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
-           test -d "$(distdir)/$$subdir" \
-           || $(MKDIR_P) "$(distdir)/$$subdir" \
-           || exit 1; \
-         fi; \
-       done
-       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-         if test "$$subdir" = .; then :; else \
+           $(am__make_dryrun) \
+             || test -d "$(distdir)/$$subdir" \
+             || $(MKDIR_P) "$(distdir)/$$subdir" \
+             || exit 1; \
            dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
            $(am__relativize); \
            new_distdir=$$reldir; \
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index d1cd76e..1078a3d 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -27,6 +27,24 @@ VPATH = @srcdir@
 ## a vendor make.
 ## DESTDIR =
 
+## Shell code that determines whether make is running in "dry mode"
+## ("make -n") or not.  Useful in rules that invoke make recursively,
+## and are thus executed also with "make -n" -- either because they
+## are declared as dependencies to '.MAKE' (NetBSD make), or because
+## their recipes contain the "$(MAKE)" string (GNU and Solari make).
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    for am__flg in : $(MAKEFLAGS); do \
+      case $$am__flg in \
+        :) ;; \
+        *=*|--*) ;; \
+        *n*) am__dry=yes; break;; \
+      esac; \
+    done; \
+    test $$am__dry = yes; \
+  }
+
 ## Some derived variables that have been found to be useful.
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 6ffcdbf..0194c1b 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -52,12 +52,7 @@ $(am__ELCFILES): elc-stamp
 ##
 ## If `make -n' is called, do not execute any command in the recipe that
 ## changes the tree; however, invoke the recursive make for debuggability.
-       @dry=; for f in x $$MAKEFLAGS; do \
-         case $$f in \
-           *=*|--*);; \
-           *n*) dry=:;; \
-         esac; \
-       done; \
+       @if $(am__make_dryrun); then dry=:; else dry=; fi; \
        if test "$(EMACS)" != no && test ! -f $@; then \
 ## If `make -j' is used and more than one file has been erased, several
 ## processes can execute this block.  We have to make sure that only
diff --git a/tests/aclocal5.test b/tests/aclocal5.test
index b206587..ec032e4 100755
--- a/tests/aclocal5.test
+++ b/tests/aclocal5.test
@@ -51,6 +51,7 @@ $MAKE
 # updated, even from a sub-directory.  Check that AU_ALIAS is
 # recognized. Change the definition of AM_TEST to check that its new
 # definition is used.
+$sleep # Modified configure dependencies must be newer than config.status.
 echo 'AU_ALIAS([AM_TEST], [AC_SUBST])' > m4/moredefs.m4
 cd sub
 $MAKE
@@ -64,6 +65,7 @@ test -f $me-1.0/m4/moredefs.m4
 
 # Change the definition of AM_TEST to check that its new definition is
 # used.  Check that AC_DEFUN_ONCE is caught.
+$sleep # Modified configure dependencies must be newer than config.status.
 echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
 $MAKE
 grep 'm4/moredefs\.m4' aclocal.m4
diff --git a/tests/check8.test b/tests/check8.test
index a9e5730..cbf1052 100755
--- a/tests/check8.test
+++ b/tests/check8.test
@@ -65,7 +65,7 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-AM_COLOR_TESTS=always $MAKE -e check >stdout 2>stderr &&
+AM_COLOR_TESTS=always $MAKE check >stdout 2>stderr &&
   { cat stdout; cat stderr >&2; Exit 1; }
 cat stdout
 cat stderr >&2
diff --git a/tests/defs.in b/tests/defs.in
index 7cedaa0..6c7a168 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -509,7 +509,7 @@ old_timestamp=198309271735.59
 # Resolve ties in favor of FILE.
 is_newest ()
 {
-  is_newest_files=`find "$@" -newer "$1"`
+  is_newest_files=`find "$@" -prune -newer "$1"`
   test -z "$is_newest_files"
 }
 
diff --git a/tests/depcomp8a.test b/tests/depcomp8a.test
index ea14c3f..b94cf1d 100755
--- a/tests/depcomp8a.test
+++ b/tests/depcomp8a.test
@@ -25,6 +25,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+#x AM_PROG_CC_C_O
 AC_OUTPUT
 END
 
@@ -61,7 +62,8 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' 
$MAKE distcheck
 
 # Try again with subdir-objects option.
 
-echo AM_PROG_CC_C_O >> configure.in
+sed 's/#x //' configure.in >configure.int
+mv -f configure.int configure.in
 echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
 
 $ACLOCAL
diff --git a/tests/depcomp8b.test b/tests/depcomp8b.test
index 5651479..1a185e7 100755
--- a/tests/depcomp8b.test
+++ b/tests/depcomp8b.test
@@ -27,6 +27,7 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_AR
+#x AM_PROG_CC_C_O
 AC_PROG_LIBTOOL
 AC_OUTPUT
 END
@@ -57,7 +58,8 @@ DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' 
$MAKE distcheck
 
 # Try again with subdir-objects option.
 
-echo AM_PROG_CC_C_O >> configure.in
+sed 's/#x //' configure.in >configure.int
+mv -f configure.int configure.in
 echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
 
 $ACLOCAL
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 88946eb..6e8f23b 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -567,6 +567,7 @@ makej.test \
 makej2.test \
 maken.test \
 maken3.test \
+make-dryrun.test \
 makevars.test \
 man.test \
 man2.test \
diff --git a/tests/make-dryrun.test b/tests/make-dryrun.test
new file mode 100755
index 0000000..072d02f
--- /dev/null
+++ b/tests/make-dryrun.test
@@ -0,0 +1,67 @@
+#! /bin/sh
+# Copyright (C) 2012 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 $(am__make_dryrun) works as expected.
+
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<'END'
+all:
+       : Dummy, nothing to do.
+foo:
+       $(MAKE) all
+notdry:
+       @echo ":: $$MAKEFLAGS ::"; : For debugging.
+       $(am__make_dryrun) && exit 1; exit 0
+dry:
+       address@hidden ":: $$MAKEFLAGS ::"; : For debugging.
+       +$(am__make_dryrun) || exit 1; echo ok > from-dry-mode
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$MAKE notdry
+
+# Test against a known regressions.  This was especially
+# heinous, since make running in normal mode was sometimes
+# mistaken for make running in dry mode.
+$MAKE notdry TESTS="n1.test n2.test"
+$MAKE notdry TESTS="n1 n2" AM_MAKEFLAGS="TESTS='n1 n2'"
+$MAKE notdry TESTS="n1 n2" AM_MAKEFLAGS='TESTS="n1 n2"'
+$MAKE notdry FOOFLAGS="-n -n -knf2 \\n --none -n"
+$MAKE notdry BARFLAGS="-n \"n\" '-n' --none -n"
+
+if echo 'all: ; @+printf %sbb%s aa cc' | $MAKE -n -f - | grep aabbcc; then
+  $MAKE -n dry
+  test -f from-dry-mode
+  rm -f from-dry-mode
+fi
+
+if using_gmake; then
+  $MAKE --dry-run -k dry
+  test -f from-dry-mode
+fi
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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