aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2024-03-18 20:54:52 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2024-03-18 21:03:34 +0100
commit9f051299964628452a10b80fff7b372e42b4fa32 (patch)
tree2e3bbb641b285ca92a9a5213a7d38d43bd2e665f
parentf0d54f88c46929c66341460ffd67ddfdfbf512fe (diff)
downloadcpp-utils-9f051299964628452a10b80fff7b372e42b4fa32.tar.gz
cpp-utils-9f051299964628452a10b80fff7b372e42b4fa32.zip
make: refactor run all target
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index fe046c9..c8a3df8 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,7 @@ TEST += latch
BINS = $(TEST:%=build/%)
DEPS = $(TEST:%=build/%.d)
+RUNS = $(TEST:%=run/%)
# -- FLAGS ---------------------------------------------------------------------
@@ -26,11 +27,11 @@ bear:
bear intercept -- $(MAKE) all
bear citnames
-run: all
- @for BIN in $(BINS); do \
- echo "==> run $$BIN"; \
- $$BIN; \
- done
+run: $(RUNS)
+
+run/%: build build/%
+ @echo "==> run $*"
+ build/$*
lint:
clang-format --dry-run -Werror $(shell find -name '*.cc' -o -name '*.h')