lightningd/Make: cleanup lightningd+wallet headers

There is no "wallet_lib_headers" variable in wallet/Makefile

Likewise, there were two "lightningd_headers", a couple of unused
variables and some other nonsene in lightningd/Makefile
This commit is contained in:
niftynei 2021-12-16 13:07:33 -06:00 committed by Rusty Russell
parent cd37753849
commit b0829fc52a
3 changed files with 10 additions and 13 deletions

View file

@ -38,25 +38,27 @@ LIGHTNINGD_SRC := \
lightningd/subd.c \
lightningd/watch.c
LIGHTNINGD_SRC_NOHDR := \
lightningd/datastore.c \
lightningd/ping.c \
lightningd/offer.c \
lightningd/signmessage.c
LIGHTNINGD_HEADERS := \
include wallet/Makefile
LIGHTNINGD_HDRS := \
$(LIGHTNINGD_SRC:.c=.h) \
lightningd/channel_state.h \
lightningd/channel_state_names_gen.h
lightningd/channel_state_names_gen.h \
$(WALLET_HDRS)
LIGHTNINGD_OBJS := $(LIGHTNINGD_SRC:.c=.o) $(LIGHTNINGD_SRC_NOHDR:.c=.o)
$(LIGHTNINGD_OBJS): $(LIGHTNINGD_HEADERS) $(LIGHTNINGD_CONTROL_HEADERS)
$(LIGHTNINGD_OBJS): $(LIGHTNINGD_HDRS) $(LIGHTNINGD_CONTROL_HEADERS)
# Make sure these depend on everything.
ALL_C_SOURCES += $(LIGHTNINGD_SRC) $(LIGHTNINGD_SRC_NOHDR)
ALL_C_HEADERS += $(LIGHTNINGD_HEADERS)
ALL_C_HEADERS += $(LIGHTNINGD_HDRS)
ALL_PROGRAMS += lightningd/lightningd
# Common source we use.
@ -129,12 +131,8 @@ LIGHTNINGD_COMMON_OBJS := \
common/wire_error.o \
common/wireaddr.o \
include wallet/Makefile
# All together in one convenient var
LIGHTNINGD_HEADERS = $(LIGHTNINGD_HEADERS_NOGEN) $(LIGHTNINGD_HEADERS_GEN) $(WALLET_HDRS)
$(LIGHTNINGD_OBJS): $(LIGHTNINGD_HEADERS)
$(LIGHTNINGD_OBJS): $(LIGHTNINGD_HDRS)
$(WALLET_OBJS): $(LIGHTNINGD_HDRS)
# Only the plugin component needs to depend on this header.
lightningd/plugin.o: plugins/list_of_builtin_plugins_gen.h

View file

@ -29,6 +29,6 @@ LIGHTNINGD_TEST_COMMON_OBJS := \
$(LIGHTNINGD_TEST_PROGRAMS): $(CCAN_OBJS) $(BITCOIN_OBJS) $(WIRE_OBJS) $(LIGHTNINGD_TEST_COMMON_OBJS)
$(LIGHTNINGD_TEST_OBJS): $(LIGHTNINGD_HEADERS) $(LIGHTNINGD_SRC) $(LIGHTNINGD_SRC_NOHDR)
$(LIGHTNINGD_TEST_OBJS): $(LIGHTNINGD_HDRS) $(LIGHTNINGD_SRC) $(LIGHTNINGD_SRC_NOHDR)
check-units: $(LIGHTNINGD_TEST_PROGRAMS:%=unittest/%)

View file

@ -18,7 +18,6 @@ WALLET_SRC := $(WALLET_LIB_SRC) $(WALLET_LIB_SRC_NOHDR) $(WALLET_DB_DRIVERS)
WALLET_HDRS := $(WALLET_LIB_SRC:.c=.h)
WALLET_OBJS := $(WALLET_SRC:.c=.o)
$(WALLET_OBJS): $(WALLET_HDRS) $(LIGHTNINGD_HEADERS)
# Make sure these depend on everything.
ALL_C_SOURCES += $(WALLET_SRC) wallet/db_sqlite3_sqlgen.c wallet/db_postgres_sqlgen.c