+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.
# 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 ()
# ------------------------
# 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 = ();
}
# 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')
my $renamed = 0;
$extension = &derive_suffix ($extension);
- $lang = $extension_map{$extension};
+ my $lang = $extension_map{$extension};
if ($lang)
{
&saw_extension ($extension);
}
# 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')))
# (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 '';
{
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;
$_ = $fc_file->getline;
$/ = $saved_dollar_slash;
eval $command;
- $contents = $_;
-
$fc_file->close;
+ my $contents = $_;
# Process each Make `paragraph'.
my $result_vars = '';
my $result_rules = '';
my $comment = '';
+ my $separator = '';
foreach (split (/(?<!\\)\n(?![\t#])/, $contents))
{
# Strip leading new lines. This can happen for comments:
}
else
{
- my $condvals = '';
+ my @condvals;
foreach my $cond (@conds)
{
my @one_binlist = ();
while (@condvals)
{
- $cond = shift (@condvals);
+ my $cond = shift (@condvals);
my @val = split (' ', shift (@condvals));
&define_pretty_variable ($one_name, $cond, @val);
}
# 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