From 62504dda1527490cb49e56dd9840031479d258f0 Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Sun, 20 Sep 2026 22:25:07 +0200 Subject: docs: generate the command catalogue from the command tables Co-Authored-By: Claude Opus 5 --- Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index dfdac40..43b5417 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,12 @@ $(BUILD)/test_smtp: $(BUILD)/tests/smtp_check.o $(BUILD)/src/smtp.o \ $(BUILD)/vendor/sha256.o $(CC) $(CFLAGS) -o $@ $^ -lm -lssl -lcrypto +$(BUILD)/gen_protocol: $(BUILD)/scripts/gen_protocol.o $(CORE_OBJ) $(VENDOR_OBJ) + $(CC) $(CFLAGS) -o $@ $^ -lm $(SSL_LIBS) + +gen-protocol: $(BUILD)/gen_protocol + $(BUILD)/gen_protocol --write docs/PROTOCOL.md + test: check $(BUILD)/test_core $(BUILD)/test_tui $(BUILD)/test_pdf \ $(BUILD)/test_invoice $(BUILD)/test_smtp $(BUILD)/test_core @@ -96,7 +102,8 @@ test: check $(BUILD)/test_core $(BUILD)/test_tui $(BUILD)/test_pdf \ test-core: $(BUILD)/test_core $(BUILD)/test_core -check: +check: $(BUILD)/gen_protocol + $(BUILD)/gen_protocol --check docs/PROTOCOL.md sh scripts/check-consistency.sh test-pty: all @@ -127,6 +134,10 @@ $(BUILD)/clients/%.o: clients/%.c @mkdir -p $(dir $@) $(CC) $(CFLAGS) $(DEPFLAGS) $(WARN) $(CPPFLAGS) $(DEFS) -c $< -o $@ +$(BUILD)/scripts/%.o: scripts/%.c + @mkdir -p $(dir $@) + $(CC) $(CFLAGS) $(DEPFLAGS) $(WARN) $(CPPFLAGS) $(DEFS) -c $< -o $@ + $(BUILD)/tests/%.o: tests/%.c @mkdir -p $(dir $@) $(CC) $(CFLAGS) $(DEPFLAGS) $(WARN) $(CPPFLAGS) $(DEFS) -c $< -o $@ @@ -135,7 +146,8 @@ $(BUILD)/tests/%.o: tests/%.c $(BUILD)/clients/bokfctl.d $(BUILD)/clients/bokftui.d \ $(BUILD)/clients/ui.d $(TUI_SCREEN_DEP) \ $(BUILD)/clients/tui.d $(BUILD)/clients/client.d \ - $(BUILD)/tests/test_core.d $(BUILD)/tests/test_tui.d + $(BUILD)/tests/test_core.d $(BUILD)/tests/test_tui.d \ + $(BUILD)/scripts/gen_protocol.d install: all install -d $(DESTDIR)/usr/local/bin $(DESTDIR)/usr/local/share/bokf @@ -146,5 +158,5 @@ install: all clean: rm -rf $(BUILD) build-asan build-ubsan -.PHONY: all backend test test-core test-pty check test-asan test-ubsan gate \ +.PHONY: all backend test test-core test-pty check gen-protocol test-asan test-ubsan gate \ install clean -- cgit v1.3