summaryrefslogtreecommitdiff
path: root/chapter07/Makefile
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2026-09-22 11:25:05 -0700
committerCliff Click <cliffc@acm.org>2026-09-22 11:25:05 -0700
commit29fb671e69f90ad3b04c6fa8d746caf857f89e77 (patch)
tree2f39d082f8a6de6a2b60b66406f8c9f0190d25c2 /chapter07/Makefile
parent1d961838cff168a101069d08a8ab6594f49f0911 (diff)
downloadSimple-29fb671e69f90ad3b04c6fa8d746caf857f89e77.tar.gz
Simple-29fb671e69f90ad3b04c6fa8d746caf857f89e77.zip
Add shared graph viewer to all chapters
Diffstat (limited to 'chapter07/Makefile')
-rw-r--r--chapter07/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/chapter07/Makefile b/chapter07/Makefile
index cb362b42..8c2d5797 100644
--- a/chapter07/Makefile
+++ b/chapter07/Makefile
@@ -36,6 +36,7 @@ CLZDIR:= build/classes
main_javas := $(wildcard $(SRC)/$(SIMPLE)/*java $(SRC)/$(SIMPLE)/*/*java)
test_javas := $(wildcard $(TST)/$(SIMPLE)/*java $(TST)/$(SIMPLE)/*/*java)
main_classes := $(patsubst $(SRC)/%java,$(CLZDIR)/main/%class,$(main_javas))
+include $(firstword $(wildcard ../graph/graph.mk graph/graph.mk))
test_classes := $(patsubst $(TST)/%java,$(CLZDIR)/test/%class,$(test_javas))
test_cp := $(patsubst $(TST)/$(SIMPLE)/%.java,com.seaofnodes.simple.%,$(test_javas))
classes = $(main_classes) $(test_classes)
@@ -53,7 +54,7 @@ endif
default: $(default_targets)
# Compile just the out-of-date files
-$(main_classes): build/classes/main/%class: $(SRC)/%java
+$(main_classes): build/classes/main/%class: $(SRC)/%java $(graph_javas)
@echo "compiling " $@ " because " $?
@[ -d $(CLZDIR)/main ] || mkdir -p $(CLZDIR)/main
@javac $(JAVAC_ARGS) -cp "$(CLZDIR)/main$(SEP)$(jars)" -sourcepath $(SRC) -d $(CLZDIR)/main $(main_javas)
@@ -92,4 +93,7 @@ tags: $(main_javas) $(test_javas)
@rm -f TAGS
@$(CTAGS) -e --recurse=yes --extra=+q --fields=+fksaiS $(SRC) $(TST)
-include ../build-support/chapter-release.mk
+include $(firstword $(wildcard ../build-support/chapter-release.mk build-support/chapter-release.mk))
+
+.PHONY: build
+build: $(main_classes)