]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] distcheck: include it as a verbatim makefile fragment
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Aug 2012 17:07:04 +0000 (19:07 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Aug 2012 17:26:09 +0000 (19:26 +0200)
* 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 <stefano.lattarini@gmail.com>
Makefile.am
automake.in
lib/am/distcheck.mk [moved from lib/am/distcheck.am with 95% similarity]
t/distcheck-configure-flags-am.sh
t/distcheck-configure-flags.sh

index 90c32fd62c90dae3e7ff49d45d3ab5e575d5e38e..24b75d0a0b80749b30f030922371a420032ada73 100644 (file)
@@ -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 \
index ee4b1921044f846b7f74f0a36a52dbac82d1435b..c1806ab8faee793f9447ec851aedc6b21af8614c 100644 (file)
@@ -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 '.';
 }
 
 
similarity index 95%
rename from lib/am/distcheck.am
rename to lib/am/distcheck.mk
index a6f47d2fbf16361a35a2b19259e3729c5bbcc981..b358997373c19a7023459b41f6aa175da63b8b36 100644 (file)
@@ -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" ; \
index 828199ec778f0e10933353689e9f27e573ed10f9..f01a9b29110dbf99cdfa27278d2d52afca4928fd 100755 (executable)
@@ -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 :-)'
 
index fdec9a5c4cdb896b5e573aa9932a282627f6a72e..998c43d29dea543788822d7e9764cc6c8e95d8ef 100755 (executable)
@@ -32,8 +32,6 @@ unset sentence || :
 
 $ACLOCAL
 $AUTOMAKE
-$FGREP '$(DISTCHECK_CONFIGURE_FLAGS)' Makefile.in
-
 $AUTOCONF
 ./configure --enable-success sentence='it works :-)'