mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
Makefile: generalize whitespace check.
Spread to individual Makefiles, and include headers. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
751a0ae5cf
commit
b7789bf065
6
Makefile
6
Makefile
@ -252,8 +252,10 @@ check-bolt: check-bolt.o $(CCAN_OBJS)
|
||||
|
||||
check-bolt.o: $(CCAN_HEADERS)
|
||||
|
||||
check-whitespace:
|
||||
@if grep -n '[ ]$$' Makefile daemon/test/Makefile daemon/Makefile bitcoin/Makefile check-bolt.c $(CORE_SRC) $(BITCOIN_SRC) $(DAEMON_SRC); then echo Extraneous whitespace found >&2; exit 1; fi
|
||||
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_HEADERS:%=check-whitespace/%)
|
||||
|
||||
check-source: check-makefile check-source-bolt check-whitespace \
|
||||
$(CORE_SRC:%=check-src-include-order/%) \
|
||||
|
@ -15,4 +15,6 @@ check: bitcoin-tests
|
||||
|
||||
check-source-bolt: $(BITCOIN_SRC:%=bolt-check/%) $(BITCOIN_HEADERS:%=bolt-check/%)
|
||||
|
||||
check-whitespace: $(BITCOIN_SRC:%=check-whitespace/%) $(BITCOIN_HEADERS:%=check-whitespace/%) check-whitespace/bitcoin/Makefile
|
||||
|
||||
bitcoin-tests: $(BITCOIN_TEST_PROGRAMS:%=unittest/%)
|
||||
|
@ -123,6 +123,8 @@ check-daemon-makefile:
|
||||
|
||||
check-source-bolt: $(DAEMON_SRC:%=bolt-check/%) $(DAEMON_HEADERS:%=bolt-check/%)
|
||||
|
||||
check-whitespace: $(DAEMON_SRC:%=check-whitespace/%) $(DAEMON_HEADERS:%=check-whitespace/%) check-whitespace/daemon/Makefile
|
||||
|
||||
# Git submodules are seriously broken.
|
||||
daemon/jsmn/jsmn.h:
|
||||
git submodule update daemon/jsmn/
|
||||
|
@ -28,6 +28,9 @@ 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/%)
|
||||
|
||||
check-whitespace: $(WIRE_SRC:%=check-whitespace/%) $(WIRE_HEADERS:%=check-whitespace/%) check-whitespace/wire/Makefile
|
||||
|
||||
clean: wire-clean
|
||||
|
||||
wire-all: wire/gen_wire.o wire/fromwire.o wire/towire.o
|
||||
|
Loading…
Reference in New Issue
Block a user