summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-02-10 11:00:20 -0700
committerCommit Bot <commit-bot@chromium.org>2022-02-11 01:02:35 +0000
commit848a4a66b61a656d0bd0739526656f67213ee66e (patch)
tree5c2ba0c6a223fe41b897196fadbd99795b6baacf /zephyr
parent41aeebed557b6dde239520910b96456675963c77 (diff)
downloadchrome-ec-848a4a66b61a656d0bd0739526656f67213ee66e.tar.gz
zephyr: zmake: Drop support for building by project directory
This has been deprecated since November, and all code and documentation has been updated to no longer mention building by project directory path. Therefore, let's drop support for it. BUG=b:218868887 BRANCH=none TEST=unit tests pass Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I4f0762df289a413007a8409c6a39026db8056937 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3452934 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/zmake/README.md4
-rw-r--r--zephyr/zmake/zmake/__main__.py4
-rw-r--r--zephyr/zmake/zmake/zmake.py19
3 files changed, 10 insertions, 17 deletions
diff --git a/zephyr/zmake/README.md b/zephyr/zmake/README.md
index 63144a32db..6eb573154c 100644
--- a/zephyr/zmake/README.md
+++ b/zephyr/zmake/README.md
@@ -35,13 +35,13 @@ Chromium OS's meta-build tool for Zephyr
### zmake configure
-**Usage:** `zmake configure [-h] [-t TOOLCHAIN] [--bringup] [--clobber] [--allow-warnings] [-B BUILD_DIR] [-b] [--test] project_name_or_dir [-c]`
+**Usage:** `zmake configure [-h] [-t TOOLCHAIN] [--bringup] [--clobber] [--allow-warnings] [-B BUILD_DIR] [-b] [--test] project_name [-c]`
#### Positional Arguments
| | |
|---|---|
-| `project_name_or_dir` | Path to the project to build |
+| `project_name` | Name of the project to setup |
#### Optional Arguments
diff --git a/zephyr/zmake/zmake/__main__.py b/zephyr/zmake/zmake/__main__.py
index ce0588e5fa..ab60a00657 100644
--- a/zephyr/zmake/zmake/__main__.py
+++ b/zephyr/zmake/zmake/__main__.py
@@ -216,8 +216,8 @@ def get_argparser():
help="Test the .elf file after configuration",
)
configure.add_argument(
- "project_name_or_dir",
- help="Path to the project to build",
+ "project_name",
+ help="Name of the project to setup",
)
configure.add_argument(
"-c",
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py
index 604a886815..bb85d12b2d 100644
--- a/zephyr/zmake/zmake/zmake.py
+++ b/zephyr/zmake/zmake/zmake.py
@@ -192,7 +192,7 @@ class Zmake:
def configure(
self,
- project_name_or_dir,
+ project_name,
build_dir=None,
toolchain=None,
build_after_configure=False,
@@ -203,19 +203,12 @@ class Zmake:
allow_warnings=False,
):
"""Locate a project by name or directory and then call _configure."""
- root_dir = pathlib.Path(project_name_or_dir)
- if not root_dir.is_dir():
- root_dir = self.module_paths["ec"] / "zephyr"
+ root_dir = self.module_paths["ec"] / "zephyr"
found_projects = zmake.project.find_projects(root_dir)
- if len(found_projects) == 1:
- # Likely passed directory path, wants to build only
- # project from there.
- project = next(iter(found_projects.values()))
- else:
- try:
- project = found_projects[project_name_or_dir]
- except KeyError as e:
- raise KeyError("No project named {}".format(project_name_or_dir)) from e
+ try:
+ project = found_projects[project_name]
+ except KeyError as e:
+ raise KeyError(f"No project named {project_name}") from e
return self._configure(
project=project,
build_dir=build_dir,