* automake.in ($top_builddir): Remove, used in one place.
authorAkim Demaille <akim@epita.fr>
Wed, 21 Feb 2001 08:30:56 +0000 (08:30 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 21 Feb 2001 08:30:56 +0000 (08:30 +0000)
(&define_standard_variables): Adjust.
Move the definition of triplet variables into...
* header-vars.am: here.

ChangeLog
automake.in
header-vars.am
lib/am/header-vars.am

index 9637ee6..b27ca40 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2001-02-21  Akim Demaille  <akim@epita.fr>
 
+       * automake.in ($top_builddir): Remove, used in one place.
+       (&define_standard_variables): Adjust.
+       Move the definition of triplet variables into...
+       * header-vars.am: here.
+
+       
+2001-02-21  Akim Demaille  <akim@epita.fr>
+
        * automake.in (&initialize_global_constants): Don't define $USAGE.
        (&usage): Handle the former content of $USAGE.
        Don't pretend autoconf cares about Makefile.in.
index 829bdfd..66eabfd 100755 (executable)
@@ -147,9 +147,6 @@ $config_header_line = 0;
 # relative to this directory.
 $output_directory = '.';
 
-# Relative location of top build directory.
-$top_builddir = '';
-
 # List of Makefile.am's to process, and their corresponding outputs.
 @input_files = ();
 %output_files = ();
@@ -6353,34 +6350,16 @@ sub read_am_file
 # twice.
 sub define_standard_variables
 {
-    $top_builddir = backname ($relative_dir);
     $output_vars .=
         &file_contents ('header-vars',
-                       &transform ('top_builddir' => $top_builddir));
-
-    # Generate some useful variables when AC_CANONICAL_* used.  FIXME:
-    # this should use generic %configure_vars method.
-    if ($seen_canonical)
-    {
-       local ($curs, %vars);
-       $vars{'host_alias'} = 'host_alias';
-       $vars{'host_triplet'} = 'host';
-       if ($seen_canonical == $AC_CANONICAL_SYSTEM)
-       {
-           $vars{'build_alias'} = 'build_alias';
-           $vars{'build_triplet'} = 'build';
-           $vars{'target_alias'} = 'target_alias';
-           $vars{'target_triplet'} = 'target';
-       }
-       foreach $curs (sort keys %vars)
-       {
-           $output_vars .= "$curs = \@$vars{$curs}\@\n";
-           $contents{$curs} = "\@$vars{$curs}\@";
-       }
-    }
-
-    local ($curs);
-    foreach $curs (sort keys %configure_vars)
+                       &transform_cond
+                       ('BUILD'    => $seen_canonical == $AC_CANONICAL_SYSTEM,
+                        'HOST'     => $seen_canonical,
+                        'TARGET'   => $seen_canonical == $AC_CANONICAL_SYSTEM)
+                       . &transform
+                       ('top_builddir' => backname ($relative_dir)));
+
+    foreach my $curs (sort keys %configure_vars)
     {
        &define_configure_variable ($curs);
     }
index 2745ffb..1ac4be6 100644 (file)
@@ -76,3 +76,14 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+
+## FIXME: Why the heck are _triplet variables not defined from the
+## _triplet values?
+## FIXME: this should probably use generic %configure_vars method.
+## Let's wait until we rely upon traces.
+?BUILD?        build_alias = @build_alias@
+?BUILD?        build_triplet = @build@
+?HOST? host_alias = @host_alias@
+?HOST? host_triplet = @host@
+?TARGET?       target_alias = @target_alias@
+?TARGET?       target_triplet = @target@
index 2745ffb..1ac4be6 100644 (file)
@@ -76,3 +76,14 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+
+## FIXME: Why the heck are _triplet variables not defined from the
+## _triplet values?
+## FIXME: this should probably use generic %configure_vars method.
+## Let's wait until we rely upon traces.
+?BUILD?        build_alias = @build_alias@
+?BUILD?        build_triplet = @build@
+?HOST? host_alias = @host_alias@
+?HOST? host_triplet = @host@
+?TARGET?       target_alias = @target_alias@
+?TARGET?       target_triplet = @target@