Build: Conditional include of psa manifest headers
If more than one partitions provides the same service the macros can
collide in generated files. So the psa manifest headers are included
only if the matching partition is built.
Change-Id: Ie622466c1a4663a7ed2f188e3b6552136eb4c900
Signed-off-by: Mark Horvath <mark.horvath@arm.com>
diff --git a/tools/tfm_parse_manifest_list.py b/tools/tfm_parse_manifest_list.py
index 1d6b64a..b346f6f 100644
--- a/tools/tfm_parse_manifest_list.py
+++ b/tools/tfm_parse_manifest_list.py
@@ -66,7 +66,6 @@
"""
db = []
- manifest_header_list = []
manifest_list = []
for f in manifest_list_files:
@@ -84,8 +83,6 @@
file = open(manifest_path)
manifest = yaml.safe_load(file)
- db.append({"manifest": manifest, "attr": manifest_item})
-
utilities = {}
utilities['donotedit_warning']=donotedit_warning
@@ -108,7 +105,7 @@
source_path = os.path.expandvars(manifest_item['source_path'])
outfile_name = os.path.relpath(outfile_name, start = source_path)
- manifest_header_list.append(outfile_name)
+ db.append({"manifest": manifest, "attr": manifest_item, "header_file": outfile_name})
if OUT_DIR is not None:
outfile_name = os.path.join(OUT_DIR, outfile_name)
@@ -123,7 +120,7 @@
outfile.write(template.render(context))
outfile.close()
- return manifest_header_list, db
+ return db
def gen_files(context, gen_file_lists):
"""
@@ -236,13 +233,12 @@
"""
os.chdir(os.path.join(sys.path[0], ".."))
- manifest_header_list, db = process_manifest(manifest_list)
+ db = process_manifest(manifest_list)
utilities = {}
context = {}
utilities['donotedit_warning']=donotedit_warning
- utilities['manifest_header_list']=manifest_header_list
context['manifests'] = db
context['utilities'] = utilities