aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-10-03 16:12:32 +0200
committerTeddy Wing2020-10-03 16:12:32 +0200
commitbea8ea75c62c2f7c6959f12e1af652aa324827a9 (patch)
treebae522fd24fbc187543fd54d9589814d1f5aae08
parentaf63ef79f5f2bc770844169580902ff61f54ec98 (diff)
downloadgit-todo-bea8ea75c62c2f7c6959f12e1af652aa324827a9.tar.bz2
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.
-rw-r--r--Makefile9
1 files 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