* config.guess: Replace "if [ EXPR ]" with "if test EXPR".

* config.sub: Likewise.
	* testsuite/config-guess.sh: Likewise.
	* testsuite/config-sub.sh: Likewise.

Signed-off-by: Ben Elliston <bje@gnu.org>
This commit is contained in:
Issam E. Maghni
2020-08-17 13:36:41 +10:00
committed by Ben Elliston
parent 2593751ef2
commit 0b5188819b
5 changed files with 31 additions and 24 deletions

View File

@ -22,12 +22,12 @@ run_config_guess()
-e "s,@VERSION@,$version," \
-e "s,@PROCESSOR@,$processor," > ./uname << EOF
#!/bin/sh
[ \$# -ne 1 ] && exec sh \$0 -s
[ \$1 = -m ] && echo "@MACHINE@" && exit 0
[ \$1 = -r ] && echo "@RELEASE@" && exit 0
[ \$1 = -s ] && echo "@SYSTEM@" && exit 0
[ \$1 = -v ] && echo "@VERSION@" && exit 0
[ \$1 = -p ] && echo "@PROCESSOR@" && exit 0
test \$# -ne 1 && exec sh \$0 -s
test \$1 = -m && echo "@MACHINE@" && exit 0
test \$1 = -r && echo "@RELEASE@" && exit 0
test \$1 = -s && echo "@SYSTEM@" && exit 0
test \$1 = -v && echo "@VERSION@" && exit 0
test \$1 = -p && echo "@PROCESSOR@" && exit 0
EOF
chmod +x uname
output=$(CC_FOR_BUILD=no_compiler_found sh -eu ../config.guess 2>/dev/null)

View File

@ -36,7 +36,7 @@ run_config_sub()
while read -r alias canonical ; do
run_one_config_sub "$alias" "$canonical" &
numtests+=1 jobs+=1
if [ $jobs -eq $maxprocs ] ; then
if test $jobs -eq $maxprocs ; then
for pid in $(jobs -p) ; do
wait "$pid"
rc=$((rc || $?))
@ -73,7 +73,7 @@ run_config_sub_idempotent()
sed -r 's/\t+/\t/g' < config-sub.data | cut -f 2 | uniq | while read -r canonical ; do
run_one_config_sub_idempotent "$canonical" &
numtests+=1 jobs+=1
if [ $jobs -eq $maxprocs ] ; then
if test $jobs -eq $maxprocs ; then
for pid in $(jobs -p) ; do
wait "$pid"
rc=$((rc || $?))