]> sourceware.org Git - automake.git/commitdiff
* distdir.am (GZIP_ENV): Define.
authorAkim Demaille <akim@epita.fr>
Wed, 21 Feb 2001 08:22:24 +0000 (08:22 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 21 Feb 2001 08:22:24 +0000 (08:22 +0000)
* automake.in (&handle_dist): Don't.
(&uniq): New.
(&handle_dist_worker, &am_install_var): Use it.

ChangeLog
Makefile.in
automake.in
dist-vars.am
distdir.am
lib/am/distdir.am
m4/Makefile.in
tests/Makefile.in

index 12f0c3d3c734a0692a0c50f80f083a38d1e9c5ae..5e47fd48225ad54ce172fa2617a6d9b2c14f8088 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-02-21  Akim Demaille  <akim@epita.fr>
+
+       * distdir.am (GZIP_ENV): Define.
+       * automake.in (&handle_dist): Don't.
+       (&uniq): New.
+       (&handle_dist_worker, &am_install_var): Use it.
+
 2001-02-21  Akim Demaille  <akim@epita.fr>
 
        * distdir.am (distdir): Handle the DIST-TARGETS.
index d5d0fd828a574baf8f3db88c5a7f1b2544e7b7e3..9177a544bb8c984223e09fab2de0dce7270eb92c 100644 (file)
@@ -139,7 +139,6 @@ stamp-vti texinfo.tex version.texi ylwrap
 
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-GZIP_ENV = --best
 DIST_SUBDIRS =  $(SUBDIRS)
 all: all-recursive
 .SUFFIXES:
@@ -487,6 +486,8 @@ distcheck: dist
        echo "$$banner"; \
        echo "$$dashes"
 
+GZIP_ENV = --best
+
 distdir: $(DISTFILES)
        @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" >/dev/null; then :; else \
          echo "NEWS not updated; not releasing" 1>&2; \
@@ -524,7 +525,6 @@ distdir: $(DISTFILES)
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r $(distdir)
-
 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)
index 65bb252ccb3527b3d09dec420ca4c1f8a48b07f3..5d4320ebfe382edf642e54865b4dea1cd76d5009 100755 (executable)
@@ -421,17 +421,36 @@ exit $exit_status;
 
 ################################################################
 
-
 # prog_error (@PRINT-ME)
 # ----------------------
 # Signal a programming error, display PRINT-ME, and exit 1.
-sub prog_error
+sub prog_error (@)
 {
     print STDERR "automake: programming error: @_\n";
     exit 1;
 }
 
 
+# @RES
+# uniq (@LIST)
+# ------------
+# Return LIST with no duplicates.
+sub uniq (@)
+{
+   my @res = ();
+   my %seen = ();
+   foreach my $item (@_)
+     {
+       if (! defined $seen{$item})
+        {
+          $seen{$item} = 1;
+          push (@res, $item);
+        }
+     }
+   return @res;
+}
+
+
 ################################################################
 
 # Parse command line.
@@ -2629,18 +2648,9 @@ sub handle_dist_worker
            $dist_subdir_name = 'DIST_SUBDIRS';
            if (! &variable_defined ('DIST_SUBDIRS'))
            {
-               local (@full_list) = &variable_value_as_list ('SUBDIRS',
-                                                             'all');
-               local (@ds_list, %uniq, $iter);
-               foreach $iter (@full_list)
-               {
-                   if (! defined $uniq{$iter})
-                   {
-                       $uniq{$iter} = 1;
-                       push (@ds_list, $iter);
-                   }
-               }
-               &define_pretty_variable ('DIST_SUBDIRS', '', @ds_list);
+               &define_pretty_variable
+                 ('DIST_SUBDIRS', '',
+                  uniq (&variable_value_as_list ('SUBDIRS', 'all')));
            }
        }
        else
@@ -2754,7 +2764,6 @@ sub handle_dist
 
     # Some boilerplate.
     $output_vars .= &file_contents ('dist-vars') . "\n";
-    &define_variable ('GZIP_ENV', '--best');
 
     # Put these things in rules section so it is easier for whoever
     # reads Makefile.in.
@@ -7382,9 +7391,7 @@ sub am_install_var
     # Make the result unique.  This lets the user use conditionals in
     # a natural way, but still lets us program lazily -- we don't have
     # to worry about handling a particular object more than once.
-    local (%uniquify) = ();
-    grep ($uniquify{$_} = 1, @result);
-    return sort keys %uniquify;
+    return uniq (sort @result);
 }
 
 
index 677f6de217bef7eec4ba0ae3dc786afca60912f2..9266bb47caf4ada8cacf491a3a2b0fb7cad16fc9 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
+## Copyright 1994, 1995, 1996, 1999, 2001 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
index e6df942e017f171a46ee4cb629573ce8f3fc50eb..5704f87ca26a72927ef95d8723f85c33c3da3a17 100644 (file)
@@ -123,6 +123,7 @@ distdir: $(DISTFILES)
 ## the only reason) is that some versions of tar (e.g., OSF1)
 ## interpret `-z' differently.
 
+?TOPDIR?GZIP_ENV = --best
 ?TOPDIR?.PHONY: dist-all dist
 ?TOPDIR?dist-all: dist
 ?TOPDIR?dist: distdir
index e6df942e017f171a46ee4cb629573ce8f3fc50eb..5704f87ca26a72927ef95d8723f85c33c3da3a17 100644 (file)
@@ -123,6 +123,7 @@ distdir: $(DISTFILES)
 ## the only reason) is that some versions of tar (e.g., OSF1)
 ## interpret `-z' differently.
 
+?TOPDIR?GZIP_ENV = --best
 ?TOPDIR?.PHONY: dist-all dist
 ?TOPDIR?dist-all: dist
 ?TOPDIR?dist: distdir
index 240886c93a058de7fa08aec37e131dcb1632ea52..03656b248f9d8ac165918b0cc7e1a5a0d938442e 100644 (file)
@@ -99,7 +99,6 @@ DIST_COMMON =  Makefile.am Makefile.in
 
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-GZIP_ENV = --best
 all: all-am
 .SUFFIXES:
 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
index 8dc5d37bc92189fec213eede2129440f40e38ec0..35c436f2b11bec1c32be569735e110ef3a0f8b86 100644 (file)
@@ -360,7 +360,6 @@ DIST_COMMON =  Makefile.am Makefile.in
 
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-GZIP_ENV = --best
 all: all-am
 .SUFFIXES:
 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
This page took 0.04662 seconds and 5 git commands to generate.