We take over the --bookkeeper-dir and --bookkeeper-db options, and then if we can find the bookkeeper db we extract the records to initialize our chain_moves and channel_moves tables. Of course, bookkeeper now needs to not register those options. When bookkeeper gets invoked the first time, it will reconstruct everything from listchannelmoves and listcoinmoves. It cannot preserve manually-added descriptions, so we put those in the datastore for it ready to go. Note that the order of onchain_fee changes slightly from the original. But this is fine. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
59 lines
1.7 KiB
Makefile
59 lines
1.7 KiB
Makefile
#! /usr/bin/make
|
|
|
|
WALLET_LIB_SRC := \
|
|
wallet/account_migration.c \
|
|
wallet/db.c \
|
|
wallet/invoices.c \
|
|
wallet/psbt_fixup.c \
|
|
wallet/txfilter.c \
|
|
wallet/wallet.c \
|
|
wallet/walletrpc.c
|
|
|
|
WALLET_LIB_SRC_NOHDR := \
|
|
wallet/reservation.c
|
|
|
|
WALLET_DB_QUERIES := \
|
|
wallet/db_sqlite3_sqlgen.c \
|
|
wallet/db_postgres_sqlgen.c
|
|
|
|
WALLET_SRC := $(WALLET_LIB_SRC) $(WALLET_LIB_SRC_NOHDR) $(WALLET_DB_QUERIES)
|
|
WALLET_HDRS := $(WALLET_LIB_SRC:.c=.h)
|
|
|
|
WALLET_OBJS := $(WALLET_SRC:.c=.o)
|
|
|
|
# This really should be a subdir of lightningd/. We depend on their headers!
|
|
$(WALLET_OBJS): $(LIGHTNINGD_SRC:.c=.h)
|
|
|
|
# Make sure these depend on everything.
|
|
ALL_C_SOURCES += $(WALLET_SRC) $(WALLET_DB_QUERIES)
|
|
ALL_C_HEADERS += $(WALLET_HDRS)
|
|
|
|
# The following files contain SQL-annotated statements that we need to extact
|
|
WALLET_SQL_FILES := \
|
|
$(DB_SQL_FILES) \
|
|
wallet/account_migration.c \
|
|
wallet/db.c \
|
|
wallet/invoices.c \
|
|
wallet/wallet.c \
|
|
wallet/test/run-db.c \
|
|
wallet/test/run-wallet.c \
|
|
|
|
wallet/statements_gettextgen.po: $(WALLET_SQL_FILES) $(FORCE)
|
|
@if $(call SHA256STAMP_CHANGED); then \
|
|
$(call VERBOSE,"xgettext $@",xgettext -kNAMED_SQL -kSQL --add-location --no-wrap --omit-header -o $@ $(WALLET_SQL_FILES) && $(call SHA256STAMP,# ,)); \
|
|
fi
|
|
|
|
wallet/db_%_sqlgen.c: wallet/statements_gettextgen.po devtools/sql-rewrite.py $(FORCE)
|
|
@if $(call SHA256STAMP_CHANGED); then \
|
|
$(call VERBOSE,"sql-rewrite $@",devtools/sql-rewrite.py wallet/statements_gettextgen.po $* > $@ && $(call SHA256STAMP,//,)); \
|
|
fi
|
|
|
|
maintainer-clean: clean
|
|
clean: wallet-maintainer-clean
|
|
wallet-maintainer-clean:
|
|
$(RM) wallet/statements.po
|
|
$(RM) wallet/statements_gettextgen.po
|
|
$(RM) $(WALLET_DB_QUERIES)
|
|
|
|
include wallet/test/Makefile
|