From c598d4df7483151160abd96b80a6f3970cfb9973 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 10 Apr 2022 20:08:15 +0930 Subject: [PATCH] Makefile: make sure ALL_PROGRAMS doesn't include cln-grpc plugin. $(ALL_PROGRAMS) are assumed to be C programs for now. Add $(C_PLUGINS) as a new variable. Signed-off-by: Rusty Russell --- plugins/Makefile | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/plugins/Makefile b/plugins/Makefile index 27983596d..429c27079 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -75,7 +75,7 @@ PLUGIN_ALL_HEADER := \ $(PLUGIN_SPENDER_HEADER) PLUGIN_ALL_OBJS := $(PLUGIN_ALL_SRC:.c=.o) -PLUGINS := \ +C_PLUGINS := \ plugins/autoclean \ plugins/bcli \ plugins/fetchinvoice \ @@ -87,10 +87,22 @@ PLUGINS := \ plugins/txprepare \ plugins/spenderp +PLUGINS := $(C_PLUGINS) + +ifneq ($(RUST),0) +# Builtin plugins must be in this plugins dir to work when we're executed +# *without* make install. +plugins/cln-grpc: target/${RUST_PROFILE}/cln-grpc + @cp $< $@ + +DEFAULT_TARGETS += $(CLN_PLUGIN_EXAMPLES) plugins/cln-grpc +PLUGINS += plugins/cln-grpc +endif + # Make sure these depend on everything. ALL_C_SOURCES += $(PLUGIN_ALL_SRC) ALL_C_HEADERS += $(PLUGIN_ALL_HEADER) -ALL_PROGRAMS += $(PLUGINS) +ALL_PROGRAMS += $(C_PLUGINS) PLUGIN_COMMON_OBJS := \ bitcoin/base58.o \ @@ -168,16 +180,6 @@ plugins/fetchinvoice: bitcoin/chainparams.o $(PLUGIN_FETCHINVOICE_OBJS) $(PLUGIN plugins/funder: bitcoin/chainparams.o bitcoin/psbt.o common/psbt_open.o $(PLUGIN_FUNDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) -ifneq ($(RUST),0) -# Builtin plugins must be in this plugins dir to work when we're executed -# *without* make install. -plugins/cln-grpc: target/${RUST_PROFILE}/cln-grpc - @cp $< $@ - -DEFAULT_TARGETS += $(CLN_PLUGIN_EXAMPLES) plugins/cln-grpc -PLUGINS += plugins/cln-grpc -endif - # Generated from PLUGINS definition in plugins/Makefile ALL_C_HEADERS += plugins/list_of_builtin_plugins_gen.h plugins/list_of_builtin_plugins_gen.h: plugins/Makefile Makefile