From 5a1459f64e8d280d7bb267dfa81fa7620f6c1f65 Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Mon, 22 Jun 2026 05:31:22 +0000 Subject: [PATCH] build make component namespace tweak --- developer/tool/build | 21 ++++++++++----------- developer/tool/build_component/make | 6 +++++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/developer/tool/build b/developer/tool/build index 1691061..547fc4c 100755 --- a/developer/tool/build +++ b/developer/tool/build @@ -5,7 +5,7 @@ developer/tool/build - Build Orchestrator Wrapper This script acts as the primary entry point for staging the project. It parses colon-separated arguments mapping specific namespaces to their -intended build commands. +intended build arguments. It enforces the structural convention where authored directories must be named .. The script delegates execution to @@ -42,8 +42,8 @@ def get_namespaces() -> Dict[str, Tuple[str, str]]: return dict(sorted(namespaces.items())) def print_usage(namespaces: Dict[str, Tuple[str, str]]) -> None: - print("Usage: build [[:]*]*\n") - print("Commands are passed directly to the component specified by the directory suffix.\n") + print("Usage: build [[:]*]*\n") + print("Arguments are passed directly to the component specified by the directory suffix.\n") print("Available namespaces:") if namespaces: @@ -58,8 +58,7 @@ def print_usage(namespaces: Dict[str, Tuple[str, str]]) -> None: print(" build Ex*:library RT:all:information (Batch execution with pattern matching)") print(" build \"*:clean\" (Cleans all namespaces. Quotes prevent Bash expansion)") -def run_build(cmd: str, namespace: str, tool: str, raw_dir: str) -> None: - # Route to the new build_component subdirectory +def run_build(argument: str, namespace: str, tool: str, raw_dir: str) -> None: tool_path = os.path.join("tool", "build_component", tool) if not os.path.isfile(tool_path) or not os.access(tool_path, os.X_OK): @@ -70,7 +69,7 @@ def run_build(cmd: str, namespace: str, tool: str, raw_dir: str) -> None: env["NAMESPACE"] = namespace env["NAMESPACE_DIR"] = raw_dir - tool_cmd = [tool_path, cmd] + tool_cmd = [tool_path, argument] try: subprocess.run(tool_cmd, env=env, check=True) @@ -98,10 +97,10 @@ def CLI() -> None: for TM_arg in args: parts = TM_arg.split(":") pattern = parts[0] - commands = parts[1:] + arguments = parts[1:] - if not commands: - commands = ["all"] + if not arguments: + arguments = ["all"] matches = fnmatch.filter(ns_keys, pattern) @@ -112,8 +111,8 @@ def CLI() -> None: matched_any = True for TM_ns in matches: tool, raw_dir = namespaces[TM_ns] - for TM_cmd in commands: - run_build(TM_cmd, TM_ns, tool, raw_dir) + for TM_argument in arguments: + run_build(TM_argument, TM_ns, tool, raw_dir) if not matched_any: sys.exit(1) diff --git a/developer/tool/build_component/make b/developer/tool/build_component/make index 8b127bf..30fb82d 100755 --- a/developer/tool/build_component/make +++ b/developer/tool/build_component/make @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# developer/tool/make +# developer/tool/build_component/make set -euo pipefail CMD="${1:-all}" @@ -8,4 +8,8 @@ CMD="${1:-all}" export C_SOURCE_DIR="authored/$NAMESPACE_DIR" export KMOD_SOURCE_DIR="authored/$NAMESPACE_DIR" +# Isolate build products into their specific namespace directory +export LIBRARY_DIR="scratchpad/made/$NAMESPACE" +export MACHINE_DIR="scratchpad/made/$NAMESPACE" + /bin/make -f tool/build_component/makefile "$CMD" -- 2.20.1