HUGE Makefile updates!

This commit is contained in:
Scarlett
2025-03-28 20:38:21 -04:00
parent 982a8a0454
commit ad4f55c2bf
9 changed files with 242 additions and 405 deletions

View File

@ -6,8 +6,9 @@ CFLAGS :=
YACC := bison
TESTS-S1 := $(wildcard tests/sprint1/test/*.alpha)
TESTS-S3 := $(wildcard tests/sprint3/test/*.alpha)
TESTS-S2 := $(wildcard tests/sprint2/test/*.alpha)
TESTS-S3 := $(wildcard tests/sprint3/test/*.alpha)
TESTS-S4 := $(wildcard tests/sprint4/test/*.alpha)
compiler: clean runner
@ -33,22 +34,38 @@ runner: tmp/lex.yy.c tmp/runner.o tmp/symbol_table.o
debug: CFLAGS += -DDEBUG=1
debug: clean compiler
test: test-s1 test-s2 test-s3
test:
chmod +x ./check.sh
chmod +x ./test.sh
$(foreach test, $(TESTS-S1), (./$(EXE) -tok $(test) || true);)
./test.sh sp2
./test.sh sp3
./test.sh sp4
./check.sh
test-s1:
chmod +x ./check.sh
for test in $(TESTS-S1); do ./$(EXE) -tok $$test || echo "Test $$test failed but continuing"; done
./check.sh
chmod +x ./test.sh
$(foreach test, $(TESTS-S1), (./$(EXE) -tok $(test) || true);)
./check.sh sp1
test-s2:
chmod +x ./check.sh
for test in $(TESTS-S2); do ./$(EXE) -st $$test || echo "Test $$test failed but continuing"; done
./check.sh
chmod +x ./test.sh
./test.sh sp2
./check.sh sp2
test-s3:
chmod +x ./check.sh
for test in $(TESTS-S3); do ./$(EXE) -st $$test || echo "Test $$test failed but continuing"; done
./check.sh
chmod +x ./test.sh
./test.sh sp3
./check.sh sp3
test-s4:
chmod +x ./check.sh
chmod +x ./test.sh
./test.sh sp4
./check.sh sp4
clean:
rm -f *.o