mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
Makefile: don't rebuild all the time
The code to regenerate the local BOLT copy was causing eternal rebuild. So only build if it's wrong. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
edb74260f4
commit
1b80cb4269
1 changed files with 2 additions and 2 deletions
4
Makefile
4
Makefile
|
@ -243,12 +243,12 @@ check-makefile:
|
|||
|
||||
# Any mention of BOLT# must be followed by an exact quote, modulo whitespace.
|
||||
bolt-check/%: % bolt-precheck tools/check-bolt
|
||||
@[ ! -d .tmp.lightningrfc ] || tools/check-bolt .tmp.lightningrfc $<
|
||||
@if [ -d .tmp.lightningrfc ]; then tools/check-bolt .tmp.lightningrfc $<; else Not checking BOLTs: BOLTDIR $(BOLTDIR) does not exist >&2; fi
|
||||
|
||||
LOCAL_BOLTDIR=.tmp.lightningrfc
|
||||
|
||||
bolt-precheck:
|
||||
@rm -rf $(LOCAL_BOLTDIR); if [ ! -d $(BOLTDIR) ]; then echo Not checking BOLTs: BOLTDIR $(BOLTDIR) does not exist >&2; exit 0; fi; set -e; if [ -n "$(BOLTVERSION)" ]; then git clone -q $(BOLTDIR) $(LOCAL_BOLTDIR) && cd $(LOCAL_BOLTDIR) && git checkout -q $(BOLTVERSION); else cp -a $(BOLTDIR) $(LOCAL_BOLTDIR); fi
|
||||
@[ -d $(BOLTDIR) ] || exit 0; set -e; if [ -z "$(BOLTVERSION)" ]; then rm -rf $(LOCAL_BOLTDIR); ln -sf $(BOLTDIR) $(LOCAL_BOLTDIR); exit 0; fi; [ "$$(git -C $(LOCAL_BOLTDIR) rev-list --max-count=1 HEAD 2>/dev/null)" != "$(BOLTVERSION)" ] || exit 0; rm -rf $(LOCAL_BOLTDIR) && git clone -q $(BOLTDIR) $(LOCAL_BOLTDIR) && cd $(LOCAL_BOLTDIR) && git checkout -q $(BOLTVERSION)
|
||||
|
||||
check-source-bolt: $(ALL_TEST_PROGRAMS:%=bolt-check/%.c)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue