From: Akim Demaille Date: Mon, 5 Mar 2001 14:30:28 +0000 (+0000) Subject: * automake.in (%am_vars, @var_list, %def_type): Globals. X-Git-Tag: handle-languages~189 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=e9acd39311185b331fe6cf8f1512dd21319f2a83;p=automake.git * 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. --- diff --git a/ChangeLog b/ChangeLog index cf8f48d6..2b7498aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2001-03-05 Akim Demaille + + * 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 * automake.in (&initialize_per_input): Move to the top. diff --git a/automake.in b/automake.in index 22d13426..3630c786 100755 --- a/automake.in +++ b/automake.in @@ -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 (/(?