From 169ad02a1b5b648aabd32c390e4d149aeed703c3 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 21 Feb 2001 08:30:55 +0000 Subject: [PATCH] * automake.in ($top_builddir): Remove, used in one place. (&define_standard_variables): Adjust. Move the definition of triplet variables into... * header-vars.am: here. --- ChangeLog | 8 ++++++++ automake.in | 37 ++++++++----------------------------- header-vars.am | 11 +++++++++++ lib/am/header-vars.am | 11 +++++++++++ 4 files changed, 38 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9637ee69..b27ca40b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-02-21 Akim Demaille + + * 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 * automake.in (&initialize_global_constants): Don't define $USAGE. diff --git a/automake.in b/automake.in index 829bdfd7..66eabfd8 100755 --- a/automake.in +++ b/automake.in @@ -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); } diff --git a/header-vars.am b/header-vars.am index 2745ffbc..1ac4be6a 100644 --- a/header-vars.am +++ b/header-vars.am @@ -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@ diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index 2745ffbc..1ac4be6a 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -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@ -- 2.43.5