From 746b5f3691525a37f837fdabd8bd967e8683834b Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 13 Sep 2022 06:43:20 +0930 Subject: [PATCH] Makefile: fix msggen regeneration when schemas change. 1. It depends on both request and reply schemas. 2. Wildcards aren't natively expanded in make, so use $(wildcard). Signed-off-by: Rusty Russell --- cln-rpc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cln-rpc/Makefile b/cln-rpc/Makefile index 267b7eadf..9f2595a92 100644 --- a/cln-rpc/Makefile +++ b/cln-rpc/Makefile @@ -4,10 +4,10 @@ cln-rpc-wrongdir: CLN_RPC_EXAMPLES := target/debug/examples/cln-rpc-getinfo CLN_RPC_GENALL = cln-rpc/src/model.rs CLN_RPC_SOURCES = $(shell find cln-rpc -name *.rs) ${CLN_RPC_GENALL} -JSON_SCHEMA = doc/schemas/*.schema.json +JSON_SCHEMAS = $(wildcard doc/schemas/*.request.json doc/schemas/*.schema.json) DEFAULT_TARGETS += $(CLN_RPC_EXAMPLES) $(CLN_RPC_GENALL) -$(CLN_RPC_GENALL): $(JSON_SCHEMA) +$(CLN_RPC_GENALL): $(JSON_SCHEMAS) PYTHONPATH=contrib/msggen python3 contrib/msggen/msggen/__main__.py target/debug/examples/cln-rpc-getinfo: $(shell find cln-rpc -name *.rs)