automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

35-dist-targets.patch


From: Akim Demaille
Subject: 35-dist-targets.patch
Date: Mon, 19 Feb 2001 03:04:48 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * distdir.am (distdir): Handle the DIST-TARGETS.
        * automake.in (&handle_dist_worker): Don't.
        
        
Index: automake.in
--- automake.in Sat, 17 Feb 2001 18:43:49 +0100 akim (am/f/39_automake.i 1.42 
755)
+++ automake.in Sat, 17 Feb 2001 18:53:36 +0100 akim (am/f/39_automake.i 1.42 
755)
@@ -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: distdir.am
--- distdir.am Sat, 17 Feb 2001 18:16:32 +0100 akim (am/h/17_distdir.am 1.5 644)
+++ distdir.am Sat, 17 Feb 2001 18:44:13 +0100 akim (am/h/17_distdir.am 1.5 644)
@@ -81,6 +81,14 @@
 ?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 @@
 
 
 ?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: Makefile.in
--- Makefile.in Sat, 17 Feb 2001 18:16:32 +0100 akim (am/h/16_Makefile.i 1.13 
644)
+++ Makefile.in Sat, 17 Feb 2001 18:53:44 +0100 akim (am/h/16_Makefile.i 1.13 
644)
@@ -511,6 +511,9 @@
              || 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 \
@@ -520,7 +523,6 @@
 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]