From: Stefano Lattarini Date: Fri, 10 Aug 2012 14:00:42 +0000 (+0200) Subject: [ng] disthook: with an internal variable, not a transform X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8bc481684e9d3f602a2028a6fbe021aae60dacf;p=thirdparty%2Fautomake.git [ng] disthook: with an internal variable, not a transform 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 --- diff --git a/automake.in b/automake.in index 153c24602..247da2314 100644 --- a/automake.in +++ b/automake.in @@ -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 diff --git a/lib/am/distdir.am b/lib/am/distdir.am index efe576c47..813506283 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -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 \ diff --git a/t/distcheck-hook.sh b/t/distcheck-hook.sh index ef64805ea..f806e4b03 100755 --- a/t/distcheck-hook.sh +++ b/t/distcheck-hook.sh @@ -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 diff --git a/t/distcheck-hook2.sh b/t/distcheck-hook2.sh index 7c7352bbb..de4c155e1 100755 --- a/t/distcheck-hook2.sh +++ b/t/distcheck-hook2.sh @@ -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