git: 5157b451c654 - main - tools/build/make.py: Grow the list of MI targets
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 22 Aug 2023 17:53:29 UTC
The branch main has been updated by jrtc27:
URL: https://cgit.FreeBSD.org/src/commit/?id=5157b451c65480deecbc0e7c223684830a4af7ce
commit 5157b451c65480deecbc0e7c223684830a4af7ce
Author: Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2023-08-22 17:53:13 +0000
Commit: Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2023-08-22 17:53:13 +0000
tools/build/make.py: Grow the list of MI targets
---
tools/build/make.py | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/tools/build/make.py b/tools/build/make.py
index 7ae6a95e8c23..74454aa51b08 100755
--- a/tools/build/make.py
+++ b/tools/build/make.py
@@ -48,6 +48,24 @@ import sys
from pathlib import Path
+# List of targets that are independent of TARGET/TARGET_ARCH and thus do not
+# need them to be set. Keep in the same order as Makefile documents them (if
+# they are documented).
+mach_indep_targets = [
+ "cleanuniverse",
+ "universe",
+ "universe-toolchain",
+ "tinderbox"
+ "worlds",
+ "kernels",
+ "kernel-toolchains",
+ "targets",
+ "toolchains",
+ "makeman",
+ "sysent",
+]
+
+
def run(cmd, **kwargs):
cmd = list(map(str, cmd)) # convert all Path objects to str
debug("Running", cmd)
@@ -190,7 +208,7 @@ if __name__ == "__main__":
new_env_vars = {}
if not sys.platform.startswith("freebsd"):
if not is_make_var_set("TARGET") or not is_make_var_set("TARGET_ARCH"):
- if "universe" not in sys.argv and "tinderbox" not in sys.argv:
+ if not set(sys.argv).intersection(set(mach_indep_targets)):
sys.exit("TARGET= and TARGET_ARCH= must be set explicitly "
"when building on non-FreeBSD")
if not parsed_args.bootstrap_toolchain: