From bcade0fd44698d63ef42dee21db86bbaf63c8247 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Fri, 10 Aug 2012 19:07:04 +0200 Subject: [PATCH] [ng] distcheck: include it as a verbatim makefile fragment * lib/am/distcheck.am: Rename ... * lib/am/distcheck.mk: ... like this, and adjust to use GNU make conditionals rather than Automake ones, and to allow for user overrides of the '$(distcleancheck_listfiles)' variable. Fix some comments while at it. * automake.in (handle_dist): Include it suing the 'verbatim' function. * Makefile.am (dist_am_DATA): Adjust. * t/distcheck-configure-flags-am.sh: Remove obsolete grepping checks, that would cause the test to fails spuriously. * t/distcheck-configure-flags.sh: Likewise. Signed-off-by: Stefano Lattarini --- Makefile.am | 2 +- automake.in | 3 +-- lib/am/{distcheck.am => distcheck.mk} | 12 +++++++----- t/distcheck-configure-flags-am.sh | 5 ----- t/distcheck-configure-flags.sh | 2 -- 5 files changed, 9 insertions(+), 15 deletions(-) rename lib/am/{distcheck.am => distcheck.mk} (95%) diff --git a/Makefile.am b/Makefile.am index 90c32fd62..24b75d0a0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -195,11 +195,11 @@ dist_am_DATA = \ lib/am/header-vars.mk \ lib/am/tags.mk \ lib/am/dejagnu.mk \ + lib/am/distcheck.mk \ lib/am/compile.am \ lib/am/configure.am \ lib/am/data.am \ lib/am/depend2.am \ - lib/am/distcheck.am \ lib/am/distdir.am \ lib/am/footer.am \ lib/am/header.am \ diff --git a/automake.in b/automake.in index ee4b19210..c1806ab8f 100644 --- a/automake.in +++ b/automake.in @@ -3297,8 +3297,7 @@ sub handle_dist () %transform, FILENAME_FILTER => $filename_filter, 'DIST-COMMON' => "@dist_common"); - $output_rules .= &file_contents ('distcheck', new Automake::Location) - if $relative_dir eq '.'; + verbatim ('distcheck') if $relative_dir eq '.'; } diff --git a/lib/am/distcheck.am b/lib/am/distcheck.mk similarity index 95% rename from lib/am/distcheck.am rename to lib/am/distcheck.mk index a6f47d2fb..b35899737 100644 --- a/lib/am/distcheck.am +++ b/lib/am/distcheck.mk @@ -15,9 +15,9 @@ # Checking the distribution. # # ---------------------------- # -if %?SUBDIRS% +ifdef SUBDIRS AM_RECURSIVE_TARGETS += distcheck -endif %?SUBDIRS% +endif # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -136,10 +136,12 @@ distuninstallcheck: $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 -## Define distcleancheck_listfiles and distcleancheck separately -## from distcheck, so that they can be overridden by the user. +# Define '$(distcleancheck_listfiles)' and 'distcleancheck' separately +# from distcheck, so that they can be overridden by the user. +ifeq ($(call am.vars.is-undef,distcleancheck_listfiles),yes) + distcleancheck_listfiles := find . -type f -print +endif .PHONY: distcleancheck -distcleancheck_listfiles = find . -type f -print distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ diff --git a/t/distcheck-configure-flags-am.sh b/t/distcheck-configure-flags-am.sh index 828199ec7..f01a9b291 100755 --- a/t/distcheck-configure-flags-am.sh +++ b/t/distcheck-configure-flags-am.sh @@ -37,11 +37,6 @@ END $ACLOCAL $AUTOMAKE -$FGREP '$(DISTCHECK_CONFIGURE_FLAGS)' Makefile.in -$FGREP '$(AM_DISTCHECK_CONFIGURE_FLAGS)' Makefile.in -grep 'DISTCHECK_CONFIGURE_FLAGS.*AM_DISTCHECK_CONFIGURE_FLAGS' Makefile.in \ - && exit 1 - $AUTOCONF ./configure --enable-success sentence='it works :-)' diff --git a/t/distcheck-configure-flags.sh b/t/distcheck-configure-flags.sh index fdec9a5c4..998c43d29 100755 --- a/t/distcheck-configure-flags.sh +++ b/t/distcheck-configure-flags.sh @@ -32,8 +32,6 @@ unset sentence || : $ACLOCAL $AUTOMAKE -$FGREP '$(DISTCHECK_CONFIGURE_FLAGS)' Makefile.in - $AUTOCONF ./configure --enable-success sentence='it works :-)' -- 2.47.2