diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/am/configure.am | 6 | ||||
-rw-r--r-- | lib/am/distcheck.mk | 15 |
2 files changed, 14 insertions, 7 deletions
diff --git a/lib/am/configure.am b/lib/am/configure.am index 2dae4d167..92f96162d 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__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): am.dist.common-files += $(am.relpath.makefile.am) diff --git a/lib/am/distcheck.mk b/lib/am/distcheck.mk index 9dfb5ad02..9d43471f5 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 \ |