Build: Put generated header files to 'build' directory
In new build system, all auto-generated files are put to the build
directory. This patch modifies the tool script to generate and
output psa manifest header files to build directory.
Adds a "source_path" item in manifest file to enable the tool output
tf-m-tests and arch-test psa header files to build directory.
Change-Id: I6034007b300e4504454834a0ffe08b78421bba74
Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
diff --git a/tools/tfm_parse_manifest_list.py b/tools/tfm_parse_manifest_list.py
index e631823..a2628d6 100644
--- a/tools/tfm_parse_manifest_list.py
+++ b/tools/tfm_parse_manifest_list.py
@@ -98,6 +98,13 @@
context['file_name'] = outfile_name.replace('.h', '')
outfile_name = os.path.join(manifest_dir, "psa_manifest", outfile_name).replace('\\', '/')
+ """
+ Remove the `source_path` portion of the filepaths, so that it can be
+ interpreted as a relative path from the OUT_DIR.
+ """
+ if 'source_path' in manifest_item:
+ outfile_name = os.path.relpath(outfile_name, start = manifest_item['source_path'])
+
manifest_header_list.append(outfile_name)
if OUT_DIR is not None: