[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [FYI] [ng] disthook: use a variable, not a transform, to d
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [FYI] [ng] disthook: use a variable, not a transform, to decide whether to run it |
Date: |
Fri, 10 Aug 2012 16:13:36 +0200 |
This is mostly a preparatory refactoring in view of future changes.
* automake.in (handle_dist): Here, define the internal variable
'am.conf.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 <address@hidden>
---
automake.in | 3 ++-
lib/am/distdir.am | 2 +-
t/distcheck-hook.sh | 4 ----
t/distcheck-hook2.sh | 7 -------
4 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/automake.in b/automake.in
index 153c246..5a43a47 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.conf.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 efe576c..7ee1277 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.conf.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 ef64805..f806e4b 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 7c7352b..de4c155 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
--
1.7.12.rc0
- [Automake-NG] [FYI] [ng] disthook: use a variable, not a transform, to decide whether to run it,
Stefano Lattarini <=