From: Akim Demaille Date: Mon, 7 May 2001 17:51:54 +0000 (+0000) Subject: * automake.in (&handle_languages): Compute `$ltoutarg' and X-Git-Tag: Release-1-4f~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e81d04037e465fa85ac8812f581020633d6bdf2;p=thirdparty%2Fautomake.git * 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'. --- diff --git a/ChangeLog b/ChangeLog index 0cedf8b0a..d0bc360a9 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 9f84783c7..732dfd95c 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,