Index: ChangeLog
>From Akim Demaille <[EMAIL PROTECTED]>
* automake.in (&handle_languages): Compute `$ltoutarg' and
`$outarg' independently from dependency code.
There is no use looping on a language's possible extensions since
we loop over used extensions.
Therefore, there is no use for a local `%transform'.
Index: automake.in
--- automake.in Thu, 29 Mar 2001 02:43:06 +0200 akim (am/f/39_automake.i 1.236 755)
+++ automake.in Sat, 31 Mar 2001 00:11:10 +0200 akim (am/f/39_automake.i 1.237 755)
@@ -1361,6 +1361,19 @@
'LIBTOOL' => $seen_libtool,
'AMDEP' => $use_dependencies ? 'AMDEP' : 'FALSE');
+ my $outarg = $lang->output_arg;
+ my $ltoutarg = '';
+ if ($lang->flags eq 'CFLAGS')
+ {
+ # C compilers don't always support -c -o.
+ if (defined $options{'subdir-objects'})
+ {
+ $outarg .= ' -o $@';
+ }
+ # We can always use -c -o with libtool.
+ $ltoutarg = ' -o $@';
+ }
+
# Generate the appropriate rules for this extension. If
# dependency tracking was requested, and this extension
# supports it, then we don't generate the rule here.
@@ -1368,40 +1381,22 @@
{
my $compile = '$(' . $pfx . 'COMPILE)';
my $ltcompile = '$(LT' . $pfx . 'COMPILE)';
- my %transform = (%transform,
- 'GENERIC' => 1,
- 'BASE' => '$*',
- 'SOURCE' => '$<',
- 'OBJ' => '$@',
- 'LTOBJ' => '$@',
- 'OBJOBJ' => '$@',
- 'COMPILE' => $compile,
- 'LTCOMPILE' => $ltcompile);
- foreach my $ext (grep ($extension_seen{$_},
- @{$lang->extensions}))
- {
- $output_rules .= (&file_contents ('depend2',
- (%transform,
- 'EXT' => $ext))
- . "\n");
- }
+ $output_rules .= (&file_contents ('depend2',
+ (%transform,
+ 'GENERIC' => 1,
+ 'BASE' => '$*',
+ 'SOURCE' => '$<',
+ 'OBJ' => '$@',
+ 'LTOBJ' => '$@',
+ 'OBJOBJ' => '$@',
+ 'COMPILE' => $compile,
+ 'LTCOMPILE' => $ltcompile,
+ 'EXT' => $ext))
+ . "\n");
}
elsif (defined $lang->compile)
{
- my $outarg = $lang->output_arg;
- my $ltoutarg = '';
- if ($lang->flags eq 'CFLAGS')
- {
- # C compilers don't always support -c -o.
- if (defined $options{'subdir-objects'})
- {
- $outarg .= ' -o $@';
- }
- # We can always use -c -o with libtool.
- $ltoutarg = ' -o $@';
- }
-
$output_rules .= file_contents ('ext-compile',
('EXT' => $ext,
'COMPILER' => $lang->compiler,