From bea8ea75c62c2f7c6959f12e1af652aa324827a9 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 3 Oct 2020 16:12:32 +0200 Subject: Makefile: Add prerequisites to `target/debug/git-todo` target In af63ef79f5f2bc770844169580902ff61f54ec98, I forgot to add prerequisites, so when the source changed, the debug binary wasn't rebuilt before running tests. --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b8fc02b..6b935bf 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ +SOURCES := $(shell find . -name '*.rs') +DEPENDENCIES := Cargo.toml +DEBUG_PRODUCT := target/debug/git-todo + + .PHONY: test -test: target/debug/git-todo +test: $(DEBUG_PRODUCT) prove -v -I./t -target/debug/git-todo: +$(DEBUG_PRODUCT): $(SOURCES) $(DEPENDENCIES) cargo build -- cgit v1.2.3