[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.14.1
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.14.1-1002-ga34409f |
Date: |
Wed, 24 Dec 2014 00:29:45 +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=a34409f0ab805c7f83cecc2f520bada748a07584
The branch, ng/master has been updated
via a34409f0ab805c7f83cecc2f520bada748a07584 (commit)
via 5fe2bfee7631572b39f59307d7076dbaa9b6fc5e (commit)
via c24233d4194639cf2f87ceee162b0f0525ecdbd3 (commit)
via bd838a68d44a3adce9ae4b2c5e3e17b47eead7c1 (commit)
via 6979c8e680b68dbc2b27b4db808cb037ba6aabb7 (commit)
via 01a7a4a7bea81b4e2d03d08b45d605b98501e024 (commit)
via 2629aa9e713c584c799677987ffb03156b8aae8e (commit)
via a38fe86d4f425575e9753b34d65d73c98838b085 (commit)
via 55270ac3222bb00e60505ec7c2d63f0047152bfa (commit)
via b2f771441af6d3fc26c4e4ab8273573f55d6723c (commit)
from 108a98575462e54dffa0083a773a46c57a23a113 (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 a34409f0ab805c7f83cecc2f520bada748a07584
Author: Stefano Lattarini <address@hidden>
Date: Wed Dec 24 01:13:04 2014 +0100
[ng] cleanup: after the merge master -> ng/master done recently
* t/distcheck-pr18286.sh: Slightly simplify and tighten by assuming
that $MAKE is GNU make.
* lib/am/configure.am: Use $(am.chars.empty) rather than $(am__empty)
for the internal variable always expansing to the empty string.
Signed-off-by: Stefano Lattarini <address@hidden>
commit 5fe2bfee7631572b39f59307d7076dbaa9b6fc5e
Merge: 108a985 c24233d
Author: Stefano Lattarini <address@hidden>
Date: Wed Dec 24 00:59:09 2014 +0100
Merge branch 'master' into ng/master
* master:
dist: fix bug#18286 "distcheck fails to detect missing files"
tests: expose automake bug#18286 "distcheck fails to detect missing files"
include: fix bug in handling of user-defined makefile fragments generation
tests: expose bug in handling of user-defined makefile fragments
generation
+ Extra non-trivial changes:
* lib/am/distcheck.mk: Backport the changes done to lib/am/distdir.am
in commit v1.14.1-4-g01a7a4a (fix for automake bug#18286 "distcheck
fails to detect missing files").
Signed-off-by: Stefano Lattarini <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
NEWS | 23 +++++++
THANKS | 1 +
lib/am/configure.am | 6 ++-
lib/am/distcheck.mk | 15 +++--
...h => am-include-only-one-generated-fragment.sh} | 39 ++++-------
t/dejagnu-relative-srcdir.sh | 6 +-
t/distcheck-pr18286.sh | 69 ++++++++++++++++++++
t/subdir-ac-subst.sh | 14 ++--
t/subdir-am-cond.sh | 14 ++--
t/txinfo-builddir.sh | 2 +-
10 files changed, 140 insertions(+), 49 deletions(-)
copy t/{recurs-user-phony.sh => am-include-only-one-generated-fragment.sh}
(62%)
create mode 100644 t/distcheck-pr18286.sh
diff --git a/NEWS b/NEWS
index 52ffac2..3d8b363 100644
--- a/NEWS
+++ b/NEWS
@@ -178,6 +178,29 @@ New in 1.15:
Makefiles, in the face of the newly-introduced randomization for
hash keys order in Perl 5.18.
+ - In older Automake versions, if a user defined one single Makefile
+ fragment (say 'foo.am') to be included (via Automake includes) in
+ his main Makefile.am, and defined a custom make rule to generate that
+ file from other data, Automake used to spuriously complain about with
+ something like "... overrides Automake target '$(srcdir)/foo.am".
+ This bug is now fixed.
+
+ - Automake bug#18286: "make distcheck" could sometimes fail to detect
+ missing files in the distribution tarball, especially in those cases
+ where both the generated files and their dependencies are explicitly
+ in $(srcdir). An important example of this are *generated* makefile
+ fragments included at Automake time in Makefile.am; e.g.:
+
+ ...
+ $(srcdir)/fragment.am: $(srcdir)/data.txt $(srcdir)/preproc.sh
+ cd $(srcdir) && $(SHELL) preproc.sh <data.txt >fragment.am
+ include $(srcdir)/fragment.am
+ ...
+
+ If the use forgot to add data.txt and/or preproc.sh in the distribution
+ tarball, "make distcheck" would have erroneously succeeded! This issue
+ is now fixed.
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New in 1.14.1:
diff --git a/THANKS b/THANKS
index 3d8dd8f..b66f744 100644
--- a/THANKS
+++ b/THANKS
@@ -285,6 +285,7 @@ Nathanael Nerode address@hidden
Nelson H. F. Beebe address@hidden
Nicholas Wourms address@hidden
Nick Bowler address@hidden
+Nicola Fontana address@hidden
Nicolas Joly address@hidden
Nicolas Thiery address@hidden
NightStrike address@hidden
diff --git a/lib/am/configure.am b/lib/am/configure.am
index 2dae4d1..b528d9e 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -71,7 +71,11 @@ $(am.relpath.makefile): %MAKEFILE-DEPS%
$(top_builddir)/config.status
esac;
## Avoid the "deleted header file" problem for the dependencies.
-?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS%:
+## Add the trailing "$(am.chars.empty)" to trick Automake into not spuriously
+## complaining about "duplicated targets" in case the %MAKEFILE-IN-DEPS%
+## list expands to a single target that is also declared in some
+## user-defined rule.
+?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS% $(am.chars.empty):
am.dist.common-files += $(am.relpath.makefile.am)
diff --git a/lib/am/distcheck.mk b/lib/am/distcheck.mk
index 9dfb5ad..9d43471 100644
--- a/lib/am/distcheck.mk
+++ b/lib/am/distcheck.mk
@@ -137,7 +137,7 @@ distcheck: dist
## can make our new subdirs.
chmod -R a-w $(distdir)
chmod u+w $(distdir)
- mkdir $(distdir)/_build $(distdir)/_inst
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
## Undo the write access.
chmod a-w $(distdir)
## With GNU make, the following command will be executed even with "make -n",
@@ -155,17 +155,20 @@ distcheck: dist
## create very long directory names.
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
$(if $(am.dist.handle-distcheck-hook),&& $(MAKE) distcheck-hook) \
- && cd $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+## If we merely used '$(distdir)/_build' here, "make distcheck" could
+## sometimes fail to detect missing files in the distribution tarball,
+## especially in those cases where both the generated files and their
+## dependencies are explicitly in $(srcdir). See automake bug#18286.
+ && cd $(distdir)/_build/sub \
+ && ../../configure \
$(if $(am.dist.handle-gettext),--with-included-gettext) \
## Additional flags for configure.
- $(AM_DISTCHECK_CONFIGURE_FLAGS) \
- $(DISTCHECK_CONFIGURE_FLAGS) \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) $(DISTCHECK_CONFIGURE_FLAGS) \
## At the moment, the code doesn't actually support changes in these --srcdir
## and --prefix values, so don't allow them to be overridden by the user or
## the developer. That used to be allowed, and caused issues in practice
## (in corner-case usages); see automake bug#14991.
- --srcdir=.. --prefix="$$dc_install_base" \
+ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) \
&& $(MAKE) dvi \
&& $(MAKE) check \
diff --git a/t/recurs-user-phony.sh
b/t/am-include-only-one-generated-fragment.sh
similarity index 62%
copy from t/recurs-user-phony.sh
copy to t/am-include-only-one-generated-fragment.sh
index 68f13a1..57a8aec 100644
--- a/t/recurs-user-phony.sh
+++ b/t/am-include-only-one-generated-fragment.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+# Copyright (C) 2014 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,48 +14,35 @@
# 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 user-defined recursive targets and their associate
-# '-local', '-am' and '-recursive' targets are declared as phony.
+# Check that inclusion of only one '.am' that can be regenerated via
+# a user-defined Makefile rule does not incur in spurious automake
+# warnings about "target redefinition".
. test-init.sh
cat >> configure.ac <<'END'
AC_CONFIG_FILES([sub/Makefile])
-AM_EXTRA_RECURSIVE_TARGETS([foo])
AC_OUTPUT
END
cat > Makefile.am <<'END'
-SUBDIRS = sub
-foo-local:
- echo 'GOOD!' > foo
+include foobar.am
+$(srcdir)/foobar.am: $(srcdir)/touch.sh
+ $(SHELL) $(srcdir)/touch.sh $(srcdir)/foobar.am
+EXTRA_DIST = touch.sh
END
mkdir sub
cat > sub/Makefile.am <<'END'
-foo-local:
- echo 'GOOD!' > foo
+include $(top_srcdir)/quux.am
+$(top_srcdir)/quux.am: $(top_srcdir)/touch.sh
+ $(SHELL) $(top_srcdir)/touch.sh $@
END
-dummy_files='
- foo
- foo-local
- foo-am
- foo-recursive
- sub/foo
- sub/foo-local
- sub/foo-am
-'
+: > foobar.am
+: > quux.am
$ACLOCAL
-$AUTOCONF
$AUTOMAKE
-./configure
-
-touch $dummy_files
-
-$MAKE foo
-grep 'GOOD!' foo
-grep 'GOOD!' sub/foo
:
diff --git a/t/dejagnu-relative-srcdir.sh b/t/dejagnu-relative-srcdir.sh
index 79a37dd..34e6710 100644
--- a/t/dejagnu-relative-srcdir.sh
+++ b/t/dejagnu-relative-srcdir.sh
@@ -43,7 +43,7 @@ END
cat > env.test/env.exp << 'END'
set env_srcdir $env(srcdir)
send_user "env_srcdir: $env_srcdir\n"
-if { [ regexp "^\.\.?$" $env_srcdir ] } {
+if { [ regexp "^\.(\./\.\.)?$" $env_srcdir ] } {
pass "test_env_src"
} else {
fail "test_env_src"
@@ -52,13 +52,13 @@ END
cat > tcl.test/tcl.exp << 'END'
send_user "tcl_srcdir: $srcdir\n"
-if { [ regexp "^\.\.?$" $srcdir ] } {
+if { [ regexp "^\.(\./\.\.)?$" $srcdir ] } {
pass "test_tcl_src"
} else {
fail "test_tcl_src"
}
send_user "tcl_orig_srcdir: $orig_srcdir\n"
-if { [ regexp "^\.\.?$" $orig_srcdir ] } {
+if { [ regexp "^\.(\./\.\.)?$" $orig_srcdir ] } {
pass "test_tcl_orig_src"
} else {
fail "test_tcl_orig_src"
diff --git a/t/distcheck-pr18286.sh b/t/distcheck-pr18286.sh
new file mode 100644
index 0000000..fd3451d
--- /dev/null
+++ b/t/distcheck-pr18286.sh
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2014 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/>.
+
+# Ensure "make distcheck" detects all missing files, without getting
+# confused by the fact that they exists in the "original" source tree
+# from which "make distcheck" is run. See automake bug#18286.
+
+. test-init.sh
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am <<'END'
+$(srcdir)/test_data.am: $(srcdir)/test_data.txt $(srcdir)/gen-testdata.sh
+ cd $(srcdir) && $(SHELL) gen-testdata.sh <test_data.txt >test_data.am
+
+include $(srcdir)/test_data.am
+
+check-local:
+ is $(testdata) == foo bar
+END
+
+cat > test_data.txt <<'END'
+foo
+bar
+END
+
+
+cat > gen-testdata.sh <<'END'
+#!/bin/sh
+printf 'testdata = \\\n'
+sed 's/$/ \\/'
+echo '$(empty_string)'
+END
+chmod a+x gen-testdata.sh
+
+$sleep
+./gen-testdata.sh <test_data.txt >test_data.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE check
+
+# Oops, we failed to distribute some required files!
+run_make -e FAIL -E distcheck
+$FGREP '../../test_data.txt' stderr
+
+# But if we distribute them, everything will be OK.
+echo 'EXTRA_DIST = test_data.txt gen-testdata.sh' >> Makefile.am
+
+$MAKE distcheck
+
+:
diff --git a/t/subdir-ac-subst.sh b/t/subdir-ac-subst.sh
index aae3c84..b3ede8c 100644
--- a/t/subdir-ac-subst.sh
+++ b/t/subdir-ac-subst.sh
@@ -20,7 +20,7 @@
. test-init.sh
-cat >>configure.ac <<'END'
+cat >> configure.ac <<'END'
if test "$want_opt" = yes; then
MAYBE_OPT=opt
else
@@ -31,7 +31,7 @@ AC_CONFIG_FILES([src/Makefile opt/Makefile])
AC_OUTPUT
END
-cat >Makefile.am << 'END'
+cat > Makefile.am <<'END'
SUBDIRS = src $(MAYBE_OPT)
DIST_SUBDIRS = src opt
@@ -45,14 +45,16 @@ DIST_SUBDIRS = src opt
# We rely on 'distcheck' to run 'check-local' and use
# 'sanity1' and 'sanity2' as evidences that test-build was run.
+test_rootdir = $(top_builddir)/../../..
+
test-build: all
test -f src/result
if test -n "$(MAYBE_OPT)"; then \
test -f opt/result || exit 1; \
- : > $(top_builddir)/../../sanity2 || exit 1; \
+ : > $(test_rootdir)/sanity2 || exit 1; \
else \
test ! -f opt/result || exit 1; \
- : > $(top_builddir)/../../sanity1 || exit 1; \
+ : > $(test_rootdir)/sanity1 || exit 1; \
fi
test-dist: distdir
@@ -66,7 +68,7 @@ mkdir src opt
: > src/source
: > opt/source
-cat >src/Makefile.am << 'END'
+cat > src/Makefile.am <<'END'
EXTRA_DIST = source
all-local: result
CLEANFILES = result
@@ -76,7 +78,7 @@ result: source
END
# We want in opt/ the same Makefile as in src/. Let's exercise 'include'.
-cat >opt/Makefile.am << 'END'
+cat > opt/Makefile.am <<'END'
include ../src/Makefile.am
END
diff --git a/t/subdir-am-cond.sh b/t/subdir-am-cond.sh
index 73dba48..69345d1 100644
--- a/t/subdir-am-cond.sh
+++ b/t/subdir-am-cond.sh
@@ -20,13 +20,13 @@
. test-init.sh
-cat >>configure.ac <<'END'
+cat >> configure.ac <<'END'
AM_CONDITIONAL([COND_OPT], [test "$want_opt" = yes])
AC_CONFIG_FILES([src/Makefile opt/Makefile])
AC_OUTPUT
END
-cat >Makefile.am << 'END'
+cat > Makefile.am <<'END'
if COND_OPT
MAYBE_OPT = opt
endif
@@ -42,16 +42,18 @@ SUBDIRS = src $(MAYBE_OPT)
# We rely on 'distcheck' to run 'check-local' and use
# 'sanity1' and 'sanity2' as evidences that test-build was run.
+test_rootdir = $(top_builddir)/../../..
+
if COND_OPT
test-build: all
test -f src/result
test -f opt/result
- : > $(top_builddir)/../../sanity2
+ : > $(test_rootdir)/sanity2
else
test-build: all
test -f src/result
test ! -f opt/result
- : > $(top_builddir)/../../sanity1
+ : > $(test_rootdir)/sanity1
endif
test-dist: distdir
@@ -65,7 +67,7 @@ mkdir src opt
: > src/source
: > opt/source
-cat >src/Makefile.am << 'END'
+cat > src/Makefile.am <<'END'
EXTRA_DIST = source
all-local: result
CLEANFILES = result
@@ -75,7 +77,7 @@ result: source
END
# We want in opt/ the same Makefile as in src/. Let's exercise 'include'.
-cat >opt/Makefile.am << 'END'
+cat > opt/Makefile.am <<'END'
include ../src/Makefile.am
END
diff --git a/t/txinfo-builddir.sh b/t/txinfo-builddir.sh
index 5e3e912..6093edc 100644
--- a/t/txinfo-builddir.sh
+++ b/t/txinfo-builddir.sh
@@ -39,7 +39,7 @@ CLEANFILES = mu.info
# to think 'version.texi' has been created...
check-local:
test ! -e mu.info
- test -f ../mu.info
+ test -f $(srcdir)/mu.info
END
mkdir subdir
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.14.1-1002-ga34409f,
Stefano Lattarini <=