mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
plugins: generate list of plugins more atomically, respect V=1 and --quiet.
I got a corrupt file, which looked like multiple concurrent attempts to build it. So instead, build it in one command, but also use VERBOSE so we print correctly with V=1 (and --quiet). Also move into plugins/ where it logically belongs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
488b32b003
commit
7260d9ea3d
6 changed files with 11 additions and 15 deletions
11
Makefile
11
Makefile
|
@ -208,7 +208,7 @@ WIRE_GEN_DEPS := $(WIRE_GEN) $(wildcard tools/gen/*_template)
|
||||||
ALL_PROGRAMS :=
|
ALL_PROGRAMS :=
|
||||||
ALL_TEST_PROGRAMS :=
|
ALL_TEST_PROGRAMS :=
|
||||||
ALL_C_SOURCES :=
|
ALL_C_SOURCES :=
|
||||||
ALL_C_HEADERS := gen_header_versions.h gen_list_of_builtin_plugins.h gen_version.h
|
ALL_C_HEADERS := gen_header_versions.h gen_version.h
|
||||||
|
|
||||||
CPPFLAGS += -DBINTOPKGLIBEXECDIR="\"$(shell sh tools/rel.sh $(bindir) $(pkglibexecdir))\""
|
CPPFLAGS += -DBINTOPKGLIBEXECDIR="\"$(shell sh tools/rel.sh $(bindir) $(pkglibexecdir))\""
|
||||||
CFLAGS = $(CPPFLAGS) $(CWARNFLAGS) $(CDEBUGFLAGS) $(COPTFLAGS) -I $(CCANDIR) $(EXTERNAL_INCLUDE_FLAGS) -I . -I/usr/local/include $(SQLITE3_CFLAGS) $(POSTGRES_INCLUDE) $(FEATURES) $(COVFLAGS) $(DEV_CFLAGS) -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS $(PIE_CFLAGS) $(COMPAT_CFLAGS) -DBUILD_ELEMENTS=1
|
CFLAGS = $(CPPFLAGS) $(CWARNFLAGS) $(CDEBUGFLAGS) $(COPTFLAGS) -I $(CCANDIR) $(EXTERNAL_INCLUDE_FLAGS) -I . -I/usr/local/include $(SQLITE3_CFLAGS) $(POSTGRES_INCLUDE) $(FEATURES) $(COVFLAGS) $(DEV_CFLAGS) -DSHACHAIN_BITS=48 -DJSMN_PARENT_LINKS $(PIE_CFLAGS) $(COMPAT_CFLAGS) -DBUILD_ELEMENTS=1
|
||||||
|
@ -315,15 +315,6 @@ ALL_OBJS := $(ALL_C_SOURCES:.c=.o)
|
||||||
# spurious rebuilds.
|
# spurious rebuilds.
|
||||||
$(filter %printgen.h %printgen.c %wiregen.h %wiregen.c, $(ALL_C_HEADERS) $(ALL_C_SOURCES)): FORCE
|
$(filter %printgen.h %printgen.c %wiregen.h %wiregen.c, $(ALL_C_HEADERS) $(ALL_C_SOURCES)): FORCE
|
||||||
|
|
||||||
# Generated from PLUGINS definition in plugins/Makefile
|
|
||||||
gen_list_of_builtin_plugins.h : plugins/Makefile Makefile
|
|
||||||
@echo GEN $@
|
|
||||||
@rm -f $@ || true
|
|
||||||
@echo 'static const char *list_of_builtin_plugins[] = {' >> $@
|
|
||||||
@echo '$(PLUGINS)' | sed 's@plugins/\([^ ]*\)@"\1",@g'>> $@
|
|
||||||
@echo 'NULL' >> $@
|
|
||||||
@echo '};' >> $@
|
|
||||||
|
|
||||||
ifneq ($(TEST_GROUP_COUNT),)
|
ifneq ($(TEST_GROUP_COUNT),)
|
||||||
PYTEST_OPTS += --test-group=$(TEST_GROUP) --test-group-count=$(TEST_GROUP_COUNT)
|
PYTEST_OPTS += --test-group=$(TEST_GROUP) --test-group-count=$(TEST_GROUP_COUNT)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -132,7 +132,7 @@ LIGHTNINGD_HEADERS = $(LIGHTNINGD_HEADERS_NOGEN) $(LIGHTNINGD_HEADERS_GEN) $(WAL
|
||||||
$(LIGHTNINGD_OBJS): $(LIGHTNINGD_HEADERS) $(WALLET_HDRS)
|
$(LIGHTNINGD_OBJS): $(LIGHTNINGD_HEADERS) $(WALLET_HDRS)
|
||||||
|
|
||||||
# Only the plugin component needs to depend on this header.
|
# Only the plugin component needs to depend on this header.
|
||||||
lightningd/plugin.o: gen_list_of_builtin_plugins.h
|
lightningd/plugin.o: plugins/gen_list_of_builtin_plugins.h
|
||||||
|
|
||||||
lightningd/gen_channel_state_names.h: lightningd/channel_state.h ccan/ccan/cdump/tools/cdump-enumstr
|
lightningd/gen_channel_state_names.h: lightningd/channel_state.h ccan/ccan/cdump/tools/cdump-enumstr
|
||||||
ccan/ccan/cdump/tools/cdump-enumstr lightningd/channel_state.h > $@
|
ccan/ccan/cdump/tools/cdump-enumstr lightningd/channel_state.h > $@
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
/* Only this file can include this generated header! */
|
/* Only this file can include this generated header! */
|
||||||
# include <gen_list_of_builtin_plugins.h>
|
# include <plugins/gen_list_of_builtin_plugins.h>
|
||||||
|
|
||||||
/* How many seconds may the plugin take to reply to the `getmanifest`
|
/* How many seconds may the plugin take to reply to the `getmanifest`
|
||||||
* call? This is the maximum delay to `lightningd --help` and until
|
* call? This is the maximum delay to `lightningd --help` and until
|
||||||
|
|
|
@ -116,3 +116,8 @@ $(PLUGIN_KEYSEND_OBJS): $(PLUGIN_PAY_LIB_HEADER)
|
||||||
plugins/spenderp: bitcoin/chainparams.o $(PLUGIN_SPENDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
plugins/spenderp: bitcoin/chainparams.o $(PLUGIN_SPENDER_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
||||||
|
|
||||||
$(PLUGIN_ALL_OBJS): $(PLUGIN_LIB_HEADER)
|
$(PLUGIN_ALL_OBJS): $(PLUGIN_LIB_HEADER)
|
||||||
|
|
||||||
|
# Generated from PLUGINS definition in plugins/Makefile
|
||||||
|
ALL_C_HEADERS += plugins/gen_list_of_builtin_plugins.h
|
||||||
|
plugins/gen_list_of_builtin_plugins.h: plugins/Makefile Makefile
|
||||||
|
@$(call VERBOSE,GEN $@,echo "static const char *list_of_builtin_plugins[] = { $(foreach d,$(notdir $(PLUGINS)),\"$d\",) NULL };" > $@)
|
||||||
|
|
2
wallet/db_sqlite3_sqlgen.c
generated
2
wallet/db_sqlite3_sqlgen.c
generated
|
@ -1654,4 +1654,4 @@ struct db_query db_sqlite3_queries[] = {
|
||||||
|
|
||||||
#endif /* LIGHTNINGD_WALLET_GEN_DB_SQLITE3 */
|
#endif /* LIGHTNINGD_WALLET_GEN_DB_SQLITE3 */
|
||||||
|
|
||||||
// SHA256STAMP:da7062bd6da96d600c8607162e7a125f3a67c9e830c687656e5746b6a6bb8ae2
|
// SHA256STAMP:fa191e6b54c56b2d4e85a24ca83bc0d41dddec5dbde948e2bc5d627426089ade
|
||||||
|
|
4
wallet/statements_gettextgen.po
generated
4
wallet/statements_gettextgen.po
generated
|
@ -1086,7 +1086,7 @@ msgstr ""
|
||||||
msgid "not a valid SQL statement"
|
msgid "not a valid SQL statement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: wallet/test/run-wallet.c:603
|
#: wallet/test/run-wallet.c:1359
|
||||||
msgid "INSERT INTO channels (id) VALUES (1);"
|
msgid "INSERT INTO channels (id) VALUES (1);"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
# SHA256STAMP:7bc86b6b93e4bdb7d4b06ac466ce647bc2f81aaaca980c973d850dff7eebc0a8
|
# SHA256STAMP:fb0b381451867f44c3f35f2202e741a06ff9f531329facf6e9df302036eff4e4
|
||||||
|
|
Loading…
Add table
Reference in a new issue