mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
check-source-bolt: generalize.
This way sub-Makefiles can add their own files to check. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
b4f495fe99
commit
0861ec33a5
9
Makefile
9
Makefile
@ -240,8 +240,13 @@ check-makefile: check-daemon-makefile
|
||||
@if [ x"$(CCANDIR)/config.h `find $(CCANDIR)/ccan -name '*.h' | grep -v /test/ | LC_ALL=C sort | tr '\n' ' '`" != x"$(CCAN_HEADERS) " ]; then echo CCAN_HEADERS incorrect; exit 1; fi
|
||||
|
||||
# Any mention of BOLT# must be followed by an exact quote, modulo whitepace.
|
||||
check-source-bolt: check-bolt
|
||||
@if [ ! -d $(BOLTDIR) ]; then echo Not checking BOLT references: BOLTDIR $(BOLTDIR) does not exist >&2; else set -e; rm -rf .tmp.lightningrfc; if [ -n "$(BOLTVERSION)" ]; then git clone -q -b $(BOLTVERSION) $(BOLTDIR) .tmp.lightningrfc; else cp -a $(BOLTDIR) .tmp.lightningrfc; fi; ./check-bolt .tmp.lightningrfc $(CORE_SRC) $(BITCOIN_SRC) $(DAEMON_SRC) $(CORE_HEADERS) $(BITCOIN_HEADERS) $(DAEMON_HEADERS) $(WIRE_SRC) $(WIRE_HEADERS) $(TEST_PROGRAMS:=.c); fi
|
||||
bolt-check/%: % bolt-precheck check-bolt
|
||||
@[ ! -d .tmp.lightningrfc ] || ./check-bolt .tmp.lightningrfc $<
|
||||
|
||||
bolt-precheck:
|
||||
@rm -rf .tmp.lightningrfc; if [ ! -d $(BOLTDIR) ]; then echo Not checking BOLT references: BOLTDIR $(BOLTDIR) does not exist >&2; exit 0; fi; set -e; if [ -n "$(BOLTVERSION)" ]; then git clone -q -b $(BOLTVERSION) $(BOLTDIR) .tmp.lightningrfc; else cp -a $(BOLTDIR) .tmp.lightningrfc; fi
|
||||
|
||||
check-source-bolt: $(CORE_SRC:%=bolt-check/%) $(CORE_HEADERS:%=bolt-check/%) $(TEST_PROGRAMS:%=bolt-check/%.c)
|
||||
|
||||
check-bolt: check-bolt.o $(CCAN_OBJS)
|
||||
|
||||
|
@ -13,4 +13,6 @@ $(BITCOIN_TEST_OBJS): $(CCAN_HEADERS) $(BITCOIN_HEADERS) $(BITCOIN_SRC)
|
||||
|
||||
check: bitcoin-tests
|
||||
|
||||
check-source-bolt: $(BITCOIN_SRC:%=bolt-check/%) $(BITCOIN_HEADERS:%=bolt-check/%)
|
||||
|
||||
bitcoin-tests: $(BITCOIN_TEST_PROGRAMS:%=unittest/%)
|
||||
|
@ -121,6 +121,8 @@ check-source: $(DAEMON_HEADERS:%=check-hdr-include-order/%)
|
||||
check-daemon-makefile:
|
||||
@if [ "`ls daemon/*.h | grep -v daemon/gen | tr '\012' ' '`" != "`echo $(DAEMON_HEADERS) ''`" ]; then echo DAEMON_HEADERS incorrect; exit 1; fi
|
||||
|
||||
check-source-bolt: $(DAEMON_SRC:%=bolt-check/%) $(DAEMON_HEADERS:%=bolt-check/%)
|
||||
|
||||
# Git submodules are seriously broken.
|
||||
daemon/jsmn/jsmn.h:
|
||||
git submodule update daemon/jsmn/
|
||||
|
@ -25,6 +25,9 @@ wire/gen_wire.c: wire/tools/generate-wire.py wire/gen_wire_csv
|
||||
|
||||
wire/gen_wire.o: wire/gen_wire.h
|
||||
|
||||
check-source: $(WIRE_SRC:%=check-src-include-order/%) $(WIRE_HEADERS:%=check-hdr-include-order/%)
|
||||
|
||||
check-source-bolt: $(WIRE_SRC:%=bolt-check/%) $(WIRE_HEADERS:%=bolt-check/%)
|
||||
clean: wire-clean
|
||||
|
||||
wire-all: wire/gen_wire.o wire/fromwire.o wire/towire.o
|
||||
|
Loading…
Reference in New Issue
Block a user