From 29fb671e69f90ad3b04c6fa8d746caf857f89e77 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Tue, 22 Sep 2026 11:25:05 -0700 Subject: Add shared graph viewer to all chapters --- graph/graph.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 graph/graph.mk (limited to 'graph/graph.mk') diff --git a/graph/graph.mk b/graph/graph.mk new file mode 100644 index 00000000..1d5eb95a --- /dev/null +++ b/graph/graph.mk @@ -0,0 +1,11 @@ +# Include after defining chapter source variables. Works in linearized checkouts too. +GRAPH_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) +graph_javas := $(wildcard $(GRAPH_DIR)/src/main/java/com/seaofnodes/graph/*.java) +main_javas += $(graph_javas) + +# Defining view here must not change the chapter's default target. +graph_goal := $(.DEFAULT_GOAL) +.PHONY: view +view: build + java -ea -cp "$(CLZDIR)/main" com.seaofnodes.simple.print.SimpleGraphObserver +.DEFAULT_GOAL := $(graph_goal) -- cgit v1.2.3