]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* distdir.am (distdir): Handle the DIST-TARGETS.
authorAkim Demaille <akim@epita.fr>
Wed, 21 Feb 2001 08:21:43 +0000 (08:21 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 21 Feb 2001 08:21:43 +0000 (08:21 +0000)
* automake.in (&handle_dist_worker): Don't.

ChangeLog
Makefile.in
automake.in
distdir.am
lib/am/distdir.am

index 88ede2a61113b474bffaa3fdf322758291b2c6c1..12f0c3d3c734a0692a0c50f80f083a38d1e9c5ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-02-21  Akim Demaille  <akim@epita.fr>
+
+       * distdir.am (distdir): Handle the DIST-TARGETS.
+       * automake.in (&handle_dist_worker): Don't.
+
+       
 2001-02-21  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&file_contents): Transform the global options (such
index 34dfb70511c3cf50de433c372c46f4e89fee9de5..d5d0fd828a574baf8f3db88c5a7f1b2544e7b7e3 100644 (file)
@@ -516,6 +516,9 @@ distdir: $(DISTFILES)
              || exit 1; \
          fi; \
        done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-info
        -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
@@ -525,7 +528,6 @@ distdir: $(DISTFILES)
 dist: distdir
        $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
        -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
-       $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
 info-am: $(INFO_DEPS)
 info: info-recursive
 dvi-am: $(DVIS)
index 74f43a61268dee672f540e6a7de431dfb4f54f23..65bb252ccb3527b3d09dec420ca4c1f8a48b07f3 100755 (executable)
@@ -2656,26 +2656,20 @@ sub handle_dist_worker
                              'TOP_DISTDIR'      => $top_distdir);
     }
 
-    $output_rules .=
-      &file_contents ('distdir',
-                     $xform
-                     . &transform_cond ('SUBDIRS'  =>
-                                           &variable_defined ('SUBDIRS')));
-
     # If the target `dist-hook' exists, make sure it is run.  This
     # allows users to do random weird things to the distribution
     # before it is packaged up.
-    push (@dist_targets, 'dist-hook') if &target_defined ('dist-hook');
+    push (@dist_targets, 'dist-hook')
+      if &target_defined ('dist-hook');
 
-    local ($targ);
-    foreach $targ (@dist_targets)
-    {
-       # We must explicitly set distdir and top_distdir for these
-       # sub-makes.
-       $output_rules .= ("\t\$(MAKE) \$(AM_MAKEFLAGS)"
-                         . " top_distdir=\"\$(top_distdir)\""
-                         . " distdir=\"\$(distdir)\" $targ\n");
-    }
+    $output_rules .=
+      &file_contents ('distdir',
+                     $xform
+                     . &transform ('DIST-TARGETS' => join " ", @dist_targets)
+                     . &transform_cond ('DIST-TARGETS' =>
+                                           scalar @dist_targets,
+                                        'SUBDIRS'  =>
+                                           &variable_defined ('SUBDIRS')));
 }
 
 # Handle 'dist' target.
index ac16894342d69ac8c8120afc4e7dfdcffd026857..e6df942e017f171a46ee4cb629573ce8f3fc50eb 100644 (file)
@@ -81,6 +81,14 @@ distdir: $(DISTFILES)
 ?SUBDIRS?        fi; \
 ?SUBDIRS?      done
 ##
+## We might have to perform some last second updates, such as updating
+## info files.
+## We must explicitly set distdir and top_distdir for these sub-makes.
+##
+?DIST-TARGETS? $(MAKE) $(AM_MAKEFLAGS) \
+?DIST-TARGETS?   top_distdir="$(top_distdir)" distdir="$(distdir)" \
+?DIST-TARGETS?   @DIST-TARGETS@
+##
 ## This complex find command will try to avoid changing the modes of
 ## links into the source tree, in case they're hard-linked.  It will
 ## also make directories writable by everybody, because some
@@ -123,7 +131,6 @@ distdir: $(DISTFILES)
 
 
 ?TOPDIR??BZIP2?.PHONY dist-all: dist-bzip2
-?TOPDIR??BZIP2?.PHONY: dist-bzip2
 ?TOPDIR??BZIP2?dist-bzip2: distdir
 ?TOPDIR??BZIP2?        $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
 ?TOPDIR??BZIP2?        -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
index ac16894342d69ac8c8120afc4e7dfdcffd026857..e6df942e017f171a46ee4cb629573ce8f3fc50eb 100644 (file)
@@ -81,6 +81,14 @@ distdir: $(DISTFILES)
 ?SUBDIRS?        fi; \
 ?SUBDIRS?      done
 ##
+## We might have to perform some last second updates, such as updating
+## info files.
+## We must explicitly set distdir and top_distdir for these sub-makes.
+##
+?DIST-TARGETS? $(MAKE) $(AM_MAKEFLAGS) \
+?DIST-TARGETS?   top_distdir="$(top_distdir)" distdir="$(distdir)" \
+?DIST-TARGETS?   @DIST-TARGETS@
+##
 ## This complex find command will try to avoid changing the modes of
 ## links into the source tree, in case they're hard-linked.  It will
 ## also make directories writable by everybody, because some
@@ -123,7 +131,6 @@ distdir: $(DISTFILES)
 
 
 ?TOPDIR??BZIP2?.PHONY dist-all: dist-bzip2
-?TOPDIR??BZIP2?.PHONY: dist-bzip2
 ?TOPDIR??BZIP2?dist-bzip2: distdir
 ?TOPDIR??BZIP2?        $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
 ?TOPDIR??BZIP2?        -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)