automake
[Top][All Lists]
Advanced

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

46-formatting-changes.patch


From: Akim Demaille
Subject: 46-formatting-changes.patch
Date: Wed, 21 Feb 2001 18:23:39 +0100

In two chunks 'coz I first went too far :)

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * automake.in: Formatting changes.

Index: automake.in
--- automake.in Mon, 19 Feb 2001 02:58:32 +0100 akim (am/f/39_automake.i 1.53 
755)
+++ automake.in Tue, 20 Feb 2001 18:54:15 +0100 akim (am/f/39_automake.i 1.53 
755)
@@ -2291,26 +2291,23 @@ sub handle_texinfo
        return;
     }

-    local (@texis) = &variable_value_as_list ('info_TEXINFOS', 'all');
+    my @texis = &variable_value_as_list ('info_TEXINFOS', 'all');

-    local (@info_deps_list, @dvis_list, @texi_deps);
-    local ($infobase, $info_cursor);
-    local (%versions);
-    local ($done) = 0;
-    local ($vti);
-    local ($tc_cursor, @texi_cleans);
-    local ($canonical);
+    my @info_deps_list, @dvis_list, @texi_deps;
+    my %versions;
+    my $done = 0;
+    my @texi_cleans;

-    foreach $info_cursor (@texis)
+    foreach my $info_cursor (@texis)
     {
        # FIXME: This is mildly hacky, since it recognizes "txinfo".
        # I don't feel like making it right.
-       ($infobase = $info_cursor) =~ s/\.te?xi(nfo)?$//;
+       my ($infobase = $info_cursor) =~ s/\.te?xi(nfo)?$//;

        # If 'version.texi' is referenced by input file, then include
        # automatic versioning capability.
-       local ($out_file, $vtexi) = &scan_texinfo_file ($relative_dir
-                                                       . "/" . $info_cursor);
+       my ($out_file, $vtexi) = &scan_texinfo_file ($relative_dir
+                                                    . "/" . $info_cursor);

        if ($out_file eq '')
        {
@@ -2334,7 +2331,7 @@ sub handle_texinfo
            # We number the stamp-vti files.  This is doable since the
            # actual names don't matter much.  We only number starting
            # with the second one, so that the common case looks nice.
-           $vti = ($done ? $done : 'vti');
+           my $vti = ($done ? $done : 'vti');
            ++$done;

            &push_dist_common ($vtexi, 'stamp-' . $vti);
@@ -2342,7 +2339,7 @@ sub handle_texinfo
            &require_conf_file_with_line ('info_TEXINFOS', $FOREIGN,
                                          'mdate-sh');

-           local ($conf_dir);
+           my $conf_dir;
            if ($config_aux_dir eq '.' || $config_aux_dir eq '')
            {
                $conf_dir = '$(srcdir)/';
@@ -2369,7 +2366,7 @@ sub handle_texinfo
        # work if the target has it and the dependency doesn't.
        push (@texi_deps, '$(srcdir)/' . $vtexi) if $vtexi;

-       $canonical = &canonicalize ($infobase);
+       my $canonical = &canonicalize ($infobase);
        if (&variable_defined ($canonical . "_TEXINFOS"))
        {
            push (@texi_deps, '$(' . $canonical . '_TEXINFOS)');
@@ -2390,9 +2387,10 @@ sub handle_texinfo
        # removed.  In particular the ".log" extension might
        # reasonably be used in other contexts by the user.
        # FIXME: this is really out of control.
-       foreach $tc_cursor ('aux', 'cp', 'cps', 'dvi', 'fn', 'fns', 'pgs',
-                           'ky', 'kys', 'ps', 'log', 'pg', 'toc', 'tp', 'tps',
-                           'vr', 'vrs', 'op', 'tr', 'cv', 'cn', 'cm', 'ov')
+       foreach my $tc_cursor ('aux', 'cp', 'cps', 'dvi', 'fn', 'fns', 'pgs',
+                              'ky', 'kys', 'ps', 'log', 'pg', 'toc', 'tp',
+                              'tps', 'vr', 'vrs', 'op', 'tr', 'cv', 'cn',
+                              'cm', 'ov')
        {
            push (@texi_cleans, $infobase . '.' . $tc_cursor);
        }
@@ -2498,10 +2496,10 @@ sub handle_man_pages
     # Find all the sections in use.  We do this by first looking for
     # "standard" sections, and then looking for any additional
     # sections used in man_MANS.
-    local ($sect, %sections, %vlist);
+    local (%sections, %vlist);
     local ($found) = 0;
     # Add more sections as needed.
-    foreach $sect ('0'..'9', 'n', 'l')
+    foreach my $sect ('0'..'9', 'n', 'l')
     {
        if (&variable_defined ('man' . $sect . '_MANS'))
        {
@@ -2530,7 +2528,7 @@ sub handle_man_pages
     # Now for each section, generate an install and unintall rule.
     # Sort sections so output is deterministic.
     local (@namelist);
-    foreach $sect (sort keys %sections)
+    foreach my $sect (sort keys %sections)
     {
        &define_variable ('man' . $sect . 'dir', '$(mandir)/man' . $sect);
        push (@installdirs, '$(DESTDIR)$(mandir)/man' . $sect)
@@ -5731,19 +5729,24 @@ sub variable_value
     return $contents{$var};
 }

+
+# @VALUES
+# &value_to_list ($VAR, $VAL, $COND)
+# ----------------------------------
 # Convert a variable value to a list, split as whitespace.  This will
 # recursively follow $(...) and ${...} inclusions.  It preserves @...@
-# substitutions.  If COND is 'all', then all values under all
-# conditions should be returned; if COND is a particular condition
-# (all conditions are surrounded by @...@) then only the value for
-# that condition should be returned; otherwise, warn if VAR is
-# conditionally defined.  SCANNED is a global hash listing whose keys
-# are all the variables already scanned; it is an error to rescan a
-# variable.
+# substitutions.
+#
+# If COND is 'all', then all values under all conditions should be
+# returned; if COND is a particular condition (all conditions are
+# surrounded by @...@) then only the value for that condition should
+# be returned; otherwise, warn if VAR is conditionally defined.
+# SCANNED is a global hash listing whose keys are all the variables
+# already scanned; it is an error to rescan a variable.
 sub value_to_list
 {
-    local ($var, $val, $cond) = @_;
-    local (@result);
+    my ($var, $val, $cond) = @_;
+    my @result;

     # Strip backslashes
     $val =~ s/\\(\n|$)/ /g;
@@ -5756,14 +5759,14 @@ sub value_to_list
        # Handle variable substitutions.
        if (/^\$\{([^}]*)\}$/ || /^\$\(([^)]*)\)$/)
        {
-           local ($varname) = $1;
+           my $varname = $1;

            # If the user uses a losing variable name, just ignore it.
            # This isn't ideal, but people have requested it.
            next if ($varname =~ /address@hidden@/);

-           local ($from, $to);
-           local (@temp_list);
+           my $from, $to;
+           my @temp_list;
            if ($varname =~ /^([^:]*):([^=]*)=(.*)$/)
            {
                $varname = $1;
@@ -6724,7 +6727,7 @@ sub file_contents
                                 'BZIP2'    => $options{'dist-bzip2'},
                                 'ZIP'      => $options{'dist-zip'},
                                 'COMPRESS' => $options{'dist-tarZ'},
-                                'CK-NEWS' => defined $options{'check-news'});
+                                'CK-NEWS'  => $options{'check-news'});


     # Swallow the file and applied the COMMAND.
Index: 0.60/automake.in
--- 0.60/automake.in Tue, 20 Feb 2001 18:55:07 +0100 akim (am/f/39_automake.i 
1.54 755)
+++ 0.60(w)/automake.in Tue, 20 Feb 2001 18:57:52 +0100 akim 
(am/f/39_automake.i 1.54 755)
@@ -2293,7 +2293,7 @@

     my @texis = &variable_value_as_list ('info_TEXINFOS', 'all');

-    my @info_deps_list, @dvis_list, @texi_deps;
+    my (@info_deps_list, @dvis_list, @texi_deps);
     my %versions;
     my $done = 0;
     my @texi_cleans;
@@ -2302,7 +2302,8 @@
     {
        # FIXME: This is mildly hacky, since it recognizes "txinfo".
        # I don't feel like making it right.
-       my ($infobase = $info_cursor) =~ s/\.te?xi(nfo)?$//;
+       my $infobase = $info_cursor;
+       $infobase =~ s/\.te?xi(nfo)?$//;

        # If 'version.texi' is referenced by input file, then include
        # automatic versioning capability.
@@ -5765,7 +5766,7 @@
            # This isn't ideal, but people have requested it.
            next if ($varname =~ /address@hidden@/);

-           my $from, $to;
+           my ($from, $to);
            my @temp_list;
            if ($varname =~ /^([^:]*):([^=]*)=(.*)$/)
            {



reply via email to

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