From da91e70d3e4d3dceb724807eee290b27eb028cfe Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Tue, 11 Jul 2023 05:29:44 +0930 Subject: [PATCH] build: Regenerate the generated file as the default target When modifying the schema, regenerating the file can be challenging. This change sets the autogenerate file as the default target, m aking the process more convenient and simplifying our workflow. Fixes https://github.com/ElementsProject/lightning/issues/6365 Report-by: Dusty Daemon Changelog-None Signed-off-by: Vincenzo Palazzo --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 36ef99e3a..4ea47cccb 100644 --- a/Makefile +++ b/Makefile @@ -277,7 +277,7 @@ ifeq ($(HAVE_POSTGRES),1) LDLIBS += $(POSTGRES_LDLIBS) endif -default: show-flags all-programs all-test-programs doc-all default-targets $(PYTHON_GENERATED) +default: show-flags gen all-programs all-test-programs doc-all default-targets $(PYTHON_GENERATED) ifneq ($(SUPPRESS_GENERATION),1) FORCE = FORCE @@ -597,6 +597,8 @@ CHECK_GEN_ALL = \ .msggen.json \ doc/index.rst +gen: $(CHECK_GEN_ALL) + check-gen-updated: $(CHECK_GEN_ALL) @echo "Checking for generated files being changed by make" git diff --exit-code HEAD