diff options
| author | Cliff Click <cliffc@acm.org> | 2026-09-21 21:12:19 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-09-21 21:12:19 -0700 |
| commit | 21b9bdf9da645a9b392db0e7ec132fb9aeed5339 (patch) | |
| tree | 017fec9deac682fcd04790b12171ecfcd999785e /chapter04/Makefile | |
| parent | d2ffb24d0a3181d107f80df76570c04e010833ed (diff) | |
| download | Simple-21b9bdf9da645a9b392db0e7ec132fb9aeed5339.tar.gz Simple-21b9bdf9da645a9b392db0e7ec132fb9aeed5339.zip | |
Define a new graph interaction API
Diffstat (limited to 'chapter04/Makefile')
| -rw-r--r-- | chapter04/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chapter04/Makefile b/chapter04/Makefile index 7f55b343..e6c8f275 100644 --- a/chapter04/Makefile +++ b/chapter04/Makefile @@ -36,6 +36,10 @@ 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)) +# Compile the common adapter into this chapter without copying its sources. +GRAPH_DIR := $(firstword $(wildcard ../graph graph)) +graph_javas := $(wildcard $(GRAPH_DIR)/src/main/java/com/seaofnodes/graph/*.java) +main_javas += $(graph_javas) test_classes := $(patsubst $(TST)/%java,$(CLZDIR)/test/%class,$(test_javas)) test_cp := $(patsubst $(TST)/$(SIMPLE)/%.java,com.seaofnodes.simple.%,$(wildcard $(TST)/$(SIMPLE)/*Test.java)) classes = $(main_classes) $(test_classes) @@ -52,8 +56,11 @@ endif default: $(default_targets) +.PHONY: build +build: $(main_classes) + # Compile just the out-of-date files -$(main_classes): build/classes/main/%class: $(SRC)/%java +$(main_classes): $(CLZDIR)/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) |
