summaryrefslogtreecommitdiff
path: root/lib/am/distdir.am
diff options
context:
space:
mode:
Diffstat (limited to 'lib/am/distdir.am')
-rw-r--r--lib/am/distdir.am12
1 files changed, 8 insertions, 4 deletions
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 \