Browse Source

Makefile: add daemon source sanity checks.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 9 years ago
parent
commit
3e77c55a3b
  1. 2
      Makefile
  2. 2
      daemon/Makefile

2
Makefile

@ -230,7 +230,7 @@ check-hdr-include-order/%: %
@if [ "$$(grep '^#include' < $< | tail -n +2)" != "$$(grep '^#include' < $< | tail -n +2 | LC_ALL=C sort)" ]; then echo "$<:1: includes out of order"; exit 1; fi
# Make sure Makefile includes all headers.
check-makefile:
check-makefile: check-daemon-makefile
@if [ "`echo bitcoin/*.h`" != "$(BITCOIN_HEADERS)" ]; then echo BITCOIN_HEADERS incorrect; exit 1; fi
@if [ "`echo test-cli/*.h`" != "$(TEST_CLI_HEADERS)" ]; then echo TEST_CLI_HEADERS incorrect; exit 1; fi
@if [ x"`ls *.h | grep -v ^gen_ | fgrep -v lightning.pb-c.h | tr '\n' ' '`" != x"$(CORE_HEADERS) " ]; then echo CORE_HEADERS incorrect; exit 1; fi

2
daemon/Makefile

@ -21,5 +21,7 @@ $(DAEMON_OBJS): $(DAEMON_HEADERS) $(BITCOIN_HEADERS) $(CORE_HEADERS) $(GEN_HEADE
check-source: $(DAEMON_SRC:%=check-src-include-order/%)
check-source: $(DAEMON_HEADERS:%=check-hdr-include-order/%)
check-daemon-makefile:
@if [ "`echo daemon/*.h`" != "$(DAEMON_HEADERS)" ]; then echo DAEMON_HEADERS incorrect; exit 1; fi
daemon/lightningd: $(DAEMON_OBJS) $(CCAN_OBJS)

Loading…
Cancel
Save