summaryrefslogtreecommitdiff
path: root/zephyr/zmake/zmake/zmake.py
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/zmake/zmake/zmake.py')
-rw-r--r--zephyr/zmake/zmake/zmake.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py
index d2559a9270..713c6773e3 100644
--- a/zephyr/zmake/zmake/zmake.py
+++ b/zephyr/zmake/zmake/zmake.py
@@ -810,3 +810,19 @@ class Zmake:
if proc.wait():
raise OSError(get_process_failure_msg(proc))
return 0
+
+ def list_projects(self, format, search_dir):
+ """List project names known to zmake on stdout.
+
+ Args:
+ format: The formatting string to print projects with.
+ search_dir: Directory to start the search for
+ BUILD.py files at.
+ """
+ if not search_dir:
+ search_dir = self.module_paths["ec"] / "zephyr"
+
+ for project in zmake.project.find_projects(search_dir).values():
+ print(format.format(config=project.config), end="")
+
+ return 0