From 32fb9b85dba7c38ed66b59614e6b81df63363b9c Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 7 May 2001 17:51:54 +0000 Subject: [PATCH] * 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'. --- ChangeLog | 8 ++++++++ automake.in | 57 ++++++++++++++++++++++++----------------------------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0cedf8b0..d0bc360a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-05-07 Akim Demaille + + * 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'. + 2001-05-07 Akim Demaille * automake.in (&handle_languages): Don't use $comp. diff --git a/automake.in b/automake.in index 9f84783c..732dfd95 100755 --- a/automake.in +++ b/automake.in @@ -1389,6 +1389,19 @@ sub handle_languages '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. @@ -1396,40 +1409,22 @@ sub handle_languages { 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, -- 2.43.5