]> git.ipfire.org Git - thirdparty/automake.git/commit
compile: remove .Tpo file upon failure
authorJim Meyering <meyering@fb.com>
Tue, 31 May 2016 00:07:52 +0000 (17:07 -0700)
committerJim Meyering <meyering@fb.com>
Thu, 2 Jun 2016 04:13:05 +0000 (21:13 -0700)
commit5fac9a39d45e761f2b27262c4fd13ccb3ff8dc9b
treec6a0b9a422061e024a010ded2a9f036696f93210
parent455bad28ec7120640750ecfca12ddacce27d5fe8
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.
lib/am/depend2.am
t/distcheck-Tpo.sh [new file with mode: 0644]
t/list-of-tests.mk