forked from bonsai/harakit
tests: cc-compat.sh: fixed bug when all tested compilers aren’t present
This commit is contained in:
parent
ef1416cd42
commit
68b296e963
@ -12,7 +12,7 @@ set -e
|
|||||||
if ! ls GNUmakefile >/dev/null 2>&1
|
if ! ls GNUmakefile >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
printf '%s: Run this script in the root of the project.\n' "$0" 1>&2
|
printf '%s: Run this script in the root of the project.\n' "$0" 1>&2
|
||||||
exit 1
|
exit 64 # sysexits.h(3) EX_USAGE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make clean
|
make clean
|
||||||
@ -24,6 +24,10 @@ for CC in cc\
|
|||||||
'zig cc'
|
'zig cc'
|
||||||
do
|
do
|
||||||
export CC
|
export CC
|
||||||
|
|
||||||
|
command -v "$(printf '%s\n' "$CC" | cut -d ' ' -f1)" >/dev/null 2>&1 \
|
||||||
|
|| continue
|
||||||
|
|
||||||
printf '%s: %s: Testing build.\n' "$0" "$CC"
|
printf '%s: %s: Testing build.\n' "$0" "$CC"
|
||||||
|
|
||||||
make CC="$CC" && printf '%s: Build successful.\n' "$0"
|
make CC="$CC" && printf '%s: Build successful.\n' "$0"
|
||||||
|
Loading…
Reference in New Issue
Block a user