From 84b3bbc5e6be36000fab3e98024980df0fa903b9 Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Mon, 13 Oct 2025 12:49:57 +0000 Subject: [PATCH] C environment tweaks --- env_developer | 20 +++++++++++++------- tool_shared/document/install_generic.org | 15 +++++++-------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/env_developer b/env_developer index b2dcb01..1fb643e 100644 --- a/env_developer +++ b/env_developer @@ -5,20 +5,26 @@ if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then exit 1 fi -export ROLE=developer +# global environment is ROLE agnostic source tool_shared/bespoke/env -PYTHON_HOME = tool_shared/third_party/python +export ROLE=developer + +PYTHON_HOME=tool_shared/third_party/python if [[ ":$PATH:" != *":$PYTHON_HOME/bin:"* ]]; then export PATH="$PYTHON_HOME/bin:$PATH" fi -GCC_HOME = tool_shared/third_party/RT_gcc/release -if [[ ":$PATH:" != *":$GCC_HOME:"* ]]; then - export PATH="$GCC_HOME/bin:$PATH" +RT_GCC=tool_shared/third_party/RT_gcc/release +if [[ ":$PATH:" != *":$RT_GCC:"* ]]; then + export PATH="$RT_GCC:$PATH" +fi + +if [[ -f "$ROLE/tool/env" ]]; then + source "$ROLE/tool/env" +else + cd "$ROLE" || return fi -alias gcc amd64_Deb-12.10_gcc-12.4.1 -cd $ROLE export ENV=$ROLE echo "in environmennt: $ENV" diff --git a/tool_shared/document/install_generic.org b/tool_shared/document/install_generic.org index c02d1d3..add47df 100644 --- a/tool_shared/document/install_generic.org +++ b/tool_shared/document/install_generic.org @@ -41,18 +41,17 @@ This is the generic install.org doc that comes with the skeleton. # PROJECT # USER - tool= # e.g., RT_gcc + # example tool names: 'RT_gcc' 'RT-project share` etc. + tool= tool_dpath="$REPO_HOME/tool_shared/third_party/$tool" - patch_dpath="$REPO_HOME/tool_shared/third_party/patch/" + patch_dpath="$REPO_HOME/tool_shared/patch/" 5. create a patch series (from current vendor state → your local edits) # this can be repeated and will create an encompassing diff file - # optionally crate a new branch after cloning the repo and work from there. - # You won't make any commits, but in case you plan to check these in ever, - # or have a ommits burned into your brain-stem, this will help. + # optionally crate a new branch after cloning the third party tool repo and work from there. You won't make any commits, but in case you plan to ever check the changes in, or have a the bad habit of doing ommits burned into your brain-stem, making a brnch will help. # make changes @@ -61,12 +60,14 @@ This is the generic install.org doc that comes with the skeleton. # do your edits # Stage edits. Do not commit them!! Be sure you are in the third party - # tool directory, or the changes will go to the project. + # tool directory when doing `git add -A` and `git diff` commands. git add -A # diff the stage from the current repo to create the patch file git diff --staged > "$patch_dpath/$tool" + # the diff file can be added to the project and checked in at the project level. + 6. how to apply an existing patch @@ -78,5 +79,3 @@ This is the generic install.org doc that comes with the skeleton. You can see what `git apply` would do by running git apply --check /path/to/your/patch_dpath/$tool - - -- 2.20.1