* automake.in (handle_dist): Turn the '%DIST-TARGETS%' transform
into the 'am.dist.extra-targets' internal variable.
* lib/am/distdir.am (distdir): Adjust and simplify accordingly.

Signed-off-by: Stefano Lattarini <[email protected]>
---
 automake.in       | 2 +-
 lib/am/distdir.am | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/automake.in b/automake.in
index 177b43f..ed4d14a 100644
--- a/automake.in
+++ b/automake.in
@@ -3301,7 +3301,7 @@ sub handle_dist ()
   # before it is packaged up.
   push (@dist_targets, 'dist-hook')
     if user_phony_rule 'dist-hook';
-  $transform{'DIST-TARGETS'} = join (' ', @dist_targets);
+  define_variable ('am.dist.extra-targets', INTERNAL, @dist_targets);
 
   $output_rules .= &file_contents ('distdir',
                                   new Automake::Location,
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index cf1333b..7533e3d 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -260,11 +260,10 @@ endif %?SUBDIRS%
 ## info files.
 ## We must explicitly set distdir and top_distdir for these sub-makes.
 ##
-if %?DIST-TARGETS%
+       $(if $(am.dist.extra-targets), \
        $(MAKE) \
          top_distdir="$(top_distdir)" distdir="$(distdir)" \
-         %DIST-TARGETS%
-endif %?DIST-TARGETS%
+         $(am.dist.extra-targets))
 ##
 ## This complex find command will try to avoid changing the modes of
 ## links into the source tree, in case they're hard-linked.
-- 
1.7.12.rc0


Reply via email to