From 9f051299964628452a10b80fff7b372e42b4fa32 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Mon, 18 Mar 2024 20:54:52 +0100 Subject: make: refactor run all target --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Makefile') 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') -- cgit v1.2.3