From cfea45d8278f5172256afae1bafb907b406b0daf Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 9 Feb 2024 12:05:09 +0100 Subject: [PATCH] make: Add missing dependency between schemas and schema bundle Reported-by: microsatoshi --- Makefile | 3 ++- contrib/msggen/Makefile | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d1792f2db..4d793df1d 100644 --- a/Makefile +++ b/Makefile @@ -588,8 +588,8 @@ CHECK_GEN_ALL = \ $(PYTHON_GENERATED) \ $(ALL_GEN_HEADERS) \ $(ALL_GEN_SOURCES) \ + $(MSGGEN_GEN_ALL) \ wallet/statements_gettextgen.po \ - .msggen.json \ doc/index.rst gen: $(CHECK_GEN_ALL) @@ -706,6 +706,7 @@ clean: obsclean $(RM) $(ALL_PROGRAMS) $(RM) $(ALL_TEST_PROGRAMS) $(RM) $(ALL_FUZZ_TARGETS) + $(RM) $(MSGGEN_GEN_ALL) $(RM) ccan/tools/configurator/configurator $(RM) ccan/ccan/cdump/tools/cdump-enumstr.o find . -name '*gcda' -delete diff --git a/contrib/msggen/Makefile b/contrib/msggen/Makefile index ff1d85210..e51a91b4b 100644 --- a/contrib/msggen/Makefile +++ b/contrib/msggen/Makefile @@ -1,4 +1,15 @@ #! /usr/bin/make +# Files that `msggen` generates for itself, this does not include the +# artifacts that we will be using `msggen` to generate, but rather all +# the files required to work itself. This is distinct from +# `MSGGEN_GENALL`, which consists only of the files generated using +# `msggen`. `msggen.json` is special, it contains information that must not change, therefore it is not included in `clean` calls. +MSGGEN_GEN_ALL = \ + contrib/msggen/msggen/schema.json + +MSGGEN_DATA = \ + .msggen.json + contrib/msggen/msggen/schema.json: ${SCHEMAS} PYTHONPATH=contrib/msggen ${PYTHON} contrib/msggen/msggen/__main__.py bundle doc/schemas