From: Thomas Walker Lynch Date: Sun, 21 Jun 2026 16:55:04 +0000 (+0000) Subject: partial doc update, make -> build with components X-Git-Url: https://git.reasoningtechnology.com/%27%20%20%20resolved_path%20%20%20%27?a=commitdiff_plain;h=5ea920e4db7cd041e7db432bf9588e225ec6b9d2;p=Harmony partial doc update, make -> build with components --- diff --git a/administrator/document/how-to_release.html b/administrator/document/how-to_release.html index 888d414..e2e8a60 100644 --- a/administrator/document/how-to_release.html +++ b/administrator/document/how-to_release.html @@ -3,10 +3,16 @@ Release howto - + diff --git a/administrator/document/setup.js b/administrator/document/setup.js deleted file mode 100644 index de1173d..0000000 --- a/administrator/document/setup.js +++ /dev/null @@ -1,4 +0,0 @@ -window.RT_REPO_ROOT = "../../"; -document.write(''); -document.write(''); -document.write(''); diff --git a/administrator/tool/html_to_v31 b/administrator/tool/html_to_v31 new file mode 100755 index 0000000..b1aba38 --- /dev/null +++ b/administrator/tool/html_to_v31 @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 +# -*- mode: python; coding: utf-8; python-indent-offset: 2; indent-tabs-mode: nil -*- +""" +html_update_to_3-1 + +Replaces specific StyleRT script blocks with RT 3.1 loader blocks using +literal string replacement. +""" + +import sys ,os + +OLD_BLOCK = \ +""" + """ + +NEW_BLOCK = \ +""" + """ + +def process_file(file_path: str) -> None: + try: + with open(file_path ,"r" ,encoding="utf-8") as f: + content = f.read() + except Exception as e: + print(f"Error reading {file_path}: {e}" ,file=sys.stderr) + return + + # Normalize line endings to ensure a match across environments + normalized_content = content.replace("\r\n" ,"\n") + normalized_old = OLD_BLOCK.replace("\r\n" ,"\n") + + if( normalized_old in normalized_content ): + new_content = normalized_content.replace(normalized_old ,NEW_BLOCK) + with open(file_path ,"w" ,encoding="utf-8") as f: + f.write(new_content) + print(f"Updated: {file_path}") + else: + print(f"Target lines not found in: {file_path}") + +def CLI() -> None: + args = sys.argv[1:] + + if( not args or "-h" in args or "--help" in args ): + print("Usage: html_update_to_3-1 ") + sys.exit(0) + + for TM_f in args: + process_file(TM_f) + +if __name__ == "__main__": + CLI() diff --git a/developer.tar b/developer.tar new file mode 100644 index 0000000..b64d49e Binary files /dev/null and b/developer.tar differ diff --git a/developer/authored/ExampleGreet.make/Greeter.lib.c b/developer/authored/ExampleGreet.make/Greeter.lib.c new file mode 100644 index 0000000..1d23879 --- /dev/null +++ b/developer/authored/ExampleGreet.make/Greeter.lib.c @@ -0,0 +1,20 @@ +#ifndef ExampleGreet·Greeter·ONCE +#define ExampleGreet·Greeter·ONCE + +#include "Math.lib.c" + +void ExampleGreet·Greeter·hello_loop(int count); + +#ifdef ExampleGreet·Greeter + #include + + void ExampleGreet·Greeter·hello_loop(int count){ + for(int TM = 0; TM < count; ++TM){ + int current_count = ExampleGreet·Math·add(TM ,1); + printf("Hello iteration: %d\n" ,current_count); + } + } + +#endif // ExampleGreet·Greeter + +#endif // ExampleGreet·Greeter·ONCE diff --git a/developer/authored/ExampleGreet.make/Math.lib.c b/developer/authored/ExampleGreet.make/Math.lib.c new file mode 100644 index 0000000..6f1880e --- /dev/null +++ b/developer/authored/ExampleGreet.make/Math.lib.c @@ -0,0 +1,12 @@ +#ifndef ExampleGreet·Math·ONCE +#define ExampleGreet·Math·ONCE + +int ExampleGreet·Math·add(int a ,int b); + +#ifdef ExampleGreet·Math + int ExampleGreet·Math·add(int a ,int b){ + return a + b; + } +#endif // ExampleGreet·Math + +#endif // ExampleGreet·Math·ONCE diff --git a/developer/authored/ExampleGreet.make/hello.CLI.c b/developer/authored/ExampleGreet.make/hello.CLI.c new file mode 100644 index 0000000..684e2a7 --- /dev/null +++ b/developer/authored/ExampleGreet.make/hello.CLI.c @@ -0,0 +1,20 @@ +#include +#include + +#include "Math.lib.c" +#include "Greeter.lib.c" + +void CLI(void){ + int base_count = ExampleGreet·Math·add(1 ,2); + printf("Calculated base loop count: %d\n" ,base_count); + ExampleGreet·Greeter·hello_loop(base_count); +} + +int main(int argc ,char **argv){ + (void)argc; + (void)argv; + + CLI(); + + return EXIT_SUCCESS; +} diff --git a/developer/authored/ExampleGreet/Greeter.lib.c b/developer/authored/ExampleGreet/Greeter.lib.c deleted file mode 100644 index 1d23879..0000000 --- a/developer/authored/ExampleGreet/Greeter.lib.c +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef ExampleGreet·Greeter·ONCE -#define ExampleGreet·Greeter·ONCE - -#include "Math.lib.c" - -void ExampleGreet·Greeter·hello_loop(int count); - -#ifdef ExampleGreet·Greeter - #include - - void ExampleGreet·Greeter·hello_loop(int count){ - for(int TM = 0; TM < count; ++TM){ - int current_count = ExampleGreet·Math·add(TM ,1); - printf("Hello iteration: %d\n" ,current_count); - } - } - -#endif // ExampleGreet·Greeter - -#endif // ExampleGreet·Greeter·ONCE diff --git a/developer/authored/ExampleGreet/Math.lib.c b/developer/authored/ExampleGreet/Math.lib.c deleted file mode 100644 index 6f1880e..0000000 --- a/developer/authored/ExampleGreet/Math.lib.c +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef ExampleGreet·Math·ONCE -#define ExampleGreet·Math·ONCE - -int ExampleGreet·Math·add(int a ,int b); - -#ifdef ExampleGreet·Math - int ExampleGreet·Math·add(int a ,int b){ - return a + b; - } -#endif // ExampleGreet·Math - -#endif // ExampleGreet·Math·ONCE diff --git a/developer/authored/ExampleGreet/hello.CLI.c b/developer/authored/ExampleGreet/hello.CLI.c deleted file mode 100644 index 684e2a7..0000000 --- a/developer/authored/ExampleGreet/hello.CLI.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -#include "Math.lib.c" -#include "Greeter.lib.c" - -void CLI(void){ - int base_count = ExampleGreet·Math·add(1 ,2); - printf("Calculated base loop count: %d\n" ,base_count); - ExampleGreet·Greeter·hello_loop(base_count); -} - -int main(int argc ,char **argv){ - (void)argc; - (void)argv; - - CLI(); - - return EXIT_SUCCESS; -} diff --git a/developer/document/RT-code-format-Lisp.html b/developer/document/RT-code-format-Lisp.html index edbed6b..888e5fe 100644 --- a/developer/document/RT-code-format-Lisp.html +++ b/developer/document/RT-code-format-Lisp.html @@ -3,10 +3,16 @@ RT Code Format: Lisp Addendum - + diff --git a/developer/document/RT-code-format.html b/developer/document/RT-code-format.html index 8260a9f..e4924fa 100644 --- a/developer/document/RT-code-format.html +++ b/developer/document/RT-code-format.html @@ -3,10 +3,16 @@ RT code format conventions - + diff --git a/developer/document/naming_file-and-directory.html b/developer/document/naming_file-and-directory.html index c4bd65c..7fb7619 100644 --- a/developer/document/naming_file-and-directory.html +++ b/developer/document/naming_file-and-directory.html @@ -3,10 +3,16 @@ File and directory naming conventions - + diff --git a/developer/document/setup.js b/developer/document/setup.js deleted file mode 100644 index de1173d..0000000 --- a/developer/document/setup.js +++ /dev/null @@ -1,4 +0,0 @@ -window.RT_REPO_ROOT = "../../"; -document.write(''); -document.write(''); -document.write(''); diff --git a/developer/document/single-file_C-module-and-namespace.html b/developer/document/single-file_C-module-and-namespace.html index 23af5f8..930f028 100644 --- a/developer/document/single-file_C-module-and-namespace.html +++ b/developer/document/single-file_C-module-and-namespace.html @@ -3,10 +3,16 @@ C modules, namespaces, and the build lifecycle - + diff --git a/developer/tool/build b/developer/tool/build new file mode 100755 index 0000000..1691061 --- /dev/null +++ b/developer/tool/build @@ -0,0 +1,124 @@ +#!/usr/bin/env python3 +# -*- mode: python; coding: utf-8; python-indent-offset: 2; indent-tabs-mode: nil -*- +""" +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. + +It enforces the structural convention where authored directories must +be named .. The script delegates execution to +developer/tool/build_component/. +""" + +import sys, os, subprocess, fnmatch +from typing import Dict, Tuple + +def check_environment() -> None: + setup_must_be = "developer/tool/setup" + current_setup = os.environ.get("SETUP", "") + if current_setup != setup_must_be: + print(f"developer/tool/build:: error: must be run in the {setup_must_be} environment", file=sys.stderr) + sys.exit(1) + +def get_namespaces() -> Dict[str, Tuple[str, str]]: + authored_dir = os.path.join(os.environ.get("REPO_HOME", "."), "developer", "authored") + if not os.path.isdir(authored_dir): + return {} + + namespaces = {} + for TM_item in os.listdir(authored_dir): + path = os.path.join(authored_dir, TM_item) + if os.path.isdir(path) and not TM_item.startswith("."): + parts = TM_item.rsplit(".", 1) + if len(parts) == 2: + ns = parts[0] + tool = parts[1] + namespaces[ns] = (tool, TM_item) + else: + print(f"(warning) Ignoring '{TM_item}': directory lacks the required . suffix.", file=sys.stderr) + + 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("Available namespaces:") + if namespaces: + for TM_ns, (TM_tool, TM_raw_dir) in namespaces.items(): + print(f" {TM_ns:<20} (Component: {TM_tool}, Dir: {TM_raw_dir})") + else: + print(" (No conforming namespaces currently found in authored/)") + + print("\nExamples:") + print(" build (Displays this usage message)") + print(" build ExampleGreet (Executes 'all' via its assigned component)") + 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 + 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): + print(f"error: Build component '{tool}' for namespace '{namespace}' is missing or not executable at {tool_path}", file=sys.stderr) + sys.exit(1) + + env = os.environ.copy() + env["NAMESPACE"] = namespace + env["NAMESPACE_DIR"] = raw_dir + + tool_cmd = [tool_path, cmd] + + try: + subprocess.run(tool_cmd, env=env, check=True) + except subprocess.CalledProcessError as e: + print(f"Build component '{tool}' failed for namespace '{namespace}' with exit code {e.returncode}", file=sys.stderr) + sys.exit(e.returncode) + +def CLI() -> None: + check_environment() + + repo_home = os.environ.get("REPO_HOME", ".") + dev_dir = os.path.join(repo_home, "developer") + os.chdir(dev_dir) + + args = sys.argv[1:] + namespaces = get_namespaces() + + if not args or args[0] in ["usage", "help", "-h", "--help"]: + print_usage(namespaces) + sys.exit(0) + + matched_any = False + ns_keys = list(namespaces.keys()) + + for TM_arg in args: + parts = TM_arg.split(":") + pattern = parts[0] + commands = parts[1:] + + if not commands: + commands = ["all"] + + matches = fnmatch.filter(ns_keys, pattern) + + if not matches: + print(f"(warning) Pattern '{pattern}' matched no namespaces.", file=sys.stderr) + continue + + 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) + + if not matched_any: + sys.exit(1) + + print("build done.") + +if __name__ == "__main__": + CLI() diff --git a/developer/tool/build_component/copy b/developer/tool/build_component/copy new file mode 100755 index 0000000..f4bbd5a --- /dev/null +++ b/developer/tool/build_component/copy @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# developer/tool/copy + +set -euo pipefail +CMD="${1:-all}" + +if [ "$CMD" = "clean" ]; then + rm -rf "scratchpad/made/$NAMESPACE" + echo "copy: Cleaned scratchpad/made/$NAMESPACE" +elif [ "$CMD" = "all" ]; then + mkdir -p "scratchpad/made" + cp -au "authored/$NAMESPACE_DIR" "scratchpad/made/$NAMESPACE" + echo "copy: Staged $NAMESPACE_DIR -> scratchpad/made/$NAMESPACE" +else + echo "copy: Unrecognized command '$CMD'" + exit 1 +fi diff --git a/developer/tool/build_component/make b/developer/tool/build_component/make new file mode 100755 index 0000000..8b127bf --- /dev/null +++ b/developer/tool/build_component/make @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# developer/tool/make + +set -euo pipefail +CMD="${1:-all}" + +# The GNU Make orchestrator expects C_SOURCE_DIR to point to the raw directory +export C_SOURCE_DIR="authored/$NAMESPACE_DIR" +export KMOD_SOURCE_DIR="authored/$NAMESPACE_DIR" + +/bin/make -f tool/build_component/makefile "$CMD" diff --git a/developer/tool/build_component/makefile b/developer/tool/build_component/makefile new file mode 100644 index 0000000..7914c0b --- /dev/null +++ b/developer/tool/build_component/makefile @@ -0,0 +1,55 @@ +# developer/tool/build_component/makefile +.SUFFIXES: +.EXPORT_ALL_VARIABLES: + +RT_MAKEFILE_DP := $(REPO_HOME)/shared/tool/makefile + +.PHONY: usage +usage: + @printf "Usage: make [usage|version|information|all|lib|CLI|kmod|clean]\n" + +.PHONY: version +version: + @printf "local ----------------------------------------\n" + @echo tool/makefile version 2.0 + @printf "Harmony.mk ----------------------------------------\n" + @$(MAKE) -f $(RT_MAKEFILE_DP)/Harmony.mk version + @printf "target_kernel-module.mk ----------------------------------------\n" + @$(MAKE) -f $(RT_MAKEFILE_DP)/target_kernel-module.mk version + +.PHONY: information +information: + @printf "local ----------------------------------------\n" + -@echo CURDIR='$(CURDIR)' + @echo REPO_HOME="$(REPO_HOME)" + @echo NAMESPACE="$(NAMESPACE)" + @echo C_SOURCE_DIR="$(C_SOURCE_DIR)" + @echo KMOD_BUILD_DIR="/lib/modules/$(shell uname -r)/build" + @echo CURDIR="$(CURDIR)" + @printf "Harmony.mk ----------------------------------------\n" + @$(MAKE) -f $(RT_MAKEFILE_DP)/Harmony.mk information + @printf "target_kernel-module.mk ----------------------------------------\n" + @$(MAKE) -f $(RT_MAKEFILE_DP)/target_kernel-module.mk information + +.PHONY: all +all: library CLI kmod + +.PHONY: library lib +library lib: + @$(MAKE) -f $(RT_MAKEFILE_DP)/Harmony.mk library + +.PHONY: CLI +CLI: + @$(MAKE) -f $(RT_MAKEFILE_DP)/Harmony.mk CLI + +.PHONY: kmod +kmod: + @$(MAKE) -f $(RT_MAKEFILE_DP)/target_kernel-module.mk kmod + +.PHONY: clean +clean: + @printf "local ----------------------------------------\n" + @printf "Harmony.mk ----------------------------------------\n" + @$(MAKE) -f $(RT_MAKEFILE_DP)/Harmony.mk clean + @printf "target_kernel-module.mk ----------------------------------------\n" + @$(MAKE) -f $(RT_MAKEFILE_DP)/target_kernel-module.mk clean diff --git a/developer/tool/do-all b/developer/tool/do-all deleted file mode 100755 index 2350fd8..0000000 --- a/developer/tool/do-all +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -# input guards - - setup_must_be="developer/tool/setup" - if [ "$SETUP" != "$setup_must_be" ]; then - echo "$(script_fp):: error: must be run in the $setup_must_be environment" - exit 1 - fi - -set -e -set -x - - cd "$REPO_HOME"/developer || exit 1 - # /bin/make -f tool/makefile $@ - - scratchpad clear - make - release clean - release write - -set +x -echo "$(script_fn) done." diff --git a/developer/tool/make b/developer/tool/make deleted file mode 100755 index b7e181b..0000000 --- a/developer/tool/make +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env python3 -# -*- mode: python; coding: utf-8; python-indent-offset: 2; indent-tabs-mode: nil -*- -""" -developer/tool/make - Build Orchestrator Wrapper - -This script acts as the primary entry point for compiling the project. -It parses colon-separated arguments mapping specific namespace patterns -(including file globs) to their intended build commands. - -A program developer can modify this script to add custom pre-build checks, -custom argument parsing, or project-specific routing logic. -""" - -import sys ,os ,subprocess ,fnmatch -from typing import List - -def check_environment() -> None: - setup_must_be = "developer/tool/setup" - current_setup = os.environ.get("SETUP" ,"") - if( current_setup != setup_must_be ): - print(f"developer/tool/make:: error: must be run in the {setup_must_be} environment" ,file=sys.stderr) - sys.exit(1) - -def get_namespaces() -> List[str]: - authored_dir = os.path.join(os.environ.get("REPO_HOME" ,".") ,"developer" ,"authored") - if( not os.path.isdir(authored_dir) ): - return [] - - namespaces = [] - for TM_name in os.listdir(authored_dir): - path = os.path.join(authored_dir ,TM_name) - if( os.path.isdir(path) and not TM_name.startswith(".") ): - namespaces.append(TM_name) - namespaces.sort() - return namespaces - -def print_usage() -> None: - print("Usage: make [[:]*]*\n") - print("Commands:") - print(" all Build library, CLI, and kmod (Default)") - print(" library Build only the library archives") - print(" CLI Build only the CLI executables") - print(" kmod Build kernel modules") - print(" clean Remove build artifacts") - print(" information Display build environment variables\n") - - print("Available namespaces:") - namespaces = get_namespaces() - if( namespaces ): - for TM_ns in namespaces: - print(f" {TM_ns}") - else: - print(" (No namespaces currently found in authored/)") - - print("\nExamples:") - print(" make (Displays this usage message)") - print(" make ExampleGreet (Builds 'all' for ExampleGreet)") - print(" make Ex*:library G*:all:information (Builds 'library' for Ex*, 'all' and 'information' for G*)") - print(" make \"*:clean\" (Cleans all namespaces. Quotes prevent Bash expansion)") - -def run_make(cmd: str ,namespace: str) -> None: - env = os.environ.copy() - env["NAMESPACE"] = namespace - - make_cmd = ["/bin/make" ,"-f" ,"tool/makefile" ,cmd] - - try: - subprocess.run(make_cmd ,env=env ,check=True) - except subprocess.CalledProcessError as e: - print(f"make failed for namespace '{namespace}' with exit code {e.returncode}" ,file=sys.stderr) - sys.exit(e.returncode) - -def CLI() -> None: - check_environment() - - repo_home = os.environ.get("REPO_HOME" ,".") - dev_dir = os.path.join(repo_home ,"developer") - os.chdir(dev_dir) - - args = sys.argv[1:] - - if( not args or args[0] in ["usage" ,"help" ,"-h" ,"--help"] ): - print_usage() - sys.exit(0) - - namespaces = get_namespaces() - matched_any = False - - for TM_arg in args: - parts = TM_arg.split(":") - pattern = parts[0] - commands = parts[1:] - - if( not commands ): - commands = ["all"] - - matches = fnmatch.filter(namespaces ,pattern) - - if( not matches ): - print(f"(warning) Pattern '{pattern}' matched no namespaces." ,file=sys.stderr) - continue - - matched_any = True - for TM_ns in matches: - for TM_cmd in commands: - run_make(TM_cmd ,TM_ns) - - if( not matched_any ): - sys.exit(1) - - print("make done.") - -if __name__ == "__main__": - CLI() diff --git a/developer/tool/makefile b/developer/tool/makefile deleted file mode 100644 index 070c6ca..0000000 --- a/developer/tool/makefile +++ /dev/null @@ -1,61 +0,0 @@ -# developer/tool/makefile - Orchestrator (Hybrid) -.SUFFIXES: -.EXPORT_ALL_VARIABLES: - -RT_MAKEFILE_DP := $(REPO_HOME)/shared/tool/makefile - -# If a namespace is provided, update the source directory -ifneq ($(NAMESPACE),) - C_SOURCE_DIR := authored/$(NAMESPACE) - export C_SOURCE_DIR -endif - -.PHONY: usage -usage: - @printf "Usage: make [usage|version|information|all|lib|CLI|kmod|clean]\n" - -.PHONY: version -version: - @printf "local ----------------------------------------\n" - @echo tool/makefile version 2.0 - @printf "Harmony.mk ----------------------------------------\n" - @$(MAKE) -f $(RT_MAKEFILE_DP)/Harmony.mk version - @printf "target_kernel-module.mk ----------------------------------------\n" - @$(MAKE) -f $(RT_MAKEFILE_DP)/target_kernel-module.mk version - -.PHONY: information -information: - @printf "local ----------------------------------------\n" - -@echo CURDIR='$(CURDIR)' - @echo REPO_HOME="$(REPO_HOME)" - @echo NAMESPACE="$(NAMESPACE)" - @echo C_SOURCE_DIR="$(C_SOURCE_DIR)" - @echo KMOD_BUILD_DIR="/lib/modules/$(shell uname -r)/build" - @echo CURDIR="$(CURDIR)" - @printf "Harmony.mk ----------------------------------------\n" - @$(MAKE) -f $(RT_MAKEFILE_DP)/Harmony.mk information - @printf "target_kernel-module.mk ----------------------------------------\n" - @$(MAKE) -f $(RT_MAKEFILE_DP)/target_kernel-module.mk information - -.PHONY: all -all: library CLI kmod - -.PHONY: library lib -library lib: - @$(MAKE) -f $(RT_MAKEFILE_DP)/Harmony.mk library - -.PHONY: CLI -CLI: - @$(MAKE) -f $(RT_MAKEFILE_DP)/Harmony.mk CLI - -.PHONY: kmod -kmod: - @$(MAKE) -f $(RT_MAKEFILE_DP)/target_kernel-module.mk kmod - -.PHONY: clean -clean: - @printf "local ----------------------------------------\n" - @printf "Harmony.mk ----------------------------------------\n" - @$(MAKE) -f $(RT_MAKEFILE_DP)/Harmony.mk clean - @printf "target_kernel-module.mk ----------------------------------------\n" - @$(MAKE) -f $(RT_MAKEFILE_DP)/target_kernel-module.mk clean diff --git a/document/introduction_Harmony.html b/document/introduction_Harmony.html index 7d35941..f70cb72 100644 --- a/document/introduction_Harmony.html +++ b/document/introduction_Harmony.html @@ -3,10 +3,16 @@ Introduction to Harmony - + diff --git a/document/role-and-workflow_product-development.html b/document/role-and-workflow_product-development.html index 149624b..e3e55d6 100644 --- a/document/role-and-workflow_product-development.html +++ b/document/role-and-workflow_product-development.html @@ -3,10 +3,16 @@ Product development roles and workflow - + diff --git a/document/role-and-workflow_product-maintenance.html b/document/role-and-workflow_product-maintenance.html index 6063077..3a97e1b 100644 --- a/document/role-and-workflow_product-maintenance.html +++ b/document/role-and-workflow_product-maintenance.html @@ -3,10 +3,16 @@ Product maintenance roles and workflow - + diff --git a/document/setup.js b/document/setup.js deleted file mode 100644 index bbcc31b..0000000 --- a/document/setup.js +++ /dev/null @@ -1,4 +0,0 @@ -window.RT_REPO_ROOT = "../"; -document.write(''); -document.write(''); -document.write(''); diff --git a/shared/document/setup.js b/shared/document/setup.js deleted file mode 100644 index de1173d..0000000 --- a/shared/document/setup.js +++ /dev/null @@ -1,4 +0,0 @@ -window.RT_REPO_ROOT = "../../"; -document.write(''); -document.write(''); -document.write(''); diff --git a/shared/tool/env_to_emacs b/shared/tool/env_to_emacs new file mode 100755 index 0000000..947efc0 --- /dev/null +++ b/shared/tool/env_to_emacs @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +script_afp=$(realpath "${BASH_SOURCE[0]}") + +set -euo pipefail + +if [ -z "${REPO_HOME:-}" ]; then + echo "emacs-sync:: error: REPO_HOME is not set. Source a setup environment first." + exit 1 +fi + +if ! command -v emacsclient >/dev/null 2>&1; then + echo "emacs-sync:: error: emacsclient is not installed or not in PATH." + exit 1 +fi + +# Push variables to the Emacs global environment +emacsclient --eval "(setenv \"REPO_HOME\" \"$REPO_HOME\")" > /dev/null +emacsclient --eval "(setenv \"PROJECT\" \"$PROJECT\")" > /dev/null + +if [ -n "${ROLE:-}" ]; then + emacsclient --eval "(setenv \"ROLE\" \"$ROLE\")" > /dev/null +fi + +# Sync the PATH so Emacs subprocesses find the local tools +emacsclient --eval "(setenv \"PATH\" \"$PATH\")" > /dev/null + +# Update exec-path for native Emacs executable resolution +emacsclient --eval "(setq exec-path (append (parse-colon-path \"$PATH\") (list exec-directory)))" > /dev/null + +echo "Emacs environment synchronized for project: $PROJECT" diff --git a/shared/tool/penv_to_emacs b/shared/tool/penv_to_emacs deleted file mode 100755 index 947efc0..0000000 --- a/shared/tool/penv_to_emacs +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -script_afp=$(realpath "${BASH_SOURCE[0]}") - -set -euo pipefail - -if [ -z "${REPO_HOME:-}" ]; then - echo "emacs-sync:: error: REPO_HOME is not set. Source a setup environment first." - exit 1 -fi - -if ! command -v emacsclient >/dev/null 2>&1; then - echo "emacs-sync:: error: emacsclient is not installed or not in PATH." - exit 1 -fi - -# Push variables to the Emacs global environment -emacsclient --eval "(setenv \"REPO_HOME\" \"$REPO_HOME\")" > /dev/null -emacsclient --eval "(setenv \"PROJECT\" \"$PROJECT\")" > /dev/null - -if [ -n "${ROLE:-}" ]; then - emacsclient --eval "(setenv \"ROLE\" \"$ROLE\")" > /dev/null -fi - -# Sync the PATH so Emacs subprocesses find the local tools -emacsclient --eval "(setenv \"PATH\" \"$PATH\")" > /dev/null - -# Update exec-path for native Emacs executable resolution -emacsclient --eval "(setq exec-path (append (parse-colon-path \"$PATH\") (list exec-directory)))" > /dev/null - -echo "Emacs environment synchronized for project: $PROJECT"