[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] start acknowledging host building
From: |
Warren Turkal |
Subject: |
[PATCH] start acknowledging host building |
Date: |
Sun, 11 Jan 2004 20:19:41 -0600 |
User-agent: |
KNode/0.7.2 |
This is an updated patch that starts recognizing that automake is actually
doing host targetted builds. I updated this after Alexandre Duret-Lutz
replied to my other message.
This was generated with automake 1.8. I have not aquired 1.8.1 yet.
wt
--- automake.in.old 2003-12-08 11:53:57.000000000 -0600
+++ automake.in 2004-01-11 20:11:48.000000000 -0600
@@ -61,10 +61,10 @@
'autodep' => "\$",
- # Name of the compiling variable (COMPILE).
- 'compiler' => "\$",
- # Content of the compiling variable.
- 'compile' => "\$",
+ # Name of the host compiling variable (COMPILE).
+ 'host_compiler' => "\$",
+ # Content of the host compiling variable.
+ 'host_compile' => "\$",
# Flag to require compilation without linking (-c).
'compile_flag' => "\$",
'extensions' => '@',
@@ -80,15 +80,15 @@
# The default is 'depend2'.
'rule_file' => "\$",
- # Name of the linking variable (LINK).
- 'linker' => "\$",
- # Content of the linking variable.
- 'link' => "\$",
-
- # Name of the linker variable (LD).
- 'lder' => "\$",
- # Content of the linker variable ($(CC)).
- 'ld' => "\$",
+ # Name of the host linking variable (LINK).
+ 'host_linker' => "\$",
+ # Content of the host linking variable.
+ 'host_link' => "\$",
+
+ # Name of the host linker variable (LD).
+ 'host_lder' => "\$",
+ # Content of the host linker variable ($(CC)).
+ 'host_ld' => "\$",
# Flag to specify the output file (-o).
'output_flag' => "\$",
@@ -655,12 +655,12 @@
'ansi' => 1,
'autodep' => '',
'flags' => ['CFLAGS', 'CPPFLAGS'],
- 'compiler' => 'COMPILE',
- 'compile' => '$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)',
- 'lder' => 'CCLD',
- 'ld' => '$(CC)',
- 'linker' => 'LINK',
- 'link' => '$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o
$@',
+ 'host_compiler' => 'COMPILE',
+ 'host_compile' => '$(CC) $(DEFS) $(DEFAULT_INCLUDES)
$(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)',
+ 'host_lder' => 'CCLD',
+ 'host_ld' => '$(CC)',
+ 'host_linker' => 'LINK',
+ 'host_link' => '$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o $@',
'compile_flag' => '-c',
'extensions' => ['.c'],
'_finish' => \&lang_c_finish);
@@ -669,16 +669,16 @@
register_language ('name' => 'cxx',
'Name' => 'C++',
'config_vars' => ['CXX'],
- 'linker' => 'CXXLINK',
- 'link' => '$(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o $@',
+ 'host_linker' => 'CXXLINK',
+ 'host_link' => '$(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS)
$(AM_LDFLAGS)
$(LDFLAGS) -o $@',
'autodep' => 'CXX',
'flags' => ['CXXFLAGS', 'CPPFLAGS'],
- 'compile' => '$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)',
- 'compiler' => 'CXXCOMPILE',
+ 'host_compile' => '$(CXX) $(DEFS) $(DEFAULT_INCLUDES)
$(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)',
+ 'host_compiler' => 'CXXCOMPILE',
'compile_flag' => '-c',
'output_flag' => '-o',
- 'lder' => 'CXXLD',
- 'ld' => '$(CXX)',
+ 'host_lder' => 'CXXLD',
+ 'host_ld' => '$(CXX)',
'pure' => 1,
'extensions' => ['.c++', '.cc', '.cpp', '.cxx', '.C']);
@@ -686,16 +686,16 @@
register_language ('name' => 'objc',
'Name' => 'Objective C',
'config_vars' => ['OBJC'],
- 'linker' => 'OBJCLINK',,
- 'link' => '$(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS)
$(AM_LDFLAGS)
$(LDFLAGS) -o $@',
+ 'host_linker' => 'OBJCLINK',,
+ 'host_link' => '$(OBJCLD) $(AM_OBJCFLAGS) $(OBJCFLAGS)
$(AM_LDFLAGS)
$(LDFLAGS) -o $@',
'autodep' => 'OBJC',
'flags' => ['OBJCFLAGS', 'CPPFLAGS'],
- 'compile' => '$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)',
- 'compiler' => 'OBJCCOMPILE',
- 'compile_flag' => '-c',
+ 'host_compile' => '$(OBJC) $(DEFS) $(DEFAULT_INCLUDES)
$(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)',
+ 'host_compiler' => 'OBJCCOMPILE',
+ 'host_compile_flag' => '-c',
'output_flag' => '-o',
- 'lder' => 'OBJCLD',
- 'ld' => '$(OBJC)',
+ 'host_lder' => 'OBJCLD',
+ 'host_ld' => '$(OBJC)',
'pure' => 1,
'extensions' => ['.m']);
@@ -714,8 +714,8 @@
'Name' => 'Yacc',
'config_vars' => ['YACC'],
'flags' => ['YFLAGS'],
- 'compile' => '$(YACC) $(YFLAGS) $(AM_YFLAGS)',
- 'compiler' => 'YACCCOMPILE',
+ 'host_compile' => '$(YACC) $(YFLAGS) $(AM_YFLAGS)',
+ 'host_compiler' => 'YACCCOMPILE',
'extensions' => ['.y'],
'output_extensions' => sub { (my $ext = $_[0]) =~ tr/y/c/;
return ($ext,) },
@@ -727,8 +727,8 @@
'config_vars' => ['YACC'],
'rule_file' => 'yacc',
'flags' => ['YFLAGS'],
- 'compiler' => 'YACCCOMPILE',
- 'compile' => '$(YACC) $(YFLAGS) $(AM_YFLAGS)',
+ 'host_compiler' => 'YACCCOMPILE',
+ 'host_compile' => '$(YACC) $(YFLAGS) $(AM_YFLAGS)',
'extensions' => ['.y++', '.yy', '.yxx', '.ypp'],
'output_extensions' => sub { (my $ext = $_[0]) =~ tr/y/c/;
return ($ext,) },
@@ -741,8 +741,8 @@
'config_vars' => ['LEX'],
'rule_file' => 'lex',
'flags' => ['LFLAGS'],
- 'compile' => '$(LEX) $(LFLAGS) $(AM_LFLAGS)',
- 'compiler' => 'LEXCOMPILE',
+ 'host_compile' => '$(LEX) $(LFLAGS) $(AM_LFLAGS)',
+ 'host_compiler' => 'LEXCOMPILE',
'extensions' => ['.l'],
'output_extensions' => sub { (my $ext = $_[0]) =~ tr/l/c/;
return ($ext,) },
@@ -753,8 +753,8 @@
'config_vars' => ['LEX'],
'rule_file' => 'lex',
'flags' => ['LFLAGS'],
- 'compile' => '$(LEX) $(LFLAGS) $(AM_LFLAGS)',
- 'compiler' => 'LEXCOMPILE',
+ 'host_compile' => '$(LEX) $(LFLAGS) $(AM_LFLAGS)',
+ 'host_compiler' => 'LEXCOMPILE',
'extensions' => ['.l++', '.ll', '.lxx', '.lpp'],
'output_extensions' => sub { (my $ext = $_[0]) =~ tr/l/c/;
return ($ext,) },
@@ -769,8 +769,8 @@
'flags' => ['CCASFLAGS'],
# Users can set AM_ASFLAGS to includes DEFS, INCLUDES,
# or anything else required. They can also set AS.
- 'compile' => '$(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)',
- 'compiler' => 'CCASCOMPILE',
+ 'host_compile' => '$(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)',
+ 'host_compiler' => 'CCASCOMPILE',
'compile_flag' => '-c',
'extensions' => ['.s', '.S'],
@@ -780,15 +780,15 @@
# Fortran 77
register_language ('name' => 'f77',
'Name' => 'Fortran 77',
- 'linker' => 'F77LINK',
- 'link' => '$(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o
$@',
+ 'host_linker' => 'F77LINK',
+ 'host_link' => '$(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o $@',
'flags' => ['FFLAGS'],
- 'compile' => '$(F77) $(AM_FFLAGS) $(FFLAGS)',
- 'compiler' => 'F77COMPILE',
+ 'host_compile' => '$(F77) $(AM_FFLAGS) $(FFLAGS)',
+ 'host_compiler' => 'F77COMPILE',
'compile_flag' => '-c',
'output_flag' => '-o',
- 'lder' => 'F77LD',
- 'ld' => '$(F77)',
+ 'host_lder' => 'F77LD',
+ 'host_ld' => '$(F77)',
'pure' => 1,
'extensions' => ['.f', '.for', '.f90']);
@@ -810,13 +810,13 @@
register_language ('name' => 'ppf77',
'Name' => 'Preprocessed Fortran 77',
'config_vars' => ['F77'],
- 'linker' => 'F77LINK',
- 'link' => '$(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o
$@',
- 'lder' => 'F77LD',
- 'ld' => '$(F77)',
+ 'host_linker' => 'F77LINK',
+ 'host_link' => '$(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o $@',
+ 'host_lder' => 'F77LD',
+ 'host_ld' => '$(F77)',
'flags' => ['FFLAGS', 'CPPFLAGS'],
- 'compiler' => 'PPF77COMPILE',
- 'compile' => '$(F77) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FFLAGS) $(FFLAGS)',
+ 'host_compiler' => 'PPF77COMPILE',
+ 'host_compile' => '$(F77) $(DEFS) $(DEFAULT_INCLUDES)
$(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FFLAGS) $(FFLAGS)',
'compile_flag' => '-c',
'output_flag' => '-o',
'pure' => 1,
@@ -826,14 +826,14 @@
register_language ('name' => 'ratfor',
'Name' => 'Ratfor',
'config_vars' => ['F77'],
- 'linker' => 'F77LINK',
- 'link' => '$(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o
$@',
- 'lder' => 'F77LD',
- 'ld' => '$(F77)',
+ 'host_linker' => 'F77LINK',
+ 'host_link' => '$(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o $@',
+ 'host_lder' => 'F77LD',
+ 'host_ld' => '$(F77)',
'flags' => ['RFLAGS', 'FFLAGS'],
# FIXME also FFLAGS.
- 'compile' => '$(F77) $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS)
$(RFLAGS)',
- 'compiler' => 'RCOMPILE',
+ 'host_compile' => '$(F77) $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS)
$(RFLAGS)',
+ 'host_compiler' => 'RCOMPILE',
'compile_flag' => '-c',
'output_flag' => '-o',
'pure' => 1,
@@ -843,16 +843,16 @@
register_language ('name' => 'java',
'Name' => 'Java',
'config_vars' => ['GCJ'],
- 'linker' => 'GCJLINK',
- 'link' => '$(GCJLD) $(AM_GCJFLAGS) $(GCJFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o $@',
+ 'host_linker' => 'GCJLINK',
+ 'host_link' => '$(GCJLD) $(AM_GCJFLAGS) $(GCJFLAGS)
$(AM_LDFLAGS)
$(LDFLAGS) -o $@',
'autodep' => 'GCJ',
'flags' => ['GCJFLAGS'],
- 'compile' => '$(GCJ) $(AM_GCJFLAGS) $(GCJFLAGS)',
- 'compiler' => 'GCJCOMPILE',
+ 'host_compile' => '$(GCJ) $(AM_GCJFLAGS) $(GCJFLAGS)',
+ 'host_compiler' => 'GCJCOMPILE',
'compile_flag' => '-c',
'output_flag' => '-o',
- 'lder' => 'GCJLD',
- 'ld' => '$(GCJ)',
+ 'host_lder' => 'GCJLD',
+ 'host_ld' => '$(GCJ)',
'pure' => 1,
'extensions' => ['.java', '.class', '.zip', '.jar']);
@@ -1072,7 +1072,7 @@
# Generate the appropriate rules for this extension.
if (((! option 'no-dependencies') && $lang->autodep ne 'no')
- || defined $lang->compile)
+ || defined $lang->host_compile)
{
# Some C compilers don't support -c -o. Use it only if really
# needed.
@@ -1105,8 +1105,8 @@
OBJOBJ => '$@',
LTOBJ => '$@',
- COMPILE => '$(' . $lang->compiler . ')',
- LTCOMPILE => '$(LT' . $lang->compiler . ')',
+ COMPILE => '$(' . $lang->host_compiler . ')',
+ LTCOMPILE => '$(LT' . $lang->host_compiler . ')',
-o => $output_flag);
}
@@ -1123,12 +1123,12 @@
$seen_files{$obj} = 1;
prog_error ("found " . $lang->name .
- " in handle_languages, but compiler not defined")
- unless defined $lang->compile;
+ " in handle_languages, but host_compiler not defined")
+ unless defined $lang->host_compile;
- my $obj_compile = $lang->compile;
+ my $obj_compile = $lang->host_compile;
- # Rewrite each occurrence of `AM_$flag' in the compile
+ # Rewrite each occurrence of `AM_$flag' in the host_compile
# rule into `${derived}_$flag' if it exists.
for my $flag (@{$lang->flags})
{
@@ -1284,10 +1284,10 @@
$needs_c ||= ! $lang->pure;
define_compiler_variable ($lang)
- if ($lang->compile);
+ if ($lang->host_compile);
define_linker_variable ($lang)
- if ($lang->link);
+ if ($lang->host_link);
require_variables ("$am_file.am", $lang->Name . " source seen",
TRUE, @{$lang->config_vars});
@@ -1299,7 +1299,7 @@
# they should not be overridden in the Makefile...
my @dont_override = @{$lang->flags};
# ... and so is LDFLAGS.
- push @dont_override, 'LDFLAGS' if $lang->link;
+ push @dont_override, 'LDFLAGS' if $lang->host_link;
foreach my $flag (@dont_override)
{
@@ -1458,7 +1458,7 @@
next if $r == LANG_IGNORE;
# Now extract linker and other info.
- $linker = $lang->linker;
+ $linker = $lang->host_linker;
my $this_obj_ext;
if (defined $source_extension)
@@ -1492,7 +1492,7 @@
# We have a per-executable flag in effect for this
# object. In this case we rewrite the object's
# name to ensure it is unique. We also require
- # the `compile' program to deal with compilers
+ # the `host_compile' program to deal with compilers
# where `-c -o' does not work.
# We choose the name `DERIVED_OBJECT' to ensure
@@ -1518,7 +1518,7 @@
if $lang->name eq 'c';
prog_error ($lang->name . " flags defined without compiler")
- if ! defined $lang->compile;
+ if ! defined $lang->host_compile;
$renamed = 1;
}
@@ -5377,7 +5377,7 @@
{
my ($lang) = @_;
- my ($var, $value) = ($lang->compiler, $lang->compile);
+ my ($var, $value) = ($lang->host_compiler, $lang->host_compile);
&define_variable ($var, $value, INTERNAL);
&define_variable ("LT$var", "\$(LIBTOOL) --mode=compile $value",
INTERNAL)
if var ('LIBTOOL');
@@ -5391,13 +5391,13 @@
{
my ($lang) = @_;
- my ($var, $value) = ($lang->lder, $lang->ld);
+ my ($var, $value) = ($lang->host_lder, $lang->host_ld);
# CCLD = $(CC).
- &define_variable ($lang->lder, $lang->ld, INTERNAL);
+ &define_variable ($lang->host_lder, $lang->host_ld, INTERNAL);
# CCLINK = $(CCLD) blah blah...
- &define_variable ($lang->linker,
+ &define_variable ($lang->host_linker,
((var ('LIBTOOL') ? '$(LIBTOOL) --mode=link ' : '')
- . $lang->link),
+ . $lang->host_link),
INTERNAL);
}
--
Warren Turkal
President, GOLUM, Inc.
http://www.golum.org
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] start acknowledging host building,
Warren Turkal <=