From e3bac6c16591bb069a2ecea670de5da468d797ed Mon Sep 17 00:00:00 2001 From: lisa neigut Date: Tue, 16 Apr 2019 12:36:19 -0700 Subject: [PATCH] wire-gen: patch in the `wire/gen_*_experimental_wire` files use the `wire/gen_*experimental_wire` patch file and apply it to existing wire message set. empty for now, but will be generated shortly. --- wire/Makefile | 22 +++++++++++++++++++++- wire/extracted_onion_experimental_csv | 0 wire/extracted_peer_experimental_csv | 0 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 wire/extracted_onion_experimental_csv create mode 100644 wire/extracted_peer_experimental_csv diff --git a/wire/Makefile b/wire/Makefile index 6dc17aeed..26e067dcf 100644 --- a/wire/Makefile +++ b/wire/Makefile @@ -34,11 +34,31 @@ extract-bolt-csv: bolt-precheck @echo '#include ' > wire/extracted_onion_wire_csv @$(BOLT_EXTRACT) --message-fields --message-types $(LOCAL_BOLTDIR)/04*.md >> wire/extracted_onion_wire_csv +# Explicit command to add diff of BOLT CSV's to an experimental_csv file +extract-experimental-bolt-csv: + @$(BOLT_EXTRACT) --message-fields --message-types $(LOCAL_BOLTDIR)/0[127]*.md | diff -u wire/extracted_peer_wire_csv - >>wire/extracted_peer_experimental_csv | if [ $$? -lt 0 ];then exit 1;fi + @{ echo '#include '; $(BOLT_EXTRACT) --message-fields --message-types $(LOCAL_BOLTDIR)/04*.md; } | diff -u wire/extracted_onion_wire_csv - >>wire/extracted_onion_experimental_csv | if [ $$? -lt 0 ];then exit 1;fi + +wire/extracted_peer_experimental_csv: + @touch $@ + +wire/extracted_onion_experimental_csv: + @touch $@ + +ifeq ($(EXPERIMENTAL_FEATURES),1) +wire/gen_peer_wire_csv: wire/extracted_peer_experimental_csv wire/extracted_peer_wire_csv + @patch --silent -o $@ wire/extracted_peer_wire_csv $< + +wire/gen_onion_wire_csv: wire/extracted_onion_experimental_csv wire/extracted_onion_wire_csv + @patch --silent -o $@ wire/extracted_onion_wire_csv $< + +else # /* EXPERIMENTAL_FEATURES */ wire/gen_peer_wire_csv: wire/extracted_peer_wire_csv @cp $< $@ wire/gen_onion_wire_csv: wire/extracted_onion_wire_csv @cp $< $@ +endif wire/gen_peer_wire.h: wire/gen_peer_wire_csv $(WIRE_GEN) $(WIRE_GEN) --bolt --header $@ wire_type < $< > $@ @@ -63,7 +83,7 @@ clean: wire-clean maintainer-clean: wire-maintainer-clean wire-maintainer-clean: - $(RM) wire/gen_*_csv + $(RM) wire/gen_*_csv wire/extracted_*_experimental_csv wire-all: $(WIRE_OBJS) $(WIRE_ONION_OBJS) diff --git a/wire/extracted_onion_experimental_csv b/wire/extracted_onion_experimental_csv new file mode 100644 index 000000000..e69de29bb diff --git a/wire/extracted_peer_experimental_csv b/wire/extracted_peer_experimental_csv new file mode 100644 index 000000000..e69de29bb