From cd42ebee104483235d4ad0da9f06cbc381443f44 Mon Sep 17 00:00:00 2001 From: s-over-4 Date: Fri, 16 Jun 2023 00:56:35 -0400 Subject: added some tests, will find a better way to do this in the future :P --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 03085c6..2a1c7f4 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +.PHONY: install uninstall clean me a sandwich dev + name := halk cc := cc flags := -s @@ -5,6 +7,7 @@ devflags := -g sources := $(wildcard src/*.c) sources := $(filter-out src/parser.c, $(sources)) # exclude the incomplete parser for now. objects := $(sources:.c=.o) +tests := tests $(name): $(objects) $(cc) $(objects) $(flags) -o ./$(name).out @@ -25,10 +28,13 @@ uninstall: clean: rm -f ./$(name).out ./src/*.o +test: + @$(foreach file, $(wildcard $(tests)/*.test.sh), $(file);) + +# fun me: @[ "$(USER)" = "root" ] && echo "Okay." || echo "What? Make it yourself." a sandwich: @exit -.PHONY: install uninstall clean me a sandwich dev -- cgit v1.2.3