]> sourceware.org Git - automake.git/commitdiff
* automake.in (%am_vars, @var_list, %def_type): Globals.
authorAkim Demaille <akim@epita.fr>
Mon, 5 Mar 2001 14:30:28 +0000 (14:30 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 5 Mar 2001 14:30:28 +0000 (14:30 +0000)
(&initialize_per_input): Initialize them.
(&read_main_am_file): Don't local them.
(&get_object_extension): $objext is private.
(&handle_single_transform_list): $lang is.
(&handle_ltlibraries): $libname_rx is.
(&scan_autoconf_config_files): How about actually paying attention
to your arguments, instead of working on $_? (this is no Perl
variable, it's a Perl variable followed by a question mark).
(&file_contents): $contents and $separator are private.
(&am_install_var): Declare @condvals, not $condvals.
(%make_dirs): My.

ChangeLog
automake.in

index cf8f48d67b0da5e4165d430ef6ee9b5cccf3ba12..2b7498aa51fe4d34b6a8b6f1b50474ece8ee07dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2001-03-05  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (%am_vars, @var_list, %def_type): Globals.
+       (&initialize_per_input): Initialize them.
+       (&read_main_am_file): Don't local them.
+       (&get_object_extension): $objext is private.
+       (&handle_single_transform_list): $lang is.
+       (&handle_ltlibraries): $libname_rx is.
+       (&scan_autoconf_config_files): How about actually paying attention
+       to your arguments, instead of working on $_? (this is no Perl
+       variable, it's a Perl variable followed by a question mark).
+       (&file_contents): $contents and $separator are private.
+       (&am_install_var): Declare @condvals, not $condvals.
+       (%make_dirs): My.
+
+       
 2001-03-05  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&initialize_per_input): Move to the top.
index 22d13426d8835004763906d034dc156f458ad8cf..3630c78635531d5cf5ebdd247aa1ef73e88d5f6f 100755 (executable)
@@ -586,6 +586,13 @@ my $handle_dist_run;
 # True if we need `LINK' defined.  This is a hack.
 my $need_link;
 
+# The keys here are variables we want to dump at the end of this
+# function.  The values are corresponding comments.  Need dynamic
+# scopes.
+my %am_vars;
+my @var_list;
+my %def_type;
+
 
 # &initialize_per_input ()
 # ------------------------
@@ -789,6 +796,13 @@ sub initialize_per_input ()
 
     # True if we need `LINK' defined.  This is a hack.
     $need_link = 0;
+
+    # The keys here are variables we want to dump at the end of this
+    # function.  The values are corresponding comments.  Need dynamic
+    # scopes.
+    %am_vars = ();
+    @var_list = ();
+    %def_type = ();
 }
 
 
@@ -1351,7 +1365,7 @@ sub get_object_extension
            # Generate rules to build ansi2knr.  If it is in some
            # other directory, then generate dependencies but have the
            # rule just run elsewhere.
-           $objext = $seen_objext ? ".\$(OBJEXT)" : ".o";
+           my $objext = $seen_objext ? ".\$(OBJEXT)" : ".o";
            $output_rules .= ($options{'ansi2knr'} . ': '
                              . $options{'ansi2knr'} . $objext . "\n");
            if ($options{'ansi2knr'} eq 'ansi2knr')
@@ -1652,7 +1666,7 @@ sub handle_single_transform_list
         my $renamed = 0;
 
         $extension = &derive_suffix ($extension);
-        $lang = $extension_map{$extension};
+        my $lang = $extension_map{$extension};
         if ($lang)
         {
             &saw_extension ($extension);
@@ -2449,7 +2463,7 @@ sub handle_ltlibraries
        }
 
        # Check that the library fits the standard naming convention.
-       $libname_rx = "^lib.*\.la";
+       my $libname_rx = "^lib.*\.la";
        if ((&variable_defined ($xlib . '_LDFLAGS')
             && grep (/-module/, &variable_value_as_list ($xlib . '_LDFLAGS',
                                                          'all')))
@@ -4386,8 +4400,9 @@ sub handle_minor_options
 # (or AC_OUTPUT).
 sub scan_autoconf_config_files
 {
+    my ($config_files) = @_;
     # Look at potential Makefile.am's.
-    foreach (split)
+    foreach (split ' ', $config_files)
     {
         # Must skip empty string for Perl 4.
         next if $_ eq "\\" || $_ eq '';
@@ -6653,13 +6668,6 @@ sub read_main_am_file
 {
     my ($amfile) = @_;
 
-    # The keys here are variables we want to dump at the end of this
-    # function.  The values are corresponding comments.
-    # Need dynamic scopes.
-    local %am_vars = ();
-    local @var_list = ();
-    local %def_type = ();
-
     # This supports the strange variable tricks we are about to play.
     &prog_error ("variable defined before read_main_am_file")
         if scalar keys %contents > 0;
@@ -6802,9 +6810,8 @@ sub file_contents
     $_ = $fc_file->getline;
     $/ = $saved_dollar_slash;
     eval $command;
-    $contents = $_;
-
     $fc_file->close;
+    my $contents = $_;
 
 
     # Process each Make `paragraph'.
@@ -6828,6 +6835,7 @@ sub file_contents
     my $result_vars = '';
     my $result_rules = '';
     my $comment = '';
+    my $separator = '';
     foreach (split (/(?<!\\)\n(?![\t#])/, $contents))
     {
         # Strip leading new lines.  This can happen for comments:
@@ -7188,7 +7196,7 @@ sub am_install_var
                }
                else
                {
-                   my $condvals = '';
+                   my @condvals;
                    foreach my $cond (@conds)
                    {
                        my @one_binlist = ();
@@ -7214,7 +7222,7 @@ sub am_install_var
 
                    while (@condvals)
                    {
-                       $cond = shift (@condvals);
+                       my $cond = shift (@condvals);
                        my @val = split (' ', shift (@condvals));
                        &define_pretty_variable ($one_name, $cond, @val);
                    }
@@ -7297,7 +7305,7 @@ sub am_install_var
 
 # Each key in this hash is the name of a directory holding a
 # Makefile.in.  These variables are local to `is_make_dir'.
-%make_dirs = ();
+my %make_dirs = ();
 my $make_dirs_set = 0;
 
 sub is_make_dir
This page took 0.042149 seconds and 5 git commands to generate.