Skip to content

Commit

Permalink
check-bolt: move to tools/
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell authored and cdecker committed Aug 22, 2017
1 parent 46bdd4b commit 26ffa8f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ libwallycore.a
libwallycore.la
gen_*
daemon/lightning-cli
check-bolt
tools/check-bolt
coverage
ccan/config.h
__pycache__
Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -261,22 +261,22 @@ 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.
bolt-check/%: % bolt-precheck check-bolt
@[ ! -d .tmp.lightningrfc ] || ./check-bolt .tmp.lightningrfc $<
bolt-check/%: % bolt-precheck tools/check-bolt
@[ ! -d .tmp.lightningrfc ] || tools/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_TX_SRC:%=bolt-check/%) $(CORE_PROTOBUF_SRC:%=bolt-check/%) $(CORE_HEADERS:%=bolt-check/%) $(TEST_PROGRAMS:%=bolt-check/%.c)

check-bolt: check-bolt.o $(CCAN_OBJS)
tools/check-bolt: tools/check-bolt.o $(CCAN_OBJS)

check-bolt.o: $(CCAN_HEADERS)
tools/check-bolt.o: $(CCAN_HEADERS)

check-whitespace/%: %
@if grep -Hn '[ ]$$' $<; then echo Extraneous whitespace found >&2; exit 1; fi

check-whitespace: check-whitespace/Makefile check-whitespace/check-bolt.c $(CORE_SRC:%=check-whitespace/%) $(CORE_TX_SRC:%=check-whitespace/%) $(CORE_PROTOBUF_SRC:%=check-whitespace/%) $(CORE_HEADERS:%=check-whitespace/%)
check-whitespace: check-whitespace/Makefile check-whitespace/tools/check-bolt.c $(CORE_SRC:%=check-whitespace/%) $(CORE_TX_SRC:%=check-whitespace/%) $(CORE_PROTOBUF_SRC:%=check-whitespace/%) $(CORE_HEADERS:%=check-whitespace/%)

check-source: check-makefile check-source-bolt check-whitespace \
$(CORE_SRC:%=check-src-include-order/%) \
Expand Down Expand Up @@ -375,6 +375,7 @@ clean: daemon-clean wire-clean
$(RM) bitcoin/*.o *.o $(PROGRAMS:=.o) $(CCAN_OBJS)
$(RM) ccan/config.h gen_*.h
$(RM) ccan/ccan/cdump/tools/cdump-enumstr.o
$(RM) check-bolt tools/check-bolt tools/*.o
find . -name '*gcda' -delete
find . -name '*gcno' -delete

Expand Down
File renamed without changes.

0 comments on commit 26ffa8f

Please sign in to comment.