From 48270d41b8ea848bc4dca8237eff5d98d986f287 Mon Sep 17 00:00:00 2001 From: kevinnls Date: Wed, 14 Jan 2026 20:46:01 +0530 Subject: [PATCH] put built file in right directory --- Justfile | 3 ++- Makefile | 6 +++--- tests/test.bats | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) 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' }