diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2025-08-21 21:54:27 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2025-08-21 21:57:10 +0100 |
commit | 89c77a796d947186ae77a896dc9a99cc9fb4ee2b (patch) | |
tree | a756ee7c496bc770cdf8ceb0ef8fa08164ce82f4 /build.sh | |
parent | 0da524f5a8f38b2274b7469af663e730bce847b6 (diff) | |
download | alisp-89c77a796d947186ae77a896dc9a99cc9fb4ee2b.tar.gz alisp-89c77a796d947186ae77a896dc9a99cc9fb4ee2b.tar.bz2 alisp-89c77a796d947186ae77a896dc9a99cc9fb4ee2b.zip |
Add the ability to run the executable after building it in build.sh
Diffstat (limited to 'build.sh')
-rw-r--r-- | build.sh | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -1,9 +1,22 @@ #!/usr/bin/env sh +set -xe + CFLAGS="-Wall -Wextra -std=c11 -ggdb -fsanitize=address -fsanitize=undefined" SRC="vec.c symtable.c tag.c constructor.c sys.c main.c" OUT="alisp.out" -set -xe +build() { + cc $CFLAGS -o $OUT $SRC; +} + +run() { + ./$OUT; +} + +build -cc $CFLAGS -o $OUT $SRC; +if [ "$1" = "run" ] +then + run +fi |