Bruno Haible <[email protected]> writes:

> Collin Funk wrote:
>> I'll push the attached patch later if no one disagrees.
>
> I think it should test $host_os, not $host_triplet.

I think either would work fine. For some reason coreutils uses
$host_triplet everywhere instead of $host_os:

    $ git grep -E 'host_(os|triplet)'
    tests/chgrp/basic.sh:    case $host_triplet in
    tests/chgrp/basic.sh:      *) echo $host_triplet: no-change chgrp failed to 
update ctime 1>&2;
    tests/chown/separator.sh:case $host_triplet in
    tests/local.mk:  host_os=$(host_os)                             \
    tests/local.mk:  host_triplet='$(host_triplet)'         \
    tests/rm/r-root.sh:  case $host_triplet in
    tests/tail/pipe-f.sh:case $host_triplet in
    tests/tail/tail-c.sh:        case $host_triplet in
    tests/tee/tee.sh:case $host_triplet in
    tests/touch/dangling-symlink.sh:  case $host_triplet in

So I was blindly following convention. Admittedly, I was not sure the
rationale behind it.

>From 'git log' in Automake, I can see $host_triplet existed some time
before 2002:

    $ git log --grep=host_triplet
    commit a50f84a553f9ee629a7b4712085d1c99dc1ed9c4
    Author:     Alexandre Duret-Lutz <[email protected]>
    AuthorDate: Fri May 17 13:55:57 2002 +0000
    Commit:     Alexandre Duret-Lutz <[email protected]>
    CommitDate: Fri May 17 13:55:57 2002 +0000
    
        * lib/am/header-vars.am (build_triplet, host_triplet,
        target_triplet): Define.  Were removed by mistake on 2002-04-13.

After some uses of 'git blame' it looks like it was introduced in this
commit:

    $ git log 3fa2bf107b7965ac7d65f7cc1ff7fa3dd1cc1b38 -1
    commit 3fa2bf107b7965ac7d65f7cc1ff7fa3dd1cc1b38
    Author:     Tom Tromey <[email protected]>
    AuthorDate: Sun Jun 2 17:14:29 1996 +0000
    Commit:     Tom Tromey <[email protected]>
    CommitDate: Sun Jun 2 17:14:29 1996 +0000
    
        Bug fixes.  More dejagnu support

On the other hand $host_os was introduced into Autoconf here:

    $ git log 90fda5b15118fb9d1855d45cf7c1977b1323620c -1
    commit 90fda5b15118fb9d1855d45cf7c1977b1323620c
    Author:     David MacKenzie <[email protected]>
    AuthorDate: Sat Apr 30 01:44:39 1994 +0000
    Commit:     David MacKenzie <[email protected]>
    CommitDate: Sat Apr 30 01:44:39 1994 +0000
    
        (AC_OUTPUT): When doing substitutions on files, if
                the file starts with "#!", put the "automatically generated"
                comment on the second line instead of the first.
        (AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
                AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, 
AC_TARGET_TYPE,
                AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, 
AC_OUTPUT_MAKE_LINKS,
                AC_CONFIG_SUBDIRS): New macros.
        (AC_OUTPUT_HEADER): For each file being created,
                munge a copy of conftest.sed rather than the original.
                From [email protected] (Brook Milligan).

But it was supposed to be internal until a later commit which made
AC_CANONICAL_TARGET semi-public, after the existence of $host_triplet:

    $ git log d25da990fe2ba1bf09d72fb1669ce2856fb0cf93 -1
    commit d25da990fe2ba1bf09d72fb1669ce2856fb0cf93
    Author:     Akim Demaille <[email protected]>
    AuthorDate: Sat Mar 25 09:24:16 2000 +0000
    Commit:     Akim Demaille <[email protected]>
    CommitDate: Sat Mar 25 09:24:16 2000 +0000
    
        * acgeneral.m4 (_AC_CANONICAL_TARGET, _AC_CANONICAL_BUILD): Rename
        as (AC_CANONICAL_TARGET, AC_CANONICAL_BUILD), although internal,
        too much foreign code depends upon them.

That is my best guess at least.

Collin

Reply via email to