[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
30-simplify-contents-traces.patch
From: |
Akim Demaille |
Subject: |
30-simplify-contents-traces.patch |
Date: |
Sun, 11 Mar 2001 19:08:30 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* automake.in (&handle_source_transform, &read_main_am_file):
Simplify loops which were split in two parts, conditional vs
unconditional variables.
Index: automake.in
--- automake.in Sat, 10 Mar 2001 17:12:12 +0100 akim (am/f/39_automake.i 1.148
755)
+++ automake.in Sat, 10 Mar 2001 17:38:38 +0100 akim (am/f/39_automake.i 1.148
755)
@@ -1898,39 +1898,21 @@ sub handle_source_transform
unless $prefix =~ /EXTRA_/;
push (@dist_sources, '$(' . $prefix . $one_file . "_SOURCES)")
unless $prefix =~ /^nodist_/;
- my @conds = &variable_conditions ($var);
- if (! @conds)
- {
- @files = &variable_value_as_list ($var, '');
- }
- else
- {
- foreach my $cond (@conds)
- {
- @files = &variable_value_as_list ($var, $cond);
- ($temp, @result) =
- &handle_single_transform_list ($var, $one_file, $obj,
- @files);
- $linker = $temp if $linker eq '';
-
- # Define _OBJECTS conditionally.
- &define_pretty_variable ($xpfx . $one_file . '_OBJECTS',
- $cond, @result)
- unless $prefix =~ /EXTRA_/;
- }
-
- next;
- }
+ variable_dump ($var);
+ foreach my $cond (keys %{$conditional{$var}})
+ {
+ @files = &variable_value_as_list ($var, $cond);
+ ($temp, @result) =
+ &handle_single_transform_list ($var, $one_file, $obj,
+ @files);
+ $linker = $temp if $linker eq '';
+
+ # Define _OBJECTS conditionally.
+ &define_pretty_variable ($xpfx . $one_file . '_OBJECTS',
+ $cond, @result)
+ unless $prefix =~ /EXTRA_/;
+ }
}
-
- # Avoid defining needless variables.
- next if (scalar @files == 0);
-
- ($temp, @result) = &handle_single_transform_list ($var, $one_file,
- $obj, @files);
- $linker = $temp if $linker eq '';
- &define_pretty_variable ($xpfx . $one_file . "_OBJECTS", '', @result)
- unless $prefix =~ /EXTRA_/;
}
my @keys = sort keys %used_pfx;
@@ -6617,28 +6599,22 @@ sub read_main_am_file
if $done{$var};
$done{$var} = 1;
+ variable_dump ($var);
# Don't process Automake variables.
next
if $var_is_am{$var};
$output_vars .= $am_vars{$var};
- if ($conditional{$var})
- {
- foreach my $vcond (sort by_condition keys %{$conditional{$var}})
- {
- my $val = ${$conditional{$var}}{$vcond};
- my $output_var = ($var . ' '
- . $def_type{$var} . "= "
- . $val);
- $output_var =~ s/^/&make_condition ($vcond)/meg;
- $output_vars .= $output_var . "\n";
- }
- }
- else
- {
- $output_vars .= ($var . ' ' . $def_type{$var} . '= '
- . variable_value ($var) . "\n");
- }
+
+ foreach my $vcond (sort by_condition keys %{$conditional{$var}})
+ {
+ my $val = $conditional{$var}{$vcond};
+ my $output_var = ($var . ' '
+ . $def_type{$var} . "= "
+ . $val);
+ $output_var =~ s/^/&make_condition ($vcond)/meg;
+ $output_vars .= $output_var . "\n";
+ }
}
# Generate copyright header for generated Makefile.in.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 30-simplify-contents-traces.patch,
Akim Demaille <=