implement colouring of "autoconf" output. yay!
NB: only if stdout isatty
This commit is contained in:
parent
cff011696e
commit
5309e33974
24
Build.sh
24
Build.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $MirOS: src/bin/mksh/Build.sh,v 1.94 2007/01/12 00:25:38 tg Exp $
|
# $MirOS: src/bin/mksh/Build.sh,v 1.95 2007/01/12 01:17:10 tg Exp $
|
||||||
#-
|
#-
|
||||||
# Environment: CC, CFLAGS, CPPFLAGS, LDFLAGS, LIBS, NOWARN, NROFF
|
# Environment: CC, CFLAGS, CPPFLAGS, LDFLAGS, LIBS, NOWARN, NROFF
|
||||||
# With -x: SRCS (extra), TARGET_OS (uname -s)
|
# With -x: SRCS (extra), TARGET_OS (uname -s)
|
||||||
@ -16,6 +16,14 @@ v()
|
|||||||
eval "$@"
|
eval "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if test -t 1; then
|
||||||
|
bi=`printf '\033[1m'`
|
||||||
|
bo=`printf '\033[0m'`
|
||||||
|
else
|
||||||
|
bi=
|
||||||
|
bo=
|
||||||
|
fi
|
||||||
|
|
||||||
upper()
|
upper()
|
||||||
{
|
{
|
||||||
echo "$@" | tr qwertyuiopasdfghjklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM
|
echo "$@" | tr qwertyuiopasdfghjklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM
|
||||||
@ -41,11 +49,11 @@ ac_testn()
|
|||||||
test x"$fd" = x"" && fd=$f
|
test x"$fd" = x"" && fd=$f
|
||||||
eval fv=\$HAVE_$fu
|
eval fv=\$HAVE_$fu
|
||||||
if test 0 = "$fv"; then
|
if test 0 = "$fv"; then
|
||||||
$e "==> $fd... no (cached)"
|
$e "$bi==> $fd...$bo no (cached)"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if test 1 = "$fv"; then
|
if test 1 = "$fv"; then
|
||||||
$e "==> $fd... yes (cached)"
|
$e "$bi==> $fd...$bo yes (cached)"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if test $fc = "$ft"; then
|
if test $fc = "$ft"; then
|
||||||
@ -53,7 +61,7 @@ ac_testn()
|
|||||||
eval HAVE_$fu=$fv
|
eval HAVE_$fu=$fv
|
||||||
test 0 = "$fv" && fv=no
|
test 0 = "$fv" && fv=no
|
||||||
test 1 = "$fv" && fv=yes
|
test 1 = "$fv" && fv=yes
|
||||||
$e "==> $fd... $fv (implied)"
|
$e "$bi==> $fd...$bo $fv (implied)"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
$e ... $fd
|
$e ... $fd
|
||||||
@ -62,10 +70,10 @@ ac_testn()
|
|||||||
sed 's/^/] /'
|
sed 's/^/] /'
|
||||||
if test -f a.out || test -f a.exe; then
|
if test -f a.out || test -f a.exe; then
|
||||||
eval HAVE_$fu=1
|
eval HAVE_$fu=1
|
||||||
$e "==> $fd... yes"
|
$e "$bi==> $fd...$bo yes"
|
||||||
else
|
else
|
||||||
eval HAVE_$fu=0
|
eval HAVE_$fu=0
|
||||||
$e "==> $fd... no"
|
$e "$bi==> $fd...$bo no"
|
||||||
fi
|
fi
|
||||||
rm -f scn.c a.out a.exe
|
rm -f scn.c a.out a.exe
|
||||||
}
|
}
|
||||||
@ -156,7 +164,7 @@ SunOS)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
$e Scanning for functions... please ignore any errors.
|
$e ${bo}Scanning for functions... please ignore any errors.
|
||||||
|
|
||||||
ac_testn compiler_works '' 'if the compiler works' <<-'EOF'
|
ac_testn compiler_works '' 'if the compiler works' <<-'EOF'
|
||||||
int main(void) { return (0); }
|
int main(void) { return (0); }
|
||||||
@ -315,7 +323,7 @@ if test 1 = $NEED_MKSH_SIGNAME; then
|
|||||||
grep '^mksh_rules:.*42' a.out >&- 2>&- || CPP=no
|
grep '^mksh_rules:.*42' a.out >&- 2>&- || CPP=no
|
||||||
fi
|
fi
|
||||||
rm -f a.out
|
rm -f a.out
|
||||||
$e "==> checking how to run the C Preprocessor... $CPP"
|
$e "$bi==> checking how to run the C Preprocessor...$bo $CPP"
|
||||||
test x"$CPP" = x"no" && exit 1
|
test x"$CPP" = x"no" && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user