From 019732431e3a9f03505f78783f3b5ea9b49b2e96 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 13 Sep 1996 01:16:51 +0000 Subject: [PATCH] canonical host fixes --- ChangeLog | 4 ++++ TODO | 3 +-- automake.in | 18 ++++++++++-------- automake.texi | 15 ++++++++++++--- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05cb592c..c3c293eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Thu Sep 12 15:03:19 1996 Tom Tromey * automake.in (handle_source_transform): Removed extraneous space. Test implicit.test. + (read_am_file): Make sure "canonical" variables are mentioned in + %contents. + (scan_configure): AC_CHECK_TOOL sets $seen_canonical to + $AC_CANONICAL_HOST conditionally. Wed Sep 11 11:54:44 1996 Tom Tromey diff --git a/TODO b/TODO index a6c53533..0ae8b0b8 100644 --- a/TODO +++ b/TODO @@ -344,8 +344,7 @@ include Greg Woods' more sophisticated "cvs-dist" target. document rebuilding configure. CONFIGURE_DEPENDENCIES -document new variables introduced when AC_CANONICAL_* used --- actually, must document all variables that are supposed +-- must document all variables that are supposed to be public knowledge automake must be run in each directory with a configure.in diff --git a/automake.in b/automake.in index 41f3537e..982330a2 100755 --- a/automake.in +++ b/automake.in @@ -2753,10 +2753,10 @@ sub scan_configure # Handle AC_CANONICAL_*. Always allow upgrading to # AC_CANONICAL_SYSTEM, but never downgrading. $seen_canonical = $AC_CANONICAL_HOST - if ! $seen_canonical && /AC_CANONICAL_HOST/; + if ! $seen_canonical + && (/AC_CANONICAL_HOST/ || /AC_CHECK_TOOL); $seen_canonical = $AC_CANONICAL_SYSTEM if /AC_CANONICAL_SYSTEM/; - $seen_canonical = 1 if /AC_CHECK_TOOL/; $seen_path_xtra = 1 if /AC_PATH_XTRA/; # Sometimes it is desirable to explicitly set YACC. For @@ -3054,14 +3054,16 @@ sub read_am_file # Generate some useful variables when AC_CANONICAL_* used. if ($seen_canonical) { - $header_vars .= ('host_alias = @host_alias@' . "\n" - . 'host_triplet = @host@' . "\n"); + local ($curs, @varlist); + push (@varlist, 'host_alias', 'host_triplet'); if ($seen_canonical == $AC_CANONICAL_SYSTEM) { - $header_vars .= ('build_alias = @build_alias@' . "\n" - . 'build_triplet = @build@' . "\n"); - $header_vars .= ('target_alias = @target_alias@' . "\n" - . 'target_triplet = @target@' . "\n"); + push (@varlist, 'build_alias', 'target_alias'); + } + foreach $curs (@varlist) + { + $header_vars .= "$curs = \@$curs\@\n"; + $contents{$curs} = "\@$curs\@"; } } diff --git a/automake.texi b/automake.texi index 3a88e96b..fa0581d8 100644 --- a/automake.texi +++ b/automake.texi @@ -589,13 +589,22 @@ or library. @cvindex AC_PATH_XTRA @item AC_CANONICAL_HOST -@item AC_CANONICAL_SYSTEM @item AC_CHECK_TOOL Automake will ensure that @file{config.guess} and @file{config.sub} -exist. +exist. Also, the @file{Makefile} variables @samp{host_alias} and +@samp{host_triplet} are introduced. +@c fixme xref autoconf docs. @cvindex AC_CANONICAL_HOST -@cvindex AC_CANONICAL_SYSTEM @cvindex AC_CHECK_TOOL +@vindex host_alias +@vindex host_triplet + +@item AC_CANONICAL_SYSTEM +This is similar to @code{AC_CANONICAL_HOST}, but also defines the +@file{Makefile} variables @samp{build_alias} and @samp{target_alias}. +@cvindex AC_CANONICAL_SYSTEM +@vindex build_alias +@vindex target_alias @item AC_FUNC_ALLOCA @item AC_FUNC_GETLOADAVG -- 2.43.5