]> sourceware.org Git - automake.git/commitdiff
* automake.in (handle_configure): Don't modify variable which
authorTom Tromey <tromey@redhat.com>
Sun, 4 Feb 2001 03:27:52 +0000 (03:27 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 4 Feb 2001 03:27:52 +0000 (03:27 +0000)
aliases list element.  Don't push @inputs onto the dist list.
Fixes colon7.test.
(initialize_per_input) [dist_dirs]: New variable.
(handle_dist_worker): Use global dist_dirs.
(handle_configure): Set dist_dirs entries at toplevel.

ChangeLog
automake.in
stamp-vti
version.texi

index 4f44a4d5228e9b20d1ac1de60c787b199f6202df..aef51eb77e6131b9abc1421c51557a3df51fe632 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-02-03  Tom Tromey  <tromey@redhat.com>
+
+       * automake.in (handle_configure): Don't modify variable which
+       aliases list element.  Don't push @inputs onto the dist list.
+       Fixes colon7.test.
+       (initialize_per_input) [dist_dirs]: New variable.
+       (handle_dist_worker): Use global dist_dirs.
+       (handle_configure): Set dist_dirs entries at toplevel.
+
 2001-02-02  Gordon Sadler <gbsadler1@lcisp.com>
 
        * automake.texi (Java Support): Added index, @section.
index fba82c8e8207d716f4305b58d6bc2af7d81ad8f9..b422e42216ac260c5a33f61137e8ed99d8d6eb1b 100755 (executable)
@@ -2651,7 +2651,6 @@ sub handle_dist_worker
     # subdir.  If so, add it to the list.  I didn't want to do this
     # originally, but there were so many requests that I finally
     # relented.
-    local (@dist_dirs);
     if (&variable_defined ('EXTRA_DIST'))
     {
        # FIXME: This should be fixed to work with conditionals.  That
@@ -2663,7 +2662,7 @@ sub handle_dist_worker
        {
            next if /^\@.*\@$/;
            next unless s,/+[^/]+$,,;
-           push (@dist_dirs, $_)
+           $dist_dirs{$_} = 1
                unless $_ eq '.';
        }
     }
@@ -2674,18 +2673,17 @@ sub handle_dist_worker
     {
        next if /^\@.*\@$/;
        next unless s,/+[^/]+$,,;
-       push (@dist_dirs, $_)
+       $dist_dirs{$_} = 1
            unless $_ eq '.';
     }
 
-    if (@dist_dirs)
+    if (scalar keys %dist_dirs)
     {
        # Prepend $(distdir) to each directory given.  Doing it via a
        # hash lets us ensure that each directory is used only once.
-       local (%dhash);
-       grep ($dhash{'$(distdir)/' . $_} = 1, @dist_dirs);
+       grep ($dist_dirs{'$(distdir)/' . $_} = 1, keys %dist_dirs);
        $output_rules .= "\t";
-       &pretty_print_rule ('$(mkinstalldirs)', "\t   ", sort keys %dhash);
+       &pretty_print_rule ('$(mkinstalldirs)', "\t   ", sort keys %dist_dirs);
     }
 
     # In loop, test for file existence because sometimes a file gets
@@ -3518,10 +3516,10 @@ sub handle_configure
     local (@actual_other_files) = ();
     local ($file, $local);
     local (@inputs, @rewritten_inputs, $single);
-    local ($need_rewritten);
-    foreach $file (@other_input_files)
+    local ($need_rewritten, $lfile);
+    foreach $lfile (@other_input_files)
     {
-       if ($file =~ /^([^:]*):(.*)$/)
+       if ($lfile =~ /^([^:]*):(.*)$/)
        {
            # This is the ":" syntax of AC_OUTPUT.
            $file = $1;
@@ -3533,6 +3531,7 @@ sub handle_configure
        else
        {
            # Normal usage.
+           $file = $lfile;
            $local = &basename ($file);
            @inputs = ($local . '.in');
            @rewritten_inputs =
@@ -3540,6 +3539,19 @@ sub handle_configure
            $need_rewritten = 0;
        }
 
+       # Make sure the dist directory for each input file is created.
+       # We only have to do this at the topmost level though.  This
+       # is a bit ugly but it easier than spreading out the logic,
+       # especially in cases like AC_OUTPUT(foo/out:bar/in), where
+       # there is no Makefile in bar/.
+       if ($relative_dir eq '.')
+       {
+           foreach (@inputs)
+           {
+               $dist_dirs{&dirname ($_)} = 1;
+           }
+       }
+
        # Skip files not in this directory.
        next unless &dirname ($file) eq $relative_dir;
 
@@ -3568,7 +3580,6 @@ sub handle_configure
                                    : '')
                          . ' CONFIG_HEADERS= $(SHELL) ./config.status'
                          . "\n");
-       &push_dist_common (@inputs);
        push (@actual_other_files, $local);
 
        # Require all input files.
@@ -6877,6 +6888,11 @@ sub initialize_per_input
     # distribution.
     %dist_common = ();
 
+    # This holds a list of directories which we must create at `dist'
+    # time.  This is used in some strange scenarios involving weird
+    # AC_OUTPUT commands.
+    %dist_dirs = ();
+
     # List of dependencies for the obvious targets.
     @install_data = ();
     @install_exec = ();
index b3d4c9798cbbe7c5d09eb112c7f13b2902ddd130..f803e45c4e4483c36d4b287b54c67e0aee7dda17 100644 (file)
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 22 January 2001
-@set UPDATED-MONTH January 2001
+@set UPDATED 2 February 2001
+@set UPDATED-MONTH February 2001
 @set EDITION 1.4c
 @set VERSION 1.4c
index b3d4c9798cbbe7c5d09eb112c7f13b2902ddd130..f803e45c4e4483c36d4b287b54c67e0aee7dda17 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 22 January 2001
-@set UPDATED-MONTH January 2001
+@set UPDATED 2 February 2001
+@set UPDATED-MONTH February 2001
 @set EDITION 1.4c
 @set VERSION 1.4c
This page took 0.039469 seconds and 5 git commands to generate.