summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2014-12-23 22:45:13 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2014-12-23 22:45:13 +0100
commitc24233d4194639cf2f87ceee162b0f0525ecdbd3 (patch)
tree82f1cdfa16363f9d521e3bc5b116ffd153ffdb41 /lib
parent033293c247160e1d7a6d834a785bd1adf16d34d5 (diff)
parentbd838a68d44a3adce9ae4b2c5e3e17b47eead7c1 (diff)
downloadautomake-c24233d4194639cf2f87ceee162b0f0525ecdbd3.tar.gz
Merge branch 'minor'
* minor: 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')
-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 e143483da..5b23affd2 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -407,7 +407,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",
@@ -428,8 +428,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) \
@@ -438,7 +442,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 \