From 26ffa8fdec7ab167d6329387ac1794b3af386034 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 22 Aug 2017 14:34:11 +0930 Subject: [PATCH] check-bolt: move to tools/ Signed-off-by: Rusty Russell --- .gitignore | 2 +- Makefile | 11 ++++++----- check-bolt.c => tools/check-bolt.c | 0 3 files changed, 7 insertions(+), 6 deletions(-) rename check-bolt.c => tools/check-bolt.c (100%) diff --git a/.gitignore b/.gitignore index 706ef43d1..94e0baf48 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,7 @@ libwallycore.a libwallycore.la gen_* daemon/lightning-cli -check-bolt +tools/check-bolt coverage ccan/config.h __pycache__ diff --git a/Makefile b/Makefile index 47aa00c49..d6ffd7908 100644 --- a/Makefile +++ b/Makefile @@ -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/%) \ @@ -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 diff --git a/check-bolt.c b/tools/check-bolt.c similarity index 100% rename from check-bolt.c rename to tools/check-bolt.c