[rtems-central commit] applconfig: Add automatically generated warning

Sebastian Huber sebh at rtems.org
Fri Aug 7 05:09:21 UTC 2020


Module:    rtems-central
Branch:    master
Commit:    33681ff42cc7b34989d41611acf6cde28a38ebdb
Changeset: http://git.rtems.org/rtems-central/commit/?id=33681ff42cc7b34989d41611acf6cde28a38ebdb

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Aug  7 06:56:46 2020 +0200

applconfig: Add automatically generated warning

---

 rtemsspec/applconfig.py            | 13 +++++++++++++
 rtemsspec/tests/test_applconfig.py | 16 ++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/rtemsspec/applconfig.py b/rtemsspec/applconfig.py
index f0dff59..cc40fc6 100644
--- a/rtemsspec/applconfig.py
+++ b/rtemsspec/applconfig.py
@@ -53,6 +53,15 @@ _OPTION_DEFAULT_CONFIG = {
 enabled."""
 }
 
+_AUTOMATICALLY_GENERATED_WARNING = [
+    "This file was automatically generated.  Do not edit it manually.",
+    "Please have a look at",
+    "",
+    "https://docs.rtems.org/branches/master/eng/req/howto.html",
+    "",
+    "for information how to maintain and re-generate this file.",
+]
+
 
 class _ContentAdaptor:
     """
@@ -70,6 +79,8 @@ class _ContentAdaptor:
 
     def add_group(self, name: str, description: str) -> None:
         """ Adds an option group. """
+        with self.content.comment_block():
+            self.content.append(_AUTOMATICALLY_GENERATED_WARNING)
         self.content.add_header(name, level=2)
         self.content.add(description)
 
@@ -518,6 +529,8 @@ def generate(config: dict, item_cache: ItemCache) -> None:
     doxygen_mapper = ItemMapper(EmptyItem())
     _add_doxygen_get_values(doxygen_mapper)
     doxygen_content = _DoxygenContentAdaptor(doxygen_mapper)
+    with doxygen_content.content.comment_block():
+        doxygen_content.content.append(_AUTOMATICALLY_GENERATED_WARNING)
     with doxygen_content.content.defgroup_block(
             "RTEMSApplConfig", "Application Configuration Options"):
         doxygen_content.content.add("@ingroup RTEMSAPI")
diff --git a/rtemsspec/tests/test_applconfig.py b/rtemsspec/tests/test_applconfig.py
index 08861de..be45f4e 100644
--- a/rtemsspec/tests/test_applconfig.py
+++ b/rtemsspec/tests/test_applconfig.py
@@ -48,6 +48,13 @@ def test_applconfig(tmpdir):
 
 .. Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
 
+.. This file was automatically generated.  Do not edit it manually.
+.. Please have a look at
+..
+.. https://docs.rtems.org/branches/master/eng/req/howto.html
+..
+.. for information how to maintain and re-generate this file.
+
 group name
 ==========
 
@@ -395,6 +402,15 @@ NOTES:
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+/*
+ * This file was automatically generated.  Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
 /**
  * @defgroup RTEMSApplConfig Application Configuration Options
  *



More information about the vc mailing list