mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
Makefiles: fix from-scratch parallel build.
1) Need config.h before wire/gen_ are compiled. 2) The rule to checkout the libbase58 submodule doesn't work, so use the older one-depends-on-the-other approach. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
be4af38d0c
commit
dc562f0533
@ -26,9 +26,11 @@ LIBBASE58_SRC := bitcoin/libbase58/base58.c
|
||||
# Can't be inside submodule, as that makes git think it's dirty.
|
||||
LIBBASE58_OBJS := bitcoin/libbase58.o
|
||||
|
||||
# Wildcards here are magic. See http://stackoverflow.com/questions/2973445/gnu-makefile-rule-generating-a-few-targets-from-a-single-source-file
|
||||
bitcoin/libbase58/libbase58.% bitcoin/libbase58/base58.%:
|
||||
git submodule update bitcoin/libbase58/
|
||||
# Wildcards trick from http://stackoverflow.com/questions/2973445/gnu-makefile-rule-generating-a-few-targets-from-a-single-source-file doesn't work with no dependency, so instead make one depend on the other:
|
||||
$(LIBBASE58_SRC): $(LIBBASE58_HEADERS)
|
||||
|
||||
$(LIBBASE58_HEADERS):
|
||||
git submodule update bitcoin/libbase58/ || true
|
||||
[ -f $@ ] || git submodule update --init bitcoin/libbase58/
|
||||
|
||||
bitcoin/libbase58.o: bitcoin/libbase58/base58.c
|
||||
|
@ -42,8 +42,8 @@ wire/gen_onion_wire.h: $(WIRE_GEN) wire/gen_onion_wire_csv
|
||||
wire/gen_onion_wire.c: $(WIRE_GEN) wire/gen_onion_wire_csv
|
||||
$(WIRE_GEN) ${@:.c=.h} onion_type < wire/gen_onion_wire_csv > $@
|
||||
|
||||
wire/gen_peer_wire.o: wire/gen_peer_wire.h
|
||||
wire/gen_onion_wire.o: wire/gen_onion_wire.h
|
||||
wire/gen_peer_wire.o: wire/gen_peer_wire.h $(CCAN_HEADERS)
|
||||
wire/gen_onion_wire.o: wire/gen_onion_wire.h $(CCAN_HEADERS)
|
||||
|
||||
check-source: $(WIRE_SRC:%=check-src-include-order/%) $(WIRE_HEADERS:%=check-hdr-include-order/%)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user