This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

41-header-vars-canonical.patch


Index: ChangeLog
from  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.
	
	
Index: automake.in
--- automake.in Sun, 18 Feb 2001 16:30:35 +0100 akim (am/f/39_automake.i 1.48 755)
+++ automake.in Sun, 18 Feb 2001 16:42:06 +0100 akim (am/f/39_automake.i 1.48 755)
@@ -147,9 +147,6 @@
 # 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 = ();
@@ -6345,34 +6342,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}\@";
-	}
-    }
+			&transform_cond
+			('BUILD'    => $seen_canonical == $AC_CANONICAL_SYSTEM,
+			 'HOST'     => $seen_canonical,
+			 'TARGET'   => $seen_canonical == $AC_CANONICAL_SYSTEM)
+			. &transform
+			('top_builddir' => backname ($relative_dir)));
 
-    local ($curs);
-    foreach $curs (sort keys %configure_vars)
+    foreach my $curs (sort keys %configure_vars)
     {
 	&define_configure_variable ($curs);
     }
Index: header-vars.am
--- header-vars.am Fri, 09 Feb 2001 04:02:17 +0100 akim (am/g/39_header-var 1.2 644)
+++ header-vars.am Sun, 18 Feb 2001 16:44:33 +0100 akim (am/g/39_header-var 1.2 644)
@@ -76,3 +76,14 @@
 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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]