From 6ff31279d38bd3b814f19b1fb63933544139f6cf Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Sun, 20 Sep 2026 22:08:08 +0200 Subject: build: make gate with WERROR and a pre-push hook --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f0b2255..dfdac40 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null \ WARN = -Wall -Wextra -Wshadow -Wstrict-prototypes -Wmissing-prototypes \ -Wpointer-arith -Wvla -Wformat=2 +WARN += $(if $(WERROR),-Werror) DEPFLAGS = -MMD -MP CPPFLAGS = -Isrc -Iclients -Ivendor -Ivendor/argon2 DEFS = -D_GNU_SOURCE -DARGON2_NO_THREADS -DBOKF_VERSION=\"$(VERSION)\" @@ -109,6 +110,11 @@ test-asan: test-ubsan: $(MAKE) BUILD=build-ubsan CFLAGS="$(SAN_CFLAGS) -fsanitize=undefined" test-core +gate: + $(MAKE) clean + $(MAKE) WERROR=1 test + $(MAKE) WERROR=1 test-asan + $(BUILD)/vendor/%.o: vendor/%.c @mkdir -p $(dir $@) $(CC) $(CFLAGS) $(DEPFLAGS) $(CPPFLAGS) $(DEFS) -w -c $< -o $@ @@ -140,5 +146,5 @@ install: all clean: rm -rf $(BUILD) build-asan build-ubsan -.PHONY: all backend test test-core test-pty check test-asan test-ubsan \ +.PHONY: all backend test test-core test-pty check test-asan test-ubsan gate \ install clean -- cgit v1.3