[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
115-define-compiler-var.patch
From: |
Akim Demaille |
Subject: |
115-define-compiler-var.patch |
Date: |
Sun, 01 Apr 2001 21:57:51 +0200 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* automake.in (&define_compiler_variables): Use only $LANG as
argument.
(&handle_languages): Adjust.
Index: automake.in
--- automake.in Sun, 01 Apr 2001 20:26:46 +0200 akim (am/f/39_automake.i 1.250
755)
+++ automake.in Sun, 01 Apr 2001 20:37:08 +0200 akim (am/f/39_automake.i 1.250
755)
@@ -1454,17 +1454,12 @@ sub handle_languages
# People linking Java code to Fortran code deserve pain.
$needs_c ||= ! $lang->pure;
- if ($lang->compile)
- {
- &define_compiler_variable ($lang->compiler,
- $ltcompile, $lang->compile);
- }
+ define_compiler_variable ($lang)
+ if ($lang->compile);
# The compiler's flag must be a configure variable.
- if (defined $lang->flags)
- {
- &define_configure_variable ($lang->flags);
- }
+ define_configure_variable ($lang->flags)
+ if (defined $lang->flags);
# Call the finisher.
$lang->finish;
@@ -1481,9 +1476,7 @@ sub handle_languages
if (! defined $done{$languages{'c'}})
{
&define_configure_variable ($languages{'c'}->flags);
- &define_compiler_variable ($languages{'c'}->compiler,
- $ltcompile,
- $languages{'c'}->compile);
+ &define_compiler_variable ($languages{'c'});
}
&define_variable ('CCLD', '$(CC)');
&define_variable ('LINK',
@@ -4992,7 +4985,6 @@ sub libtool_compiler
my ($ltcompile, $ltlink) = ('', '');
if ($seen_libtool)
{
- &define_configure_variable ("LIBTOOL");
$ltcompile = '$(LIBTOOL) --mode=compile ';
$ltlink = '$(LIBTOOL) --mode=link ';
}
@@ -6087,15 +6079,19 @@ sub define_configure_variable
&define_variable ($var, $value);
}
+
+# define_compiler_variable ($LANG)
+# --------------------------------
# Define a compiler variable. We also handle defining the `LT'
# version of the command when using libtool.
-sub define_compiler_variable
+sub define_compiler_variable ($)
{
- my ($var, $ltcompile, $value) = @_;
- my $name = $var;
- &define_variable ($name, $value);
- &define_variable ('LT' . $name, $ltcompile . $value)
- if $seen_libtool;
+ my ($lang) = @_;
+
+ my ($var, $value) = ($lang->compiler, $lang->compile);
+ &define_variable ($var, $value);
+ &define_variable ("LT$var", "$(LIBTOOL) --mode=compile $value")
+ if $seen_libtool;
}
################################################################
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 115-define-compiler-var.patch,
Akim Demaille <=