automake
[Top][All Lists]
Advanced

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

57-my-last-mying-changes.patch


From: Akim Demaille
Subject: 57-my-last-mying-changes.patch
Date: Thu, 22 Feb 2001 22:03:33 +0100

Six, six for them! (I'm not counting those for file handles, which
perl refuses as my, not sure to understand why).


Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * automake.in: Mying changes.
        * Makefile.am (maintainer-check): Check the stability of the
        number of uses of `local'.

Index: Makefile.am
--- Makefile.am Mon, 19 Feb 2001 02:58:32 +0100 akim (am/f/46_Makefile.a 1.8 
644)
+++ Makefile.am Thu, 22 Feb 2001 21:57:20 +0100 akim (am/f/46_Makefile.a 1.8 
644)
@@ -109,6 +109,25 @@
          echo "Using @_ in a scalar context in the lines above." 1>&2; \
          exit 1; \
        fi
+## Forbid using parens with `local' to ease counting.
+       @if grep '^[ \t]*local *(' $(srcdir)/automake.in; then \
+         echo "Don't use \`local' with parens: use several \`local' above." 
>&2; \
+         exit 1; \
+       fi
+## Up to now we manage to limit to 6 uses of local.
+       @locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \
+       case $$locals in \
+         [0-5] ) \
+           echo "Wow, congrats!  There are $$locals \`local' now!." >&2; \
+           echo "Please update Makefile.am (maintainer-check)." >&2; \
+         ;; \
+         6 ) ;; \
+         * ) \
+           echo "Too many \`local'!  Are you sure you need $$locals of them?" 
>&2; \
+           echo "Up to now 6 was enough." >&2; \
+           exit 1; \
+         ;; \
+       esac

 # Tag before making distribution.  Also, don't make a distribution if
 # checks fail.  Also, make sure the NEWS file is up-to-date.
Index: Makefile.in
--- Makefile.in Wed, 21 Feb 2001 21:04:28 +0100 akim (am/h/16_Makefile.i 1.18 
644)
+++ Makefile.in Thu, 22 Feb 2001 21:57:23 +0100 akim (am/h/16_Makefile.i 1.18 
644)
@@ -659,6 +659,23 @@
          echo "Using @_ in a scalar context in the lines above." 1>&2; \
          exit 1; \
        fi
+       @if grep '^[ \t]*local *(' $(srcdir)/automake.in; then \
+         echo "Don't use \`local' with parens: use several \`local' above." 
>&2; \
+         exit 1; \
+       fi
+       @locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \
+       case $$locals in \
+         [0-5] ) \
+           echo "Wow, congrats!  There are $$locals \`local' now!." >&2; \
+           echo "Please update Makefile.am (maintainer-check)." >&2; \
+         ;; \
+         6 ) ;; \
+         * ) \
+           echo "Too many \`local'!  Are you sure you need $$locals of them?" 
>&2; \
+           echo "Up to now 6 was enough." >&2; \
+           exit 1; \
+         ;; \
+       esac

 # Tag before making distribution.  Also, don't make a distribution if
 # checks fail.  Also, make sure the NEWS file is up-to-date.
Index: automake.in
--- automake.in Thu, 22 Feb 2001 21:07:21 +0100 akim (am/f/39_automake.i 1.64 
755)
+++ automake.in Thu, 22 Feb 2001 21:47:54 +0100 akim (am/f/39_automake.i 1.64 
755)
@@ -4117,7 +4117,7 @@ sub scan_autoconf_config_files
 sub scan_autoconf_traces
 {
     my ($filename) = @_;
-    local (*TRACES);
+    local *TRACES;

     my $traces = "$ENV{amtraces} ";

@@ -4176,7 +4176,7 @@ sub scan_autoconf_traces
 sub scan_one_autoconf_file
 {
     my ($filename) = @_;
-    local (*CONFIGURE);
+    local *CONFIGURE;

     open (CONFIGURE, $filename)
        || die "automake: couldn't open \`$filename': $!\n";
@@ -4518,7 +4518,8 @@ sub scan_autoconf_files
     %libsources = ();

     # Watchout: these guys need dynamic scope!
-    local (%make_list, @make_input_list);
+    local %make_list;
+    local @make_input_list;

     warn "automake: both \`configure.ac' and \`configure.in' present:"
          . " ignoring \`configure.in'\n"
@@ -4563,7 +4564,8 @@ sub scan_autoconf_files
     # check must be done for every run, even those where we are only
     # looking at a subdir Makefile.  We must set relative_dir so that
     # the file-finding machinery works.
-    local ($relative_dir) = '.';
+    # Needs dynamic scopes.
+    local $relative_dir = '.';
     &require_config_file ($FOREIGN, 'install-sh', 'mkinstalldirs', 'missing');
     &am_error ("\`install.sh' is an anachronism; use \`install-sh' instead")
         if -f $config_aux_path[0] . '/install.sh';
@@ -4657,7 +4659,7 @@ sub lang_sub_obj
 # Rewrite a single C source file.
 sub lang_c_rewrite
 {
-    local ($directory, $base, $ext) = @_;
+    my ($directory, $base, $ext) = @_;

     if (defined $options{'ansi2knr'} && $base =~ /_$/)
     {
@@ -4665,7 +4667,7 @@ sub lang_c_rewrite
        &am_error ("C source file \`$base.c' would be deleted by ansi2knr 
rules");
     }

-    local ($r) = $LANG_PROCESS;
+    my $r = $LANG_PROCESS;
     if (defined $options{'subdir-objects'})
     {
        $r = $LANG_SUBDIR;
@@ -4705,8 +4707,8 @@ sub lang_yacc_rewrite
 {
     my ($directory, $base, $ext) = @_;

-    local ($r) = &lang_c_rewrite ($directory, $base, $ext);
-    local ($pfx) = '';
+    my $r = &lang_c_rewrite ($directory, $base, $ext);
+    my $pfx = '';
     if ($r == $LANG_SUBDIR)
     {
        $pfx = $directory . '/';
@@ -4724,8 +4726,8 @@ sub lang_yaccxx_rewrite
 {
     my ($directory, $base, $ext) = @_;

-    local ($r) = $LANG_PROCESS;
-    local ($pfx) = '';
+    my $r = $LANG_PROCESS;
+    my $pfx = '';
     if (defined $options{'subdir-objects'})
     {
        $pfx = $directory . '/';
@@ -4744,8 +4746,8 @@ sub lang_lex_rewrite
 {
     my ($directory, $base, $ext) = @_;

-    local ($r) = &lang_c_rewrite ($directory, $base, $ext);
-    local ($pfx) = '';
+    my $r = &lang_c_rewrite ($directory, $base, $ext);
+    my $pfx = '';
     if ($r == $LANG_SUBDIR)
     {
        $pfx = $directory . '/';
@@ -4763,8 +4765,8 @@ sub lang_lexxx_rewrite
 {
     my ($directory, $base, $ext) = @_;

-    local ($r) = $LANG_PROCESS;
-    local ($pfx) = '';
+    my $r = $LANG_PROCESS;
+    my $pfx = '';
     if (defined $options{'subdir-objects'})
     {
        $pfx = $directory . '/';
@@ -4870,7 +4872,7 @@ sub lang_c_finish

 sub lang_cxx_finish
 {
-    local ($ltcompile, $ltlink) = &libtool_compiler;
+    my ($ltcompile, $ltlink) = &libtool_compiler;

     &define_variable ('CXXLD', '$(CXX)');
     &define_variable ('CXXLINK', $ltlink . '$(CXXLD) $(AM_CXXFLAGS) 
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@');
@@ -4912,10 +4914,9 @@ sub lang_yacc_finish
     return if defined $language_scratch{'yacc-done'};
     $language_scratch{'yacc-done'} = 1;

-    local ($base, $hname, $cname);
-    local (%seen_suffix) = ();
-    local (@yacc_files) = sort keys %yacc_sources;
-    local ($yacc_count) = scalar (@yacc_files);
+    my %seen_suffix = ();
+    my @yacc_files = sort keys %yacc_sources;
+    my $yacc_count = scalar (@yacc_files);
     foreach my $file (@yacc_files)
     {
        $file =~ /(\..*)$/;
@@ -4924,9 +4925,10 @@ sub lang_yacc_finish
        $seen_suffix{$1} = 1;

        $file =~ /^(.*)\.(y|yy|y\+\+|yxx|ypp)$/;
-       $base = $1;
-       $hname = 'h';           # Always use `.h' for header file.
-       ($cname = $2) =~ tr/y/c/;
+       my $base = $1;
+       my $hname = 'h';                # Always use `.h' for header file.
+       my $cname = $2;
+       $cname =~ tr/y/c/;

        if ((&variable_defined ('AM_YFLAGS')
             && &variable_value ('AM_YFLAGS') =~ /(^|\s)-d(\s|$)/)
@@ -4976,8 +4978,7 @@ sub lang_lex_finish
     return if defined $language_scratch{'lex-done'};
     $language_scratch{'lex-done'} = 1;

-    local (%seen_suffix) = ();
-    my $cname;
+    my %seen_suffix = ();
     my $lex_count = scalar (keys %lex_sources);
     foreach my $file (sort keys %lex_sources)
     {
@@ -4993,6 +4994,7 @@ sub lang_lex_finish
        # should be removed by maintainer-clean.  So that's what we
        # do.
        $file =~ /^(.*)\.(l|ll|l\+\+|lxx|lpp)$/;
+       my $cname;
        ($cname = $2) =~ tr/l/c/;
        push (@maintainer_clean_files, "${1}.${cname}");
     }
@@ -5028,10 +5030,11 @@ sub lang_f77_finish
     # FIXME: this function can be called more than once.  We should
     # arrange for it to only do anything the first time through.

-    local ($ltcompile, $ltlink) = &libtool_compiler;
+    my ($ltcompile, $ltlink) = &libtool_compiler;

     &define_variable ('F77LD', '$(F77)');
-    &define_variable ('F77LINK', $ltlink . '$(F77LD) $(AM_FFLAGS) $(FFLAGS) 
$(AM_LDFLAGS) $(LDFLAGS) -o $@');
+    &define_variable ('F77LINK',
+                     $ltlink . '$(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) 
$(LDFLAGS) -o $@');

     if (! defined $configure_vars{'F77'})
     {
@@ -5075,7 +5078,7 @@ sub lang_ratfor_finish

 sub lang_objc_finish
 {
-    local ($ltcompile, $ltlink) = &libtool_compiler;
+    my ($ltcompile, $ltlink) = &libtool_compiler;

     &define_variable ('OBJCLD', '$(OBJC)');
     &define_variable ('OBJCLINK', $ltlink . '$(OBJCLD) $(AM_OBJCFLAGS) 
$(OBJCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@');
@@ -5088,7 +5091,7 @@ sub lang_objc_finish

 sub lang_java_finish
 {
-    local ($ltcompile, $ltlink) = &libtool_compiler;
+    my ($ltcompile, $ltlink) = &libtool_compiler;

     &define_variable ('GCJLD', '$(GCJ)');
     &define_variable ('GCJLINK', $ltlink . '$(GCJLD) $(AM_GCJFLAGS) 
$(GCJFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@');
@@ -5115,7 +5118,7 @@ sub lang_extensions
 # for compiler and linker.
 sub libtool_compiler
 {
-    local ($ltcompile, $ltlink) = ('', '');
+    my ($ltcompile, $ltlink) = ('', '');
     if ($seen_libtool)
     {
        &define_configure_variable ("LIBTOOL");
@@ -5131,7 +5134,7 @@ sub libtool_compiler
 # required.
 sub resolve_linker
 {
-    local (%linkers) = @_;
+    my (%linkers) = @_;

     return 'GCJLINK'
        if defined $linkers{'GCJLINK'};
@@ -5147,7 +5150,7 @@ sub resolve_linker
 # Called to indicate that an extension was used.
 sub saw_extension
 {
-    local ($ext) = @_;
+    my ($ext) = @_;
     $extension_seen{$ext} = 1;
 }

@@ -5163,7 +5166,7 @@ sub saw_sources_p
     }
     else
     {
-       local (@exts) = &lang_extensions ('header');
+       my @exts = &lang_extensions ('header');
        $headers = @exts;
     }

@@ -5204,7 +5207,7 @@ sub register_language
 # `o' or to some other suffix we recognize internally, eg `cc'.
 sub derive_suffix
 {
-    local ($source_ext) = @_;
+    my ($source_ext) = @_;

     # FIXME: hard-coding `o' is a mistake.  Doing something
     # intelligent is harder.
@@ -5234,10 +5237,10 @@ sub pretty_print_internal
     # Fill length is number of characters.  However, each Tab
     # character counts for eight.  So we count the number of Tabs and
     # multiply by 7.
-    local ($fill_length) = length ($fill);
+    my $fill_length = length ($fill);
     $fill_length += 7 * ($fill =~ tr/\t/\t/d);

-    local ($bol) = ($head eq '');
+    my $bol = $head eq '';
     foreach (@values)
     {
        # "71" because we also print a space.
@@ -5276,7 +5279,7 @@ sub pretty_print_rule
 # See if a target exists.
 sub target_defined
 {
-    local ($target) = @_;
+    my ($target) = @_;
     return defined $targets{$target};
 }

@@ -5452,8 +5455,8 @@ sub examine_variable
 sub variable_conditions
 {
     my ($var) = @_;
-    local (%uniqify);
-    local (@uniq_list);
+    my %uniqify;
+    my @uniq_list;

     %vars_scanned = ();
     foreach my $cond (&variable_conditions_sub ($var, '', ()))
@@ -5569,7 +5572,7 @@ sub variable_conditions_sub
     # in @this_conds.
     foreach my $this_cond (@this_conds)
     {
-       local (@perms) =
+       my @perms =
            &variable_conditions_permutations (split('@', $this_cond));
        foreach my $perm (@perms)
        {
@@ -5600,9 +5603,9 @@ sub variable_conditions_sub
 # Subroutine for variable_conditions_sort
 sub variable_conditions_cmp
 {
-    local ($as) = $a;
+    my $as = $a;
     $as =~ s/address@hidden//g;
-    local ($bs) = $b;
+    my $bs = $b;
     $bs =~ s/address@hidden//g;
     return (length ($as) <=> length ($bs)
            || $a cmp $b);
@@ -5613,8 +5616,8 @@ sub variable_conditions_cmp
 # @COND1_TRUE@ are in the list, discard the latter.
 sub variable_conditions_reduce
 {
-    local (@conds) = @_;
-    local (@ret) = ();
+    my (@conds) = @_;
+    my @ret = ();
     foreach my $cond (sort variable_conditions_cmp @conds)
     {
        next
@@ -5628,13 +5631,13 @@ sub variable_conditions_reduce
 # Return a list of permutations of a conditional string.
 sub variable_conditions_permutations
 {
-    local (@comps) = @_;
+    my (@comps) = @_;
     return ()
        if ! @comps;
-    local ($comp) = shift (@comps);
+    my $comp = shift (@comps);
     return &variable_conditions_permutations (@comps)
        if $comp eq '';
-    local ($neg) = $comp;
+    my $neg = $comp;
     $neg =~ s/TRUE$/TRUEO/;
     $neg =~ s/FALSE$/TRUE/;
     $neg =~ s/TRUEO$/FALSE/;
@@ -5676,7 +5679,7 @@ sub variable_conditionally_defined
 # if the variable is conditionally defined.
 sub variable_value
 {
-    local ($var) = @_;
+    my ($var) = @_;
     &variable_conditionally_defined ($var);
     return $contents{$var};
 }
@@ -5887,8 +5890,8 @@ sub define_configure_variable
 # version of the command when using libtool.
 sub define_compiler_variable
 {
-    local ($var, $ltcompile, $value) = @_;
-    local ($name) = $var;
+    my ($var, $ltcompile, $value) = @_;
+    my $name = $var;
     &define_variable ($name, $value);
     &define_variable ('LT' . $name, $ltcompile . $value)
        if $seen_libtool;
@@ -5906,7 +5909,7 @@ sub define_compiler_variable
 #            Cygnus mode.  Defaults to PROGRAM.
 sub define_program_variable
 {
-    local ($var, $whatdir, $subdir, $program, $override) = @_;
+    my ($var, $whatdir, $subdir, $program, $override) = @_;

     if (! $override)
     {
@@ -5915,8 +5918,8 @@ sub define_program_variable

     if ($cygnus_mode)
     {
-       local ($full) = ('$(top_' . $whatdir . 'dir)/../'
-                        . $subdir . '/' . $program);
+       my $full = ('$(top_' . $whatdir . 'dir)/../'
+                   . $subdir . '/' . $program);
        &define_variable ($var, ('`if test -f ' . $full
                                 . '; then echo ' . $full . '; else echo '
                                 . $program . '; fi`'));
@@ -5936,23 +5939,15 @@ sub define_program_variable
 # user rules to come after our generated stuff.
 sub read_am_file
 {
-    local ($amfile) = @_;
-    local (*AM_FILE);
+    my ($amfile) = @_;
+    local *AM_FILE;

     open (AM_FILE, $amfile) || die "automake: couldn't open \`$amfile': $!\n";
     print "automake: reading $amfile\n" if $verbose;

-    local ($saw_bk) = 0;
-    local ($was_rule) = 0;
-    local ($spacing) = '';
-    local ($comment) = '';
-    local ($last_var_name) = '';
-    local ($blank) = 0;
-
-    # We save the conditional stack on entry, and then check to make
-    # sure it is the same on exit.  This lets us conditonally include
-    # other files.
-    local (@saved_cond_stack) = @conditional_stack;
+    my $spacing = '';
+    my $comment = '';
+    my $blank = 0;

     while (<AM_FILE>)
     {
@@ -5985,7 +5980,15 @@ sub read_am_file
     $comment = '';
     $spacing = "\n";

-    local ($is_ok_macro);
+    # We save the conditional stack on entry, and then check to make
+    # sure it is the same on exit.  This lets us conditonally include
+    # other files.
+    my @saved_cond_stack = @conditional_stack;
+
+    my $saw_bk = 0;
+    my $was_rule = 0;
+    my $is_ok_macro;
+    my $last_var_name = '';
     while ($_)
     {
        $_ .= "\n"
@@ -6102,13 +6105,15 @@ sub read_am_file
            # Check the rule for being a suffix rule. If so, store in
            # a hash.

-           local ($source_suffix);
-           local ($object_suffix);
+           my $source_suffix;
+           my $object_suffix;

-           if (($source_suffix, $object_suffix) = ($1 =~ $SUFFIX_RULE_PATTERN))
+           if (($source_suffix, $object_suffix)
+               = ($1 =~ $SUFFIX_RULE_PATTERN))
            {
              $suffix_rules{$source_suffix} = $object_suffix;
-             print "Sources ending in .$source_suffix become 
.$object_suffix\n" if $verbose;
+             print "Sources ending in .$source_suffix become .$object_suffix\n"
+               if $verbose;
              $source_suffix_pattern = "(" . join ('|', keys %suffix_rules) . 
")";
            }

@@ -6129,7 +6134,7 @@ sub read_am_file
                &am_line_error ($1,
                                "$1 defined both conditionally and 
unconditionally");
            }
-           local ($value);
+           my $value;
            if ($3 ne '' && substr ($3, -1) eq "\\")
            {
                # We preserve the `\' because otherwise the long lines
@@ -6141,7 +6146,7 @@ sub read_am_file
            {
                $value = $3;
            }
-           local ($type) = $2;
+           my $type = $2;

            if (! defined $contents{$last_var_name})
            {
@@ -6222,7 +6227,7 @@ sub read_am_file
        }
         elsif (/$INCLUDE_PATTERN/o)
         {
-            local ($path) = $1;
+            my $path = $1;

             if ($path =~ s/^\$\(top_srcdir\)\///)
             {
@@ -6292,13 +6297,14 @@ sub define_standard_variables
 # Read main am file.
 sub read_main_am_file
 {
-    local ($amfile) = @_;
+    my ($amfile) = @_;

     # The keys here are variables we want to dump at the end of this
     # function.  The values are corresponding comments.
-    local (%am_vars) = ();
-    local (@var_list) = ();
-    local (%def_type) = ();
+    # 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")
@@ -6314,7 +6320,7 @@ sub read_main_am_file

     # First pass.
     &define_standard_variables;
-    local (%saved_contents) = %contents;
+    my %saved_contents = %contents;

     # Read user file, but discard text of variable assignments we just
     # made.
@@ -6680,7 +6686,7 @@ sub file_contents

     # Swallow into $CONTENTS the whole content of the file, after
     # having performed the $COMMAND, and removed Automake comments.
-    local ($contents) = '';
+    my $contents = '';

     while (<FC_FILE>)
     {
@@ -6992,7 +6998,7 @@ sub am_install_var
     # instance, if the variable "zardir" is defined, then
     # "zar_PROGRAMS" becomes valid.  This is to provide a little extra
     # flexibility in those cases which need it.
-    local (%valid) = &am_primary_prefixes ($primary, $can_dist, @prefixes);
+    my %valid = &am_primary_prefixes ($primary, $can_dist, @prefixes);

     # If a primary includes a configure substitution, then the EXTRA_
     # form is required.  Otherwise we can't properly do our job.
@@ -7097,7 +7103,7 @@ sub am_install_var
                }
                else
                {
-                   local ($condvals) = '';
+                   my $condvals = '';
                    foreach my $cond (@conds)
                    {
                        my @one_binlist = ();
@@ -7124,7 +7130,7 @@ sub am_install_var
                    while (@condvals)
                    {
                        $cond = shift (@condvals);
-                       local (@val) = split (' ', shift (@condvals));
+                       my @val = split (' ', shift (@condvals));
                        &define_pretty_variable ($one_name, $cond, @val);
                    }
                }
@@ -7208,7 +7214,7 @@ sub am_install_var

 sub is_make_dir
 {
-    local ($dir) = @_;
+    my ($dir) = @_;
     if (! $make_dirs_set)
     {
        foreach my $iter (@configure_input_files)
@@ -7242,7 +7248,7 @@ sub is_make_dir
 # encodes the rules for deciding when to do so.
 sub maybe_push_required_file
 {
-    local ($dir, $file, $fullfile) = @_;
+    my ($dir, $file, $fullfile) = @_;

     # FIXME: Once again, special-case `.'.
     if ($dir eq $relative_dir || $dir eq '.')
@@ -7326,18 +7332,18 @@ sub require_file_internal
                    unlink ($fullfile);
                }

-               local ($trailer) = '';
-               local ($suppress) = 0;
+               my $trailer = '';
+               my $suppress = 0;

                # Only install missing files according to our desired
                # strictness level.
-               local ($message) = "required file \`$errfile' not found";
+               my $message = "required file \`$errfile' not found";
                if ($add_missing)
                {
                    $suppress = 1;

                    # Maybe run libtoolize.
-                   local @syslist = ('libtoolize', '--automake');
+                   my @syslist = ('libtoolize', '--automake');
                    push @syslist, '--copy'
                        if $copy_missing;
                    if ($seen_libtool
@@ -7376,7 +7382,7 @@ sub require_file_internal
                                               $file, $errfile);
                }

-               local ($save) = $exit_status;
+               my $save = $exit_status;
                if ($is_configure)
                {
                    # FIXME: allow actual file to be specified.
@@ -7419,7 +7425,7 @@ sub require_config_file
 {
     @require_file_paths = @config_aux_path;
     &require_file_internal (1, '', @_);
-    local ($dir) = $require_file_paths[0];
+    my $dir = $require_file_paths[0];
     @config_aux_path = @require_file_paths;
     if ($dir eq '.')
     {
@@ -7436,7 +7442,7 @@ sub require_conf_file_with_line
 {
     @require_file_paths = @config_aux_path;
     &require_file_internal (0, @_);
-    local ($dir) = $require_file_paths[0];
+    my $dir = $require_file_paths[0];
     @config_aux_path = @require_file_paths;
     if ($dir eq '.')
     {
@@ -7453,7 +7459,7 @@ sub require_conf_file_with_conf_line
 {
     @require_file_paths = @config_aux_path;
     &require_file_internal (1, @_);
-    local ($dir) = $require_file_paths[0];
+    my $dir = $require_file_paths[0];
     @config_aux_path = @require_file_paths;
     if ($dir eq '.')
     {
@@ -7510,7 +7516,7 @@ sub set_strictness
 # Ensure a file exists.
 sub create
 {
-    local ($file) = @_;
+    my ($file) = @_;

     open (TOUCH, ">> $file");
     close (TOUCH);
@@ -7520,7 +7526,7 @@ sub create
 # want to glob.  Gross!
 sub my_glob
 {
-    local ($pat) = @_;
+    my ($pat) = @_;
     return <${pat}>;
 }

@@ -7576,11 +7582,11 @@ sub am_file_error

 sub am_line_error
 {
-    local ($symbol, @args) = @_;
+    my ($symbol, @args) = @_;

     if ($symbol && "$symbol" ne '-1')
     {
-       local ($file) = "${am_file}.am";
+       my $file = "${am_file}.am";

        if ($symbol =~ /^\d+$/)
        {
@@ -7623,7 +7629,7 @@ sub am_conf_error
 # Error message with line number referring to configure.ac.
 sub am_conf_line_error
 {
-    local ($file, $line, @args) = @_;
+    my ($file, $line, @args) = @_;

     if ($line)
     {
@@ -7640,7 +7646,7 @@ sub am_conf_line_error
 # Does not affect exit_status
 sub am_conf_line_warning
 {
-    local ($saved_exit_status) = $exit_status;
+    my $saved_exit_status = $exit_status;
     &am_conf_line_error (@_);
     $exit_status = $saved_exit_status;
 }
@@ -7648,7 +7654,7 @@ sub am_conf_line_warning
 # Tell user where our aclocal.m4 is, but only once.
 sub keyed_aclocal_warning
 {
-    local ($key) = @_;
+    my ($key) = @_;
     warn "automake: macro \`$key' can be generated by \`aclocal'\n";
 }

@@ -7684,8 +7690,6 @@ sub usage
       --force-missing   force update of standard files
 EOF

-    print "\nFiles which are automatically distributed, if found:\n";
-    $~ = "USAGE_FORMAT";
     my ($last, @lcomm);
     $last = '';
     foreach my $iter (sort ((@common_files, @common_sometimes)))
@@ -7694,10 +7698,16 @@ sub usage
        $last = $iter;
     }

-    local ($one, $two, $three, $four, $i, $max);
+    my ($one, $two, $three, $four, $max);
+    print "\nFiles which are automatically distributed, if found:\n";
+    format USAGE_FORMAT =
+  @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<
+  $one,               $two,               $three,             $four
+.
+    $~ = "USAGE_FORMAT";
     $max = int (($#lcomm + 1) / 4);

-    for ($i = 0; $i < $max; ++$i)
+    for (my $i = 0; $i < $max; ++$i)
     {
        $one = $lcomm[$i];
        $two = $lcomm[$max + $i];
@@ -7706,7 +7716,7 @@ sub usage
        write;
     }

-    local ($mod) = ($#lcomm + 1) % 4;
+    my $mod = ($#lcomm + 1) % 4;
     if ($mod != 0)
     {
        $one = $lcomm[$max];
@@ -7720,8 +7730,3 @@ sub usage

     exit 0;
 }
-
-format USAGE_FORMAT =
-  @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<
-  $one,               $two,               $three,             $four
-.



reply via email to

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