* config.guess: Replace old-style .. command substitution with

the more modern $(..) form.
	* config.sub: Likewise.
This commit is contained in:
Ben Elliston
2017-11-03 22:21:08 +11:00
parent e37d556198
commit a1aab4fe31
3 changed files with 150 additions and 144 deletions

116
config.sub vendored
View File

@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2017 Free Software Foundation, Inc.
timestamp='2017-11-01'
timestamp='2017-11-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -50,7 +50,7 @@ timestamp='2017-11-01'
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
me=`echo "$0" | sed -e 's,.*/,,'`
me=$(echo "$0" | sed -e 's,.*/,,')
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
@ -112,7 +112,7 @@ esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
maybe_os=$(echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/')
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
@ -120,16 +120,16 @@ case $maybe_os in
kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
basic_machine=$(echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/')
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
basic_machine=$(echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/')-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
basic_machine=$(echo $1 | sed 's/-[^-]*$//')
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
then os=$(echo $1 | sed 's/.*-/-/')
else os=; fi
;;
esac
@ -178,44 +178,44 @@ case $os in
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86-.*/86-pc/')
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86-.*/86-pc/')
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86-.*/86-pc/')
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
os=$(echo $os | sed -e 's/sco3.2./sco3.2v/')
basic_machine=$(echo $1 | sed -e 's/86-.*/86-pc/')
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86-.*/86-pc/')
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86-.*/86-pc/')
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86-.*/86-pc/')
;;
-udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86-.*/86-pc/')
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86-.*/86-pc/')
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86-.*/86-pc/')
;;
-lynx*178)
os=-lynxos178
@ -227,7 +227,7 @@ case $os in
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
basic_machine=$(echo $1 | sed -e 's/86-.*/86-sequent/')
;;
-psos*)
os=-psos
@ -492,7 +492,7 @@ case $basic_machine in
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=x86_64-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
amdahl)
basic_machine=580-amdahl
@ -537,7 +537,7 @@ case $basic_machine in
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=bfin-$(echo $basic_machine | sed 's/^[^-]*-//')
os=-linux
;;
bluegene*)
@ -545,13 +545,13 @@ case $basic_machine in
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=tic54x-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=tic55x-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=tic6x-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
c90)
basic_machine=c90-cray
@ -649,7 +649,7 @@ case $basic_machine in
os=$os"spe"
;;
e500v[12]-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=powerpc-$(echo $basic_machine | sed 's/^[^-]*-//')
os=$os"spe"
;;
ebmon29k)
@ -756,19 +756,19 @@ case $basic_machine in
basic_machine=i370-ibm
;;
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86.*/86-pc/')
os=-sysv32
;;
i*86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86.*/86-pc/')
os=-sysv4
;;
i*86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86.*/86-pc/')
os=-sysv
;;
i*86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
basic_machine=$(echo $1 | sed -e 's/86.*/86-pc/')
os=-solaris2
;;
i386mach)
@ -794,14 +794,14 @@ case $basic_machine in
os=-sysv
;;
leon-*|leon[3-9]-*)
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
basic_machine=sparc-$(echo $basic_machine | sed 's/-.*//')
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=m68k-$(echo $basic_machine | sed 's/^[^-]*-//')
os=-linux
;;
m88k-omron*)
@ -838,10 +838,10 @@ case $basic_machine in
os=-mint
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
basic_machine=$(echo $basic_machine | sed -e 's/mips3/mips64/')
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
basic_machine=$(echo $basic_machine | sed -e 's/mips3/mips64/')-unknown
;;
monitor)
basic_machine=m68k-rom68k
@ -860,7 +860,7 @@ case $basic_machine in
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
basic_machine=$(echo $basic_machine | sed -e 's/ms1-/mt-/')
;;
msys)
basic_machine=i686-pc
@ -982,7 +982,7 @@ case $basic_machine in
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=hppa-$(echo $basic_machine | sed 's/^[^-]*-//')
os=-linux
;;
pbd)
@ -998,7 +998,7 @@ case $basic_machine in
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=i386-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
@ -1013,16 +1013,16 @@ case $basic_machine in
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=i586-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=i686-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=i686-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=i786-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
pn)
basic_machine=pn-gould
@ -1032,23 +1032,23 @@ case $basic_machine in
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=powerpc-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=powerpcle-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
ppc64-*) basic_machine=powerpc64-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=powerpc64le-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
ps2)
basic_machine=i386-ibm
@ -1131,7 +1131,7 @@ case $basic_machine in
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
basic_machine=arm-$(echo $basic_machine | sed 's/^[^-]*-//')
;;
sun2)
basic_machine=m68000-sun
@ -1267,7 +1267,7 @@ case $basic_machine in
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
basic_machine=$(echo $basic_machine | sed 's/^xscale/arm/')
;;
ymp)
basic_machine=ymp-cray
@ -1352,10 +1352,10 @@ esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
basic_machine=$(echo $basic_machine | sed 's/digital.*/dec/')
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
basic_machine=$(echo $basic_machine | sed 's/commodore.*/cbm/')
;;
*)
;;
@ -1373,7 +1373,7 @@ case $os in
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
os=$(echo $os | sed -e 's|solaris1|sunos4|')
;;
-solaris)
os=-solaris2
@ -1385,7 +1385,7 @@ case $os in
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
os=$(echo $os | sed -e 's|gnu/linux|linux-gnu|')
;;
# Now accept the basic system types.
# The portable systems comes first.
@ -1432,26 +1432,26 @@ case $os in
-nto-qnx*)
;;
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
os=$(echo $os | sed -e 's|nto|nto-qnx|')
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
os=$(echo $os | sed -e 's|mac|macos|')
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
os=$(echo $os | sed -e 's|linux|linux-gnu|')
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
os=$(echo $os | sed -e 's|sunos5|solaris2|')
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
os=$(echo $os | sed -e 's|sunos6|solaris3|')
;;
-opened*)
os=-openedition
@ -1500,7 +1500,7 @@ case $os in
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
os=$(echo $os | sed -e 's|sinix|sysv|')
;;
-sinix*)
os=-sysv4
@ -1555,7 +1555,7 @@ case $os in
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
os=$(echo $os | sed 's/[^-]*-//')
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
@ -1821,7 +1821,7 @@ case $basic_machine in
vendor=stratus
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
basic_machine=$(echo $basic_machine | sed "s/unknown/$vendor/")
;;
esac