Browse Source

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>
travis-experimental
Rusty Russell 4 years ago
committed by Christian Decker
parent
commit
7260d9ea3d
  1. 11
      Makefile
  2. 2
      lightningd/Makefile
  3. 2
      lightningd/plugin.c
  4. 5
      plugins/Makefile
  5. 2
      wallet/db_sqlite3_sqlgen.c
  6. 4
      wallet/statements_gettextgen.po

11
Makefile

@ -208,7 +208,7 @@ WIRE_GEN_DEPS := $(WIRE_GEN) $(wildcard tools/gen/*_template)
ALL_PROGRAMS :=
ALL_TEST_PROGRAMS :=
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))\""
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.
$(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),)
PYTEST_OPTS += --test-group=$(TEST_GROUP) --test-group-count=$(TEST_GROUP_COUNT)
endif

2
lightningd/Makefile

@ -132,7 +132,7 @@ LIGHTNINGD_HEADERS = $(LIGHTNINGD_HEADERS_NOGEN) $(LIGHTNINGD_HEADERS_GEN) $(WAL
$(LIGHTNINGD_OBJS): $(LIGHTNINGD_HEADERS) $(WALLET_HDRS)
# 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
ccan/ccan/cdump/tools/cdump-enumstr lightningd/channel_state.h > $@

2
lightningd/plugin.c

@ -18,7 +18,7 @@
#include <sys/types.h>
/* 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`
* call? This is the maximum delay to `lightningd --help` and until

5
plugins/Makefile

@ -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)
$(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

@ -1654,4 +1654,4 @@ struct db_query db_sqlite3_queries[] = {
#endif /* LIGHTNINGD_WALLET_GEN_DB_SQLITE3 */
// SHA256STAMP:da7062bd6da96d600c8607162e7a125f3a67c9e830c687656e5746b6a6bb8ae2
// SHA256STAMP:fa191e6b54c56b2d4e85a24ca83bc0d41dddec5dbde948e2bc5d627426089ade

4
wallet/statements_gettextgen.po

@ -1086,7 +1086,7 @@ msgstr ""
msgid "not a valid SQL statement"
msgstr ""
#: wallet/test/run-wallet.c:603
#: wallet/test/run-wallet.c:1359
msgid "INSERT INTO channels (id) VALUES (1);"
msgstr ""
# SHA256STAMP:7bc86b6b93e4bdb7d4b06ac466ce647bc2f81aaaca980c973d850dff7eebc0a8
# SHA256STAMP:fb0b381451867f44c3f35f2202e741a06ff9f531329facf6e9df302036eff4e4

Loading…
Cancel
Save