build make component namespace tweak
authorThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Mon, 22 Jun 2026 05:31:22 +0000 (05:31 +0000)
committerThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Mon, 22 Jun 2026 05:31:22 +0000 (05:31 +0000)
developer/tool/build
developer/tool/build_component/make

index 1691061..547fc4c 100755 (executable)
@@ -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 <Namespace>.<Tool>. 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 [<namespace_pattern>[:<command>]*]*\n")
-  print("Commands are passed directly to the component specified by the directory suffix.\n")
+  print("Usage: build [<namespace_pattern>[:<argument>]*]*\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)
index 8b127bf..30fb82d 100755 (executable)
@@ -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"