diff --git a/Justfile b/Justfile index 3b5aa8f..72023a2 100644 --- a/Justfile +++ b/Justfile @@ -1,5 +1,6 @@ test +TESTS='test': build tests/bats/bin/bats {{ append('.bats',prepend('tests/',TESTS)) }} - +exec *ARGS: build + build/args {{ARGS}} build: @make build diff --git a/Makefile b/Makefile index 5aa3180..c7ee98f 100644 --- a/Makefile +++ b/Makefile @@ -16,10 +16,10 @@ define DOCS ) endef -build: build/ $(NAME) +build: build/ build/$(NAME) -$(NAME): src/main.c $(HEADERS) - cc -o $(NAME) $^ +build/$(NAME): src/main.c $(HEADERS) + cc -o $@ $< test: diff --git a/tests/test.bats b/tests/test.bats index 333bdf5..342419a 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -1,5 +1,5 @@ setup(){ - export PATH="${PWD}:${PATH}" + export PATH="${PWD}/build:${PATH}" load 'test_helper/bats-support/load' load 'test_helper/bats-assert/load' }