summaryrefslogtreecommitdiffstats
path: root/rtemsqual/content.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-07-06 17:29:51 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-07-07 07:43:46 +0200
commit427606dc5a5eec7b3cf7e994bc445061749d6adb (patch)
treeba17ec052cda44781d4b68ede37fdadab5b69e76 /rtemsqual/content.py
parentitems: Add ItemMapper.item property (diff)
downloadrtems-central-427606dc5a5eec7b3cf7e994bc445061749d6adb.tar.bz2
content: Add prepend_copyrights_and_licenses()
Diffstat (limited to 'rtemsqual/content.py')
-rw-r--r--rtemsqual/content.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/rtemsqual/content.py b/rtemsqual/content.py
index c5eaabf5..8dcb454f 100644
--- a/rtemsqual/content.py
+++ b/rtemsqual/content.py
@@ -493,6 +493,18 @@ class CContent(Content):
self.add(self._copyrights.get_statements())
self.add(_BSD_2_CLAUSE_LICENSE)
+ def prepend_copyrights_and_licenses(self):
+ """
+ Prepends the copyrights and licenses according to the registered
+ copyrights and licenses.
+ """
+ content = CContent()
+ with content.comment_block():
+ content.add(self._copyrights.get_statements())
+ content.add(_BSD_2_CLAUSE_LICENSE)
+ content.append("")
+ self.prepend(content)
+
def add_have_config(self):
""" Adds a guarded config.h include. """
self.add(["#ifdef HAVE_CONFIG_H", "#include \"config.h\"", "#endif"])