automake
[Top][All Lists]
Advanced

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

48-formying.patch


From: Akim Demaille
Subject: 48-formying.patch
Date: Wed, 21 Feb 2001 18:23:48 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * automake.in: Formatting and mying changes.
        
        
Index: automake.in
--- automake.in Tue, 20 Feb 2001 19:41:10 +0100 akim (am/f/39_automake.i 1.56 
755)
+++ automake.in Tue, 20 Feb 2001 20:26:36 +0100 akim (am/f/39_automake.i 1.56 
755)
@@ -2582,8 +2582,7 @@ sub handle_tags
        || @tag_deps)
     {
        local ($config) = '';
-       local ($one_hdr);
-       foreach $one_hdr (@config_headers)
+       foreach my $one_hdr (@config_headers)
        {
            if ($relative_dir eq dirname ($one_hdr))
            {
@@ -2820,7 +2819,7 @@ sub handle_dist
 # `depend2' with appropriate transformations.
 sub add_depend2
 {
-    local ($lang) = @_;
+    my ($lang) = @_;
 
     # Get information on $LANG.
     my $pfx = $language_map{"$lang-autodep"};
@@ -2828,11 +2827,10 @@ sub add_depend2
     my $flag = $language_map{"$lang-flags"};
 
     # First include code for ordinary objects.
-    my ($xform, $ext);
-    $xform = &transform ('PFX'  => $pfx,
-                        'FPFX' => $fpfx);
-    $xform .= &transform_cond ('OBJEXT'  => $seen_objext,
-                              'LIBTOOL' => $seen_libtool);
+    my $xform = (&transform ('PFX'  => $pfx,
+                            'FPFX' => $fpfx)
+                . &transform_cond ('OBJEXT'  => $seen_objext,
+                                   'LIBTOOL' => $seen_libtool));
 
     # This function can be called even when we don't want dependency
     # tracking.  This happens when we need an explicit rule for some
@@ -2850,7 +2848,7 @@ sub add_depend2
                                    'COMPILE'   => $compile,
                                    'LTCOMPILE' => $ltcompile));
 
-       foreach $ext (&lang_extensions ($lang))
+       foreach my $ext (&lang_extensions ($lang))
        {
            $output_rules .= (&file_contents ('depend2',
                                              &transform ('EXT' => $ext)
@@ -2872,7 +2870,7 @@ sub add_depend2
        $xform .= 's/address@hidden@.*$//;';
     }
 
-    local (%seen_files) = ();
+    my %seen_files = ();
     while ($i < $max)
     {
        $derived = $list[$i];
@@ -2946,8 +2944,7 @@ sub handle_dependencies
 
            &require_config_file ($FOREIGN, 'depcomp');
 
-           local ($iter);
-           local (@deplist) = sort keys %dep_files;
+           my @deplist = sort keys %dep_files;
 
            # We define this as a conditional variable because BSD
            # make can't handle backslashes for continuing comments on
@@ -2959,7 +2956,7 @@ sub handle_dependencies
            # variable expansion; generating many separate includes
            # seems safest.
            $output_rules .= "\n";
-           foreach $iter (@deplist)
+           foreach my $iter (@deplist)
            {
                $output_rules .= "address@hidden@address@hidden@ " . $iter . 
"\n";
            }
@@ -2972,8 +2969,7 @@ sub handle_dependencies
        &define_variable ('depcomp', '');
     }
 
-    local ($key, $lang, $ext, $xform);
-    foreach $key (sort keys %language_map)
+    foreach my $key (sort keys %language_map)
     {
        next unless $key =~ /^(.*)-autodep$/;
        next if $language_map{$key} eq 'no';
@@ -2987,8 +2983,7 @@ sub handle_subdirs
     return if ! &variable_defined ('SUBDIRS');
 
     # Make sure each directory mentioned in SUBDIRS actually exists.
-    local ($dir);
-    foreach $dir (&variable_value_as_list ('SUBDIRS', 'all'))
+    foreach my $dir (&variable_value_as_list ('SUBDIRS', 'all'))
     {
        # Skip directories substituted by configure.
        next if $dir =~ /address@hidden@$/;
@@ -3004,12 +2999,12 @@ sub handle_subdirs
            if $dir =~ /\//;
     }
 
-    local ($xform) = ('s/address@hidden@/' .
-                     (defined $options{'no-installinfo'}
-                      ? 'install-info-recursive'
-                      : '')
-                     . '/;');
-    $output_rules .= &file_contents ('subdirs', $xform);
+    $output_rules .=
+      &file_contents ('subdirs',
+                     &transform
+                     ('INSTALLINFO' => (defined $options{'no-installinfo'}
+                                        ? 'install-info-recursive'
+                                        : '')));
 
     $recursive_install = 1;
 }
@@ -3196,9 +3191,10 @@ sub handle_configure
     }
     else
     {
-        local ($xform) = &transform ('CONFIGURE_AC' => $configure_ac);
        &handle_aclocal_m4;
-       $output_rules .= &file_contents ('remake', $xform);
+       $output_rules .=
+         &file_contents ('remake',
+                         &transform ('CONFIGURE_AC' => $configure_ac));
        &examine_variable ('CONFIG_STATUS_DEPENDENCIES');
        &examine_variable ('CONFIGURE_DEPENDENCIES');
        $top_reldir = '';
@@ -3208,12 +3204,11 @@ sub handle_configure
     }
 
     # If we have a configure header, require it.
-    local ($one_hdr);
     local (@local_fullnames) = @config_fullnames;
     local (@local_names) = @config_names;
     local ($hdr_index) = 0;
     local ($distclean_config) = '';
-    foreach $one_hdr (@config_headers)
+    foreach my $one_hdr (@config_headers)
     {
        local ($one_fullname) = shift (@local_fullnames);
        local ($one_name) = shift (@local_names);
@@ -3335,9 +3330,8 @@ sub handle_configure
                    "\`CONFIG_HEADER' is an anachronism; now determined from 
\`$configure_ac'")
        if &variable_defined ('CONFIG_HEADER');
 
-    local ($one_name);
     local ($config_header) = '';
-    foreach $one_name (@config_names)
+    foreach my $one_name (@config_names)
     {
        # Generate CONFIG_HEADER define.
        local ($one_hdr);
@@ -3363,8 +3357,8 @@ sub handle_configure
     local (@actual_other_files) = ();
     local ($file, $local);
     local (@inputs, @rewritten_inputs, $single);
-    local ($need_rewritten, $lfile);
-    foreach $lfile (@other_input_files)
+    local ($need_rewritten);
+    foreach my $lfile (@other_input_files)
     {
        if ($lfile =~ /^([^:]*):(.*)$/)
        {
@@ -3817,10 +3811,9 @@ sub do_check_merge_target
 sub handle_clean
 {
     my $xform = '';
-    my $name;
 
     # Don't include `MAINTAINER'; it is handled specially below.
-    foreach $name ('MOSTLY', '', 'DIST')
+    foreach my $name ('MOSTLY', '', 'DIST')
     {
       $xform .= &transform_cond ("${name}CLEAN"
                                 => &variable_defined ("${name}CLEANFILES"));
@@ -3965,7 +3958,7 @@ sub handle_tests
 # Handle Emacs Lisp.
 sub handle_emacs_lisp
 {
-    local (@elfiles) = &am_install_var ('-candist', 'lisp', 'LISP',
+    my @elfiles = &am_install_var ('-candist', 'lisp', 'LISP',
                                        'lisp', 'noinst');
 
     if (@elfiles)
@@ -4044,11 +4037,11 @@ sub handle_java
                      
'CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH');
     &define_variable ('JAVAROOT', '$(top_builddir)');
 
-    local (%valid) = &am_primary_prefixes ('JAVA', 1,
-                                          'java', 'noinst', 'check');
+    my %valid = &am_primary_prefixes ('JAVA', 1,
+                                     'java', 'noinst', 'check');
 
-    local ($dir, $curs);
-    foreach $curs (keys %valid)
+    my $dir;
+    foreach my $curs (keys %valid)
     {
        if (! &variable_defined ($curs . '_JAVA') || $curs eq 'EXTRA')
        {
@@ -4732,7 +4725,7 @@ sub lang_header_rewrite
 # Rewrite a single yacc file.
 sub lang_yacc_rewrite
 {
-    local ($directory, $base, $ext) = @_;
+    my ($directory, $base, $ext) = @_;
 
     local ($r) = &lang_c_rewrite ($directory, $base, $ext);
     local ($pfx) = '';
@@ -4751,7 +4744,7 @@ sub lang_yacc_rewrite
 # Rewrite a single yacc++ file.
 sub lang_yaccxx_rewrite
 {
-    local ($directory, $base, $ext) = @_;
+    my ($directory, $base, $ext) = @_;
 
     local ($r) = $LANG_PROCESS;
     local ($pfx) = '';
@@ -4771,7 +4764,7 @@ sub lang_yaccxx_rewrite
 # Rewrite a single lex file.
 sub lang_lex_rewrite
 {
-    local ($directory, $base, $ext) = @_;
+    my ($directory, $base, $ext) = @_;
 
     local ($r) = &lang_c_rewrite ($directory, $base, $ext);
     local ($pfx) = '';
@@ -4790,7 +4783,7 @@ sub lang_lex_rewrite
 # Rewrite a single lex++ file.
 sub lang_lexxx_rewrite
 {
-    local ($directory, $base, $ext) = @_;
+    my ($directory, $base, $ext) = @_;
 
     local ($r) = $LANG_PROCESS;
     local ($pfx) = '';
@@ -5399,7 +5392,7 @@ sub conditionals_true_when (@@)
 # or target is being defined conditionally.  If we already know about
 # a definition that is true under the same conditions, then we have an
 # ambiguity.
-sub check_ambiguous_conditional
+sub check_ambiguous_conditional ($$)
 {
     my ($var, $cond) = @_;
     foreach my $vcond (keys %{$conditional{$var}})
@@ -5417,9 +5410,9 @@ sub check_ambiguous_conditional
 # and the optional second argument is the condition which we should
 # check.  If no condition is given, we currently return true if the
 # variable is defined under any condition.
-sub variable_defined
+sub variable_defined ($$)
 {
-    local ($var, $cond) = @_;
+    my ($var, $cond) = @_;
     if (defined $targets{$var})
     {
        &am_line_error ($var, "\`$var' is target; expected variable");
@@ -5459,7 +5452,7 @@ sub variable_defined
 # Mark a variable as examined.
 sub examine_variable
 {
-    local ($var) = @_;
+    my ($var) = @_;
     &variable_defined ($var);
 }
 
@@ -5482,13 +5475,12 @@ sub examine_variable
 
 sub variable_conditions
 {
-    local ($var) = @_;
+    my ($var) = @_;
     local (%uniqify);
     local (@uniq_list);
-    local ($cond);
 
     %vars_scanned = ();
-    foreach $cond (&variable_conditions_sub ($var, '', ()))
+    foreach my $cond (&variable_conditions_sub ($var, '', ()))
     {
        $uniqify{$cond} = 1;
     }
@@ -5599,13 +5591,11 @@ sub variable_conditions_sub
     # already handled everything in @this_conds along with their
     # subvariables.  We now need to add any permutations that are not
     # in @this_conds.
-    local ($this_cond);
-    foreach $this_cond (@this_conds)
+    foreach my $this_cond (@this_conds)
     {
        local (@perms) =
            &variable_conditions_permutations (split('@', $this_cond));
-       local ($perm);
-       foreach $perm (@perms)
+       foreach my $perm (@perms)
        {
            local ($scan);
            local ($ok) = 1;
@@ -5650,8 +5640,7 @@ sub variable_conditions_reduce
 {
     local (@conds) = @_;
     local (@ret) = ();
-    local ($cond);
-    foreach $cond (sort variable_conditions_cmp @conds)
+    foreach my $cond (sort variable_conditions_cmp @conds)
     {
        next
          if ! conditionals_true_when (($cond), (@ret));
@@ -5864,7 +5853,7 @@ sub variable_value_as_list_worker
 # avoid infinite recursion.
 sub variable_value_as_list
 {
-    local ($var, $cond, $parent) = @_;
+    my ($var, $cond, $parent) = @_;
     %vars_scanned = ();
     return &variable_value_as_list_worker ($var, $cond, $parent);
 }
@@ -5875,7 +5864,7 @@ sub variable_value_as_list
 # Define a new variable VAR to VALUE, but only if not already defined.
 sub define_variable
 {
-    local ($var, $value) = @_;
+    my ($var, $value) = @_;
 
     if (! defined $contents{$var})
     {
@@ -5915,8 +5904,8 @@ sub define_pretty_variable
 # substitution by the same name.
 sub define_configure_variable
 {
-    local ($var) = @_;
-    local ($value) = '@' . $var . '@';
+    my ($var) = @_;
+    my $value = '@' . $var . '@';
     &define_variable ($var, $value);
 }
 
@@ -6723,7 +6712,6 @@ sub file_contents
                                 'ZIP'      => $options{'dist-zip'},
                                 'COMPRESS' => $options{'dist-tarZ'},
                                 'CK-NEWS'  => $options{'check-news'});
-
 
     # Swallow the file and applied the COMMAND.
     my $file = $am_dir . '/' . $basename . '.am';
Index: lisp.am
--- lisp.am Fri, 09 Feb 2001 04:37:00 +0100 akim (am/g/29_lisp.am 1.4 644)
+++ lisp.am Tue, 20 Feb 2001 20:16:41 +0100 akim (am/g/29_lisp.am 1.4 644)
@@ -15,6 +15,7 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
 address@hidden@LISP: $(@address@hidden) $(ELCFILES)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(@address@hidden)
Index: python.am
--- python.am Sat, 13 Jan 2001 18:11:09 +0100 akim (am/g/19_python.am 1.1 644)
+++ python.am Tue, 20 Feb 2001 20:17:17 +0100 akim (am/g/19_python.am 1.1 644)
@@ -15,6 +15,7 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
 address@hidden@PYTHON: $(@address@hidden)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(@address@hidden)
Index: subdirs.am
--- subdirs.am Sun, 04 Feb 2001 15:28:52 +0100 akim (am/g/14_subdirs.am 1.5 644)
+++ subdirs.am Tue, 20 Feb 2001 19:54:44 +0100 akim (am/g/14_subdirs.am 1.5 644)
@@ -16,6 +16,7 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
+
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
 # To change the values of `make' variables: instead of editing Makefiles,



reply via email to

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