summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-12-16 15:27:44 -0500
committerTavian Barnes <tavianator@tavianator.com>2020-12-16 15:57:34 -0500
commit038579b8fd9b96a207cb45e0adf113e881d8ff8d (patch)
tree5279cb31f270c1c90551836b6e23f73856dedc3b
parentecf6a45612e2398a5dd72c89f7971f903442054e (diff)
downloadbfs-038579b8fd9b96a207cb45e0adf113e881d8ff8d.tar.xz
Makefile: Clean up check dependencies a bit
-rw-r--r--Makefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 9a73451..cdbf664 100644
--- a/Makefile
+++ b/Makefile
@@ -124,6 +124,13 @@ ifndef GOALS
FLAG_PREREQS += default
endif
+# The different search strategies that we test
+STRATEGIES := bfs dfs ids eds
+STRATEGY_CHECKS := $(STRATEGIES:%=check-%)
+
+# All the different checks we run
+CHECKS := $(STRATEGY_CHECKS) check-trie check-xtimegm
+
default: bfs
all: $(BIN_GOALS)
@@ -166,17 +173,14 @@ $(BIN_GOALS):
$(FLAG_GOALS): $(FLAG_PREREQS)
@:
-check: check-trie check-xtimegm check-bfs check-dfs check-ids check-eds
+check: $(CHECKS)
-check-trie: tests/trie
- $<
+$(STRATEGY_CHECKS): check-%: bfs tests/mksock
+ ./tests.sh --bfs="$(CURDIR)/bfs -S $*" $(TEST_FLAGS)
-check-xtimegm: tests/xtimegm
+check-trie check-xtimegm: check-%: tests/%
$<
-check-%: all
- ./tests.sh --bfs="$(CURDIR)/bfs -S $*" $(TEST_FLAGS)
-
distcheck:
+$(MAKE) -B asan ubsan check $(DISTCHECK_FLAGS)
ifneq ($(OS),Darwin)
@@ -201,6 +205,6 @@ uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/bfs
$(RM) $(DESTDIR)$(MANDIR)/man1/bfs.1
-.PHONY: default all $(FLAG_GOALS) check check-trie check-xtimegm distcheck clean install uninstall
+.PHONY: default all $(FLAG_GOALS) check $(CHECKS) distcheck clean install uninstall
-include $(wildcard *.d)