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>
# 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
## 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 \
$ACLOCAL
$AUTOMAKE
-$FGREP 'distcheck-hook' Makefile.in
-$FGREP '$(MAKE) distcheck-hook' Makefile.in
-grep '^distcheck-hook:' Makefile.in
-
$AUTOCONF
./configure
$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