From 12c7b156c578b7d719a669dbc94527aaf0549cf9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 23 Mar 2022 10:01:14 +1030 Subject: [PATCH] tools/generate_wire.py: allow generated C files to have includes added. We previously ignored --include= for these, but onion is about to start needing bolt12. Signed-off-by: Rusty Russell --- tools/gen/impl_template | 3 +++ tools/gen/print_impl_template | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tools/gen/impl_template b/tools/gen/impl_template index 61f643598..e88a13fdd 100644 --- a/tools/gen/impl_template +++ b/tools/gen/impl_template @@ -9,6 +9,9 @@ #include #include #include +% for i in includes: +${i} +% endfor #ifndef SUPERVERBOSE #define SUPERVERBOSE(...) diff --git a/tools/gen/print_impl_template b/tools/gen/print_impl_template index 9ee825b83..100e02ac1 100644 --- a/tools/gen/print_impl_template +++ b/tools/gen/print_impl_template @@ -8,6 +8,9 @@ #include #include #include +% for i in includes: +${i} +% endfor % if enum_sets: void print${options.enum_name}_message(const u8 *msg)