From fdbf2f41b4e4a0ae8f711ad69b25df9bf183e8f9 Mon Sep 17 00:00:00 2001 From: ZmnSCPxj Date: Wed, 10 Jan 2018 22:44:37 +0000 Subject: [PATCH] generate-wire.py: Add scare comments to output. Discourage developers from modifying files generated by generate-wire.py --- tools/generate-wire.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/generate-wire.py b/tools/generate-wire.py index 3307f9bdc..c494c3dc4 100755 --- a/tools/generate-wire.py +++ b/tools/generate-wire.py @@ -472,7 +472,9 @@ for line in fileinput.input(options.files): prevfield = parts[2] comments=[] -header_template = """#ifndef LIGHTNING_{idem} +header_template = """/* This file was generated by generate-wire.py */ +/* Do not modify this file! Modify the _csv file it was generated from. */ +#ifndef LIGHTNING_{idem} #define LIGHTNING_{idem} #include #include @@ -485,7 +487,9 @@ const char *{enumname}_name(int e); #endif /* LIGHTNING_{idem} */ """ -impl_template = """#include <{headerfilename}> +impl_template = """/* This file was generated by generate-wire.py */ +/* Do not modify this file! Modify the _csv file it was generated from. */ +#include <{headerfilename}> #include #include #include