forked from bonsai/harakit
36 lines
690 B
Bash
Executable File
36 lines
690 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Copyright (c) 2023 Emma Tebibyte <emma@tebibyte.media>
|
|
# SPDX-License-Identifier: FSFAP
|
|
#
|
|
# Copying and distribution of this file, with or without modification, are
|
|
# permitted in any medium without royalty provided the copyright notice and this
|
|
# notice are preserved. This file is offered as-is, without any warranty.
|
|
|
|
set -e
|
|
|
|
if ! ls GNUmakefile >/dev/null 2>&1
|
|
then
|
|
printf '%s: Run this script in the root of the project.\n' "$0" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
make clean
|
|
|
|
for CC in cc\
|
|
clang \
|
|
gcc \
|
|
tcc \
|
|
'zig cc'
|
|
do
|
|
export CC
|
|
printf '%s: %s: Testing build.\n' "$0" "$CC"
|
|
|
|
make CC="$CC" && printf '%s: Build successful.\n' "$0"
|
|
|
|
ls -lA build/
|
|
|
|
make clean
|
|
printf '\n'
|
|
done
|