From c67f5b301e0db210c6b330ba6f9c9f796086ffa9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 9 Sep 2020 12:11:25 +0930 Subject: [PATCH] wire: fix up regeneration We didn't rename the _csv to .csv, which patterns expect if you're regenerating (e.g. if you switch on --enable-experimental-features then switch it off again!) Also remove unused experimental targets. Signed-off-by: Rusty Russell --- wire/Makefile | 20 +++++++------------- wire/{onion_wire_csv => onion_wire.csv} | 0 wire/{peer_wire_csv => peer_wire.csv} | 0 3 files changed, 7 insertions(+), 13 deletions(-) rename wire/{onion_wire_csv => onion_wire.csv} (100%) rename wire/{peer_wire_csv => peer_wire.csv} (100%) diff --git a/wire/Makefile b/wire/Makefile index e1ee3c937..a88e782c5 100644 --- a/wire/Makefile +++ b/wire/Makefile @@ -43,29 +43,23 @@ WIRE_BOLT_DEPS := $(BOLT_DEPS) tools/gen/impl_template tools/gen/header_template # Explicit command to re-extract CSV from BOLTs. extract-bolt-csv: bolt-precheck - @$(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/0[127]*.md > wire/extracted_peer_wire_csv - @echo '#include ' > wire/extracted_onion_wire_csv - @$(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/04*.md >> wire/extracted_onion_wire_csv + @$(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/0[127]*.md > wire/peer_wire.csv + @echo '#include ' > wire/onion_wire.csv + @$(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/04*.md >> wire/onion_wire.csv # Explicit command to add patchfile for BOLT CSV's extract-experimental-bolt-csv: bolt-precheck - @$(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/0[127]*.md | diff -u wire/extracted_peer_wire_csv - >wire/extracted_peer_experimental_$(BOLTVERSION) | if [ $$? -lt 0 ];then exit 1;fi - @{ echo '#include '; $(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/04*.md; } | diff -u wire/extracted_onion_wire_csv - > wire/extracted_onion_experimental_$(BOLTVERSION) | if [ $$? -lt 0 ];then exit 1;fi - -wire/extracted_peer_experimental_csv: - @touch $@ - -wire/extracted_onion_experimental_csv: - @touch $@ + @$(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/0[127]*.md | diff -u wire/peer_exp_wire.csv - >wire/extracted_peer_experimental_$(BOLTVERSION) | if [ $$? -lt 0 ];then exit 1;fi + @{ echo '#include '; $(BOLT_EXTRACT) $(LOCAL_BOLTDIR)/04*.md; } | diff -u wire/onion_exp_wire.csv - > wire/extracted_onion_experimental_$(BOLTVERSION) | if [ $$? -lt 0 ];then exit 1;fi ifeq ($(EXPERIMENTAL_FEATURES),1) EXPERIMENTAL_PEER_PATCHES := $(sort $(wildcard wire/extracted_peer_experimental_*)) EXPERIMENTAL_ONION_PATCHES := $(sort $(wildcard wire/extracted_onion_experimental_*)) -wire/peer_exp_wire.csv: wire/peer_wire_csv $(EXPERIMENTAL_PEER_PATCHES) +wire/peer_exp_wire.csv: wire/peer_wire.csv $(EXPERIMENTAL_PEER_PATCHES) @set -e; trap "rm -f $@.$$$$" 0; cp $< $@.$$$$; for exp in $(EXPERIMENTAL_PEER_PATCHES); do patch $@.$$$$ $$exp >/dev/null ; done; mv $@.$$$$ $@ -wire/onion_exp_wire.csv: wire/onion_wire_csv $(EXPERIMENTAL_ONION_PATCHES) +wire/onion_exp_wire.csv: wire/onion_wire.csv $(EXPERIMENTAL_ONION_PATCHES) @set -e; trap "rm -f $@.$$$$" 0; cp $< $@.$$$$; for exp in $(EXPERIMENTAL_ONION_PATCHES); do patch $@.$$$$ $$exp; done >/dev/null ; mv $@.$$$$ $@ endif diff --git a/wire/onion_wire_csv b/wire/onion_wire.csv similarity index 100% rename from wire/onion_wire_csv rename to wire/onion_wire.csv diff --git a/wire/peer_wire_csv b/wire/peer_wire.csv similarity index 100% rename from wire/peer_wire_csv rename to wire/peer_wire.csv