[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
101-handle-languages-morphing-2.patch
From: |
Akim Demaille |
Subject: |
101-handle-languages-morphing-2.patch |
Date: |
Sun, 01 Apr 2001 21:56:39 +0200 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* automake.in (&handle_languages): Group code to be run once per
language together.
Index: automake.in
--- automake.in Thu, 29 Mar 2001 02:26:10 +0200 akim (am/f/39_automake.i 1.233
755)
+++ automake.in Thu, 29 Mar 2001 02:29:40 +0200 akim (am/f/39_automake.i 1.233
755)
@@ -1350,6 +1350,17 @@ sub handle_languages
{
my $lang = $languages{$extension_map{$ext}};
+ # Get information on $LANG.
+ my $pfx = $lang->autodep;
+ my $fpfx = ($pfx eq '') ? 'CC' : $pfx;
+ my $flag = $lang->flags || '';
+
+ # First include code for ordinary objects.
+ my %transform = ('PFX' => $pfx,
+ 'FPFX' => $fpfx,
+ 'LIBTOOL' => $seen_libtool,
+ 'AMDEP' => $use_dependencies ? 'AMDEP' : 'FALSE');
+
# 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.
@@ -1389,44 +1400,6 @@ sub handle_languages
if ($lang->autodep ne 'no')
{
- # Get information on $LANG.
- my $pfx = $lang->autodep;
- my $fpfx = ($pfx eq '') ? 'CC' : $pfx;
- my $flag = $lang->flags || '';
-
- # First include code for ordinary objects.
- my %transform = ('PFX' => $pfx,
- 'FPFX' => $fpfx,
- 'LIBTOOL' => $seen_libtool,
- 'AMDEP' => $use_dependencies ? 'AMDEP' :
'FALSE');
-
- # This function can be called even when we don't want dependency
- # tracking. This happens when we need an explicit rule for some
- # target. In this case we don't want to include the generic code.
- if ($use_dependencies)
- {
- 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");
- }
- }
-
# Now include code for each specially handled object with this
# language.
my %seen_files = ();
@@ -1463,6 +1436,33 @@ sub handle_languages
# The rest of the loop is done once per language.
next if defined $done{$lang};
$done{$lang} = 1;
+
+ # This function can be called even when we don't want dependency
+ # tracking. This happens when we need an explicit rule for some
+ # target. In this case we don't want to include the generic code.
+ if ($lang->autodep ne 'no' && $use_dependencies)
+ {
+ 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");
+ }
+ }
# If the source to a program consists entirely of code from a
# `pure' language, for instance C++ for Fortran 77, then we
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 101-handle-languages-morphing-2.patch,
Akim Demaille <=