gen_pkt_names, gen_state_names: move into daemon/

That's where they're used.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2016-11-09 08:04:27 +10:30
parent c1e04eb43b
commit ec072b5d68
3 changed files with 13 additions and 13 deletions

View File

@ -162,9 +162,7 @@ CORE_HEADERS := close_tx.h \
utils.h \ utils.h \
version.h version.h
GEN_HEADERS := gen_pkt_names.h \ GEN_HEADERS := gen_version.h \
gen_state_names.h \
gen_version.h \
lightning.pb-c.h lightning.pb-c.h
CDUMP_OBJS := ccan-cdump.o ccan-strmap.o CDUMP_OBJS := ccan-cdump.o ccan-strmap.o
@ -249,13 +247,6 @@ FORCE::
ccan/ccan/cdump/tools/cdump-enumstr: ccan/ccan/cdump/tools/cdump-enumstr.o $(CDUMP_OBJS) $(CCAN_OBJS) ccan/ccan/cdump/tools/cdump-enumstr: ccan/ccan/cdump/tools/cdump-enumstr.o $(CDUMP_OBJS) $(CCAN_OBJS)
gen_state_names.h: state_types.h ccan/ccan/cdump/tools/cdump-enumstr
ccan/ccan/cdump/tools/cdump-enumstr state_types.h > $@
# lightning.pb-c.h doesn't create a named enum, just a typedef. Hack it.
gen_pkt_names.h: lightning.pb-c.h ccan/ccan/cdump/tools/cdump-enumstr
(echo 'enum PktCase {'; grep '^ PKT__' lightning.pb-c.h; echo '};') | ccan/ccan/cdump/tools/cdump-enumstr - | sed 's/enum PktCase/Pkt__PktCase/' > $@
# We build a static libsecpk1, since we need ecdh # We build a static libsecpk1, since we need ecdh
# (and it's not API stable yet!). # (and it's not API stable yet!).
libsecp256k1.a: secp256k1/libsecp256k1.la libsecp256k1.a: secp256k1/libsecp256k1.la

View File

@ -54,7 +54,9 @@ DAEMON_JSMN_HEADERS := daemon/jsmn/jsmn.h
DAEMON_GEN_HEADERS := \ DAEMON_GEN_HEADERS := \
daemon/gen_feechange_state_names.h \ daemon/gen_feechange_state_names.h \
daemon/gen_htlc_state_names.h daemon/gen_htlc_state_names.h \
daemon/gen_pkt_names.h \
daemon/gen_state_names.h
DAEMON_HEADERS := \ DAEMON_HEADERS := \
daemon/bitcoind.h \ daemon/bitcoind.h \
@ -97,6 +99,13 @@ daemon/gen_htlc_state_names.h: daemon/htlc_state.h ccan/ccan/cdump/tools/cdump-e
daemon/gen_feechange_state_names.h: daemon/feechange_state.h ccan/ccan/cdump/tools/cdump-enumstr daemon/gen_feechange_state_names.h: daemon/feechange_state.h ccan/ccan/cdump/tools/cdump-enumstr
ccan/ccan/cdump/tools/cdump-enumstr daemon/feechange_state.h > $@ ccan/ccan/cdump/tools/cdump-enumstr daemon/feechange_state.h > $@
daemon/gen_state_names.h: state_types.h ccan/ccan/cdump/tools/cdump-enumstr
ccan/ccan/cdump/tools/cdump-enumstr state_types.h > $@
# lightning.pb-c.h doesn't create a named enum, just a typedef. Hack it.
daemon/gen_pkt_names.h: lightning.pb-c.h ccan/ccan/cdump/tools/cdump-enumstr
(echo 'enum PktCase {'; grep '^ PKT__' lightning.pb-c.h; echo '};') | ccan/ccan/cdump/tools/cdump-enumstr - | sed 's/enum PktCase/Pkt__PktCase/' > $@
$(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_CLI_OBJS): $(DAEMON_HEADERS) $(DAEMON_JSMN_HEADERS) $(BITCOIN_HEADERS) $(CORE_HEADERS) $(GEN_HEADERS) $(DAEMON_GEN_HEADERS) $(CCAN_HEADERS) $(DAEMON_OBJS) $(DAEMON_LIB_OBJS) $(DAEMON_CLI_OBJS): $(DAEMON_HEADERS) $(DAEMON_JSMN_HEADERS) $(BITCOIN_HEADERS) $(CORE_HEADERS) $(GEN_HEADERS) $(DAEMON_GEN_HEADERS) $(CCAN_HEADERS)
$(DAEMON_JSMN_OBJS): $(DAEMON_JSMN_HEADERS) $(DAEMON_JSMN_OBJS): $(DAEMON_JSMN_HEADERS)

View File

@ -1,8 +1,8 @@
#include "names.h" #include "names.h"
#include <ccan/str/str.h> #include <ccan/str/str.h>
/* Indented for 'check-source' because it has to be included after names.h */ /* Indented for 'check-source' because it has to be included after names.h */
#include "gen_state_names.h" #include "daemon/gen_state_names.h"
#include "gen_pkt_names.h" #include "daemon/gen_pkt_names.h"
const char *state_name(enum state s) const char *state_name(enum state s)
{ {