]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] disthook: with an internal variable, not a transform
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Aug 2012 14:00:42 +0000 (16:00 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Aug 2012 14:21:03 +0000 (16:21 +0200)
This is mostly a preparatory refactoring in view of future changes.

* automake.in (handle_dist): Define the internal variable
'am.dist.handle-distcheck-hook' to "yes" if a user-defined
'distcheck-hook' rule, to the empty string otherwise.  This
take over the role of the transform 'DISTCHECK-HOOK', which
has thus been removed.
* lib/am/distdir.am (distcheck): Adjust to rely on the new
variable instead than of the removed transform.
* t/distcheck-hook.sh: Remove obsolete or obsolescent grepping
checks.
* t/distcheck-hook2.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
automake.in
lib/am/distdir.am
t/distcheck-hook.sh
t/distcheck-hook2.sh

index 153c24602664ae8bfed4f1151d6dbf38e73c7346..247da23149ca93157a02092075f19f17d1de298c 100644 (file)
@@ -3283,7 +3283,8 @@ sub handle_dist ()
   # relented.
   my $extra_dist = var ('EXTRA_DIST');
 
-  $transform{'DISTCHECK-HOOK'} = !! rule 'distcheck-hook';
+  define_variable ('am.dist.handle-distcheck-hook', INTERNAL,
+                   rule ('distcheck-hook') ? 'yes' : '');
   $transform{'GETTEXT'} = $seen_gettext && !$seen_gettext_external;
 
   # If the target 'dist-hook' exists, make sure it is run.  This
index efe576c4718f47cb57535c0f93d125fb3303a55a..813506283a2f952e89131a6ac966b81c60d67397 100644 (file)
@@ -443,7 +443,7 @@ distcheck: dist
 ## create this directory under $dc_install_base, because it would
 ## create very long directory names.
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-?DISTCHECK-HOOK?         && $(MAKE) distcheck-hook \
+         $(if $(am.dist.handle-distcheck-hook),&& $(MAKE) distcheck-hook) \
          && cd $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 ?GETTEXT?          --with-included-gettext \
index ef64805eaaa3bd13404c6487277fadb551ea84d5..f806e4b03995176ce69b1b67bc49841b10be4c37 100755 (executable)
@@ -35,10 +35,6 @@ END
 
 $ACLOCAL
 $AUTOMAKE
-$FGREP 'distcheck-hook' Makefile.in
-$FGREP '$(MAKE) distcheck-hook' Makefile.in
-grep '^distcheck-hook:' Makefile.in
-
 $AUTOCONF
 ./configure
 
index 7c7352bbb4c4dc3c5bc352c39027b8413b5c04e9..de4c155e153f03e93131c16f06ffd9f22381b6e4 100755 (executable)
@@ -60,13 +60,6 @@ $AUTOMAKE
 $AUTOCONF
 cd ..
 
-# For debugging.
-$FGREP 'distcheck-hook' Makefile.in subpkg/Makefile.in
-
-$FGREP 'distcheck-hook' subpkg/Makefile.in && exit 1
-$FGREP '$(MAKE) distcheck-hook' Makefile.in
-grep '^distcheck-hook:' Makefile.in
-
 ./configure
 
 $MAKE