This repository has been archived on 2025-11-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
alisp/build.sh
Aryadev Chavali cc56a2ee2b Still got some failures, but a basic stream implementation
Need to fix what's going on with the example in main.c using stdin.
2025-08-28 22:55:41 +01:00

39 lines
502 B
Bash

#!/usr/bin/env sh
set -xe
CFLAGS="-Wall -Wextra -std=c11 -ggdb -fsanitize=address -fsanitize=undefined"
LINK=""
LIB="sv.c vec.c symtable.c tag.c constructor.c stream.c sys.c"
OUT="alisp.out"
build() {
cc $LINK $CFLAGS -o $OUT $LIB main.c;
cc $LINK $CFLAGS -o test.out $LIB test.c;
}
clean() {
rm -v $OUT test.out;
}
run() {
./$OUT;
}
test() {
./test.out
}
build
if [ "$1" = "run" ]
then
run
elif [ "$1" = "test" ]
then
test
elif [ "$1" = "clean" ]
then
clean
fi