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 <vincenzopalazzodev@gmail.com>
This commit is contained in:
Vincenzo Palazzo 2023-07-11 05:29:44 +09:30 committed by Rusty Russell
parent 4b70736d13
commit da91e70d3e

View File

@ -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