From 72c1b297f122740ab84beacab19b80834a97c5f0 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Wed, 7 Oct 2026 10:45:41 -0400 Subject: [PATCH] feat: Makefile for convenience This provides the following `build-coatjava.sh` equivalences, _for convenience only_. I am not proposing to replace `build-coatjava.sh`, rather just provide a way of quickly running the most common commands; `build-coatjava.sh` may still be called directly for anything not in the Makefile. Let's keep this Makefile _as simple as possible_! | Command | Runs | --- | --- | | `make` | `./build-coatjava.sh` | | `make -j4` | `./build-coatjava.sh -T4` | | `make clean` | `./build-coatjava.sh --clean` | | `make clara` or `make all` | `./build-coatjava.sh --clara` | | `make -j8 clara` | `./build-coatjava.sh --clara -T8` | In fact, someday I'd like to be rid of `build-coatjava.sh` in favor of pure `mvn` commands with properties... --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..fe7cf3c86c --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +# this is a simple Makefile meant for developers' convenience +# - it only has the most common build commands we use +# - for any other build command, please use `./build-coatjava.sh` + +# convert `make` arg `-j#` -> `mvn` arg `-T#`, if provided +JOBS := $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS))) +THREADS := $(if $(strip $(JOBS)),-T$(JOBS),) + +BUILD := ./build-coatjava.sh + +.PHONY: default all clean clara + +.DEFAULT_GOAL := default + +default: + $(BUILD) $(THREADS) + +clean: + $(BUILD) --clean $(THREADS) + +clara: + $(BUILD) --clara $(THREADS) + +all: clara