summaryrefslogtreecommitdiff
path: root/lib/am
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2014-12-23 21:15:18 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2014-12-23 21:15:18 +0100
commitbd838a68d44a3adce9ae4b2c5e3e17b47eead7c1 (patch)
tree9d2bd302f9a79d42e45cd06e21787a94e6f97c75 /lib/am
parent88ac92b2d5beaf4aee7d7bb4f3dc9a86da823550 (diff)
parent6979c8e680b68dbc2b27b4db808cb037ba6aabb7 (diff)
downloadautomake-bd838a68d44a3adce9ae4b2c5e3e17b47eead7c1.tar.gz
Merge branch 'micro' into minor
* micro: 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
Diffstat (limited to 'lib/am')
-rw-r--r--lib/am/configure.am6
-rw-r--r--lib/am/distdir.am12
2 files changed, 13 insertions, 5 deletions
diff --git a/lib/am/configure.am b/lib/am/configure.am
index 8f037fd1b..34ebd17ad 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -83,7 +83,11 @@ endif %?TOPDIR_P%
esac;
## Avoid the "deleted header file" problem for the dependencies.
-?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS%:
+## Add the trailing "$(am__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__empty):
DIST_COMMON += %MAKEFILE-AM%
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 3441a7c98..e4b1d5ca3 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -431,7 +431,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",
@@ -452,8 +452,12 @@ distcheck: dist
## Parallel BSD make may not start a new shell for each command in a recipe,
## so be sure to 'cd' back to the original directory after this.
&& am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure \
+## 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.
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
?GETTEXT? --with-included-gettext \
## Additional flags for configure.
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
@@ -462,7 +466,7 @@ distcheck: dist
## 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) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \