diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-21 08:22:29 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-21 08:22:29 +0200 |
| commit | f290736c33a6df85cd83eaed18e80530681955b9 (patch) | |
| tree | e3690041c6fbeffa807f5d2a8e57abadac836c0e | |
| parent | 19e4d8dcc9c9e76a8c90855cccb4c4553b35389e (diff) | |
build: run gate in its own build directory
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Makefile | 21 |
2 files changed, 15 insertions, 7 deletions
@@ -13,3 +13,4 @@ build-ubsan/ dropzone/ var/ .env +build-gate*/ @@ -110,18 +110,25 @@ test-pty: all python3 scripts/tui-golden.py SAN_CFLAGS = -O1 -g -fno-omit-frame-pointer +ASAN_BUILD ?= build-asan +UBSAN_BUILD ?= build-ubsan test-asan: - $(MAKE) BUILD=build-asan CFLAGS="$(SAN_CFLAGS) -fsanitize=address" test-core + $(MAKE) BUILD=$(ASAN_BUILD) CFLAGS="$(SAN_CFLAGS) -fsanitize=address" test-core test-ubsan: - $(MAKE) BUILD=build-ubsan CFLAGS="$(SAN_CFLAGS) -fsanitize=undefined" test-core + $(MAKE) BUILD=$(UBSAN_BUILD) CFLAGS="$(SAN_CFLAGS) -fsanitize=undefined" test-core +GATE_BUILD ?= build-gate + +# A pre-stop check in its own build directory: never touches build/, so the +# human's clients are still there when it is done. gate: - $(MAKE) clean - $(MAKE) WERROR=1 all - $(MAKE) WERROR=1 test - $(MAKE) WERROR=1 test-asan + $(MAKE) BUILD=$(GATE_BUILD) ASAN_BUILD=$(GATE_BUILD)-asan \ + UBSAN_BUILD=$(GATE_BUILD)-ubsan clean + $(MAKE) BUILD=$(GATE_BUILD) WERROR=1 all + $(MAKE) BUILD=$(GATE_BUILD) WERROR=1 test + $(MAKE) BUILD=$(GATE_BUILD) ASAN_BUILD=$(GATE_BUILD)-asan test-asan $(BUILD)/vendor/%.o: vendor/%.c @mkdir -p $(dir $@) @@ -157,7 +164,7 @@ install: all install -m 0644 data/bas_k2.csv data/bas_k3.csv $(DESTDIR)/usr/local/share/bokf/ clean: - rm -rf $(BUILD) build-asan build-ubsan + rm -rf $(BUILD) $(ASAN_BUILD) $(UBSAN_BUILD) .PHONY: all backend test test-core test-pty check gen-protocol test-asan test-ubsan gate \ install clean |
