[util] Update `make_new_dif.py` to use `autogen_banner.py` module.
The autogen warning banner in the auto-generated DIF templates was not
populated by the `autogen_banner.py` module. This fixes that.
This is the final task that fixes #8142.
Signed-off-by: Timothy Trippel <ttrippel@google.com>
diff --git a/util/make_new_dif.py b/util/make_new_dif.py
index 7d06753..0a326fc 100755
--- a/util/make_new_dif.py
+++ b/util/make_new_dif.py
@@ -44,6 +44,7 @@
from mako.template import Template
+from autogen_banner import get_autogen_banner
from make_new_dif.ip import Ip
# This file is $REPO_TOP/util/make_new_dif.py, so it takes two parent()
@@ -141,7 +142,12 @@
strict_undefined=True)
# Generate output file.
- out_file.write_text(template.render(ip=ip))
+ out_file.write_text(
+ template.render(
+ ip=ip,
+ autogen_banner=get_autogen_banner(
+ "util/make_new_dif.py --mode=regen --only=autogen",
+ "//")))
# Format autogenerated file with clang-format.
assert (shutil.which("clang-format") and