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.15-165-


From: Jim Meyering
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.15-165-g5fac9a3
Date: Thu, 2 Jun 2016 04:19:56 +0000 (UTC)

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=5fac9a39d45e761f2b27262c4fd13ccb3ff8dc9b

The branch, master has been updated
       via  5fac9a39d45e761f2b27262c4fd13ccb3ff8dc9b (commit)
      from  455bad28ec7120640750ecfca12ddacce27d5fe8 (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 5fac9a39d45e761f2b27262c4fd13ccb3ff8dc9b
Author: Jim Meyering <address@hidden>
Date:   Mon May 30 17:07:52 2016 -0700

    compile: remove .Tpo file upon failure
    
    When generating a .deps/base.Po file, our emitted rule first writes
    to a temporary .Tpo file, so the final creation can be atomic, via
    mv's rename.  However, when generation of the .Tpo fails, it stop the
    process and does not remove that temporary file.  And nothing else
    ever deletes it, either.  Hence, in the unusual case in which one
    expects a compilation to fail during a successful build (gnulib's
    test-verify.sh does precisely this), a .deps/test-verify.Tpo file
    would be left behind, and that would in turn cause a "make distcheck"
    failure because that file would exist in one build+distclean hierarchy
    but not in the distribution tarball.
    * lib/am/depend2.am: Ensure that the temporary file is removed
    upon failure.
    * t/distcheck-Tpo.sh: New file.
    * t/list-of-tests.mk (handwritten_TESTS): Add it.
    This addresses bug#23661.

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

Summary of changes:
 lib/am/depend2.am                        |   10 +++--
 t/{target-cflags.sh => distcheck-Tpo.sh} |   65 +++++++++++-------------------
 t/list-of-tests.mk                       |    1 +
 3 files changed, 31 insertions(+), 45 deletions(-)
 copy t/{target-cflags.sh => distcheck-Tpo.sh} (54%)

diff --git a/lib/am/depend2.am b/lib/am/depend2.am
index 87f62a8..d1478b9 100644
--- a/lib/am/depend2.am
+++ b/lib/am/depend2.am
@@ -42,8 +42,9 @@ if %?NONLIBTOOL%
 ?!GENERIC?%OBJ%: %SOURCE%
 if %FASTDEP%
        %VERBOSE%$(am__set_depbase) && \
-       %COMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% 
%XSOURCE% && \
-       $(am__mv) $$depbase.Tpo $$depbase.Po
+       %COMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% 
%XSOURCE%; \
+       if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
+         else rm -f $$depbase.Tpo; false; fi
 else !%FASTDEP%
 if %AMDEP%
        %VERBOSE%source='%SOURCE%' object='$@' libtool=no @AMDEPBACKSLASH@
@@ -56,8 +57,9 @@ endif !%FASTDEP%
 ?!GENERIC?%OBJOBJ%: %SOURCE%
 if %FASTDEP%
        %VERBOSE%$(am__set_depbase) && \
-       %COMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% 
$$($(CYGPATH_W) %XSOURCE%) && \
-       $(am__mv) $$depbase.Tpo $$depbase.Po
+       %COMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% 
$$($(CYGPATH_W) %XSOURCE%); \
+       if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
+         else rm -f $$depbase.Tpo; false; fi
 else !%FASTDEP%
 if %AMDEP%
        %VERBOSE%source='%SOURCE%' object='$@' libtool=no @AMDEPBACKSLASH@
diff --git a/t/target-cflags.sh b/t/distcheck-Tpo.sh
similarity index 54%
copy from t/target-cflags.sh
copy to t/distcheck-Tpo.sh
index 049e71d..9d7900c 100644
--- a/t/target-cflags.sh
+++ b/t/distcheck-Tpo.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000-2015 Free Software Foundation, Inc.
+# Copyright (C) 2016 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
@@ -14,62 +14,45 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to make sure target specific CFLAGS work
-# Assar Westerlund <address@hidden>
+# Ensure that the 'make distcheck'-run distcleancheck does not fail
+# due to a leftover .deps/base.Tpo file when part of a successful build
+# involves a failed attempt to create a .deps/base.Po file.
 
-required=cc
 . test-init.sh
 
-cat >> configure.ac << 'END'
+cat >> configure.ac <<END
 AC_PROG_CC
 AC_OUTPUT
 END
 
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = no-dependencies
-
-bin_PROGRAMS = foo bar
-foo_CFLAGS   = -DFOO
+cat > foo.c <<\END
+#ifndef FAIL
+int main() { return 0; }
+#else
+int x[no_such];
+#endif
 END
 
-cat > foo.c << 'END'
-#include <stdio.h>
-#ifdef FOO
-int main(void)
-{
-  return 0;
-}
-#endif
+cat > Makefile.am <<\END
+TESTS = foo bar.test
+check_PROGRAMS = foo
+EXTRA_DIST= bar.test foo.c
 END
 
-cat > bar.c << 'END'
-#ifndef FOO
-int main(void)
-{
-  return 0;
-}
-#endif
+cat > bar.test <<END
+#!/bin/sh
+rm -f foo.o
+$MAKE AM_CFLAGS=-DFAIL foo.o && exit 1
+exit 0
 END
+chmod a+x bar.test
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
-mkdir build
-
-cd build
-../configure
-$MAKE
-if ! cross_compiling; then
-  ./foo
-  ./bar
-fi
-cd ..
-
 ./configure
-$MAKE
-if ! cross_compiling; then
-  ./foo
-  ./bar
-fi
+
+# We can build the distribution.
+run_make -M distcheck
 
 :
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index f1c47bb..060b3ed 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -433,6 +433,7 @@ t/distcheck-override-infodir.sh \
 t/distcheck-pr9579.sh \
 t/distcheck-pr10470.sh \
 t/distcheck-pr18286.sh \
+t/distcheck-Tpo.sh \
 t/dmalloc.sh \
 t/doc-parsing-buglets-colneq-subst.sh \
 t/doc-parsing-buglets-tabs.sh \


hooks/post-receive
-- 
GNU Automake



reply via email to

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