From 3c5ea7fd8e399e38d74031ff1a25263a1b9ae263 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 6 Apr 2021 10:51:20 +0930 Subject: [PATCH] Makefile: make it easier to check bolt text. Instead of "only check suffix quotes when EXPERIMENTAL_FEATURES", make it so we only check suffix quotes if you override BOLTVERSION on the cmdline. Before this, "make check-source-bolt" was effectively a NOOP with --enable-experimental-features. Signed-off-by: Rusty Russell --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 935ef9516..7e8829bc7 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,9 @@ CCANDIR := ccan # Where we keep the BOLT RFCs BOLTDIR := ../lightning-rfc/ -BOLTVERSION := b201efe0546120c14bf154ce5f4e18da7243fe7a +DEFAULT_BOLTVERSION := b201efe0546120c14bf154ce5f4e18da7243fe7a +# Can be overridden on cmdline. +BOLTVERSION := $(DEFAULT_BOLTVERSION) -include config.vars @@ -401,11 +403,12 @@ SRC_TO_CHECK := $(filter-out $(ALL_TEST_PROGRAMS:=.c), $(ALL_NONGEN_SOURCES)) check-src-includes: $(SRC_TO_CHECK:%=check-src-include-order/%) check-hdr-includes: $(ALL_NONGEN_HEADERS:%=check-hdr-include-order/%) -# Experimental quotes quote the exact version. -ifeq ($(EXPERIMENTAL_FEATURES),1) -CHECK_BOLT_PREFIX=--prefix="BOLT-$(BOLTVERSION)" -else +# If you want to check a specific variant of quotes use: +# make check-source-bolt BOLTVERSION=xxx +ifeq ($(BOLTVERSION),$(DEFAULT_BOLTVERSION)) CHECK_BOLT_PREFIX= +else +CHECK_BOLT_PREFIX=--prefix="BOLT-$(BOLTVERSION)" endif # Any mention of BOLT# must be followed by an exact quote, modulo whitespace.