# this variable causes the scripts that listen to it to print more information
# when they run.
+export ERROR_OCCURRED=
+ # no error to start with.
+
##############
if [ -z "$FEISTY_MEOW_GENERATED" ]; then
echo "The yeti scripts need to be initialized via the bootstrap process, e.g.:"
echo " bash $HOME/feisty_meow/scripts/core/bootstrap_shells.sh"
echo -e '\n\n'
+ ERROR_OCCURRED=true
fi
##############
if [ ! -z "$SHELL_DEBUG" ]; then echo heavyweight login ends....; fi
fi
+if [ -z "$ERROR_OCCURRED" ]; then
+ # set a sentinel variable to say we loaded the feisty meow environment.
+ export FEISTY_MEOW_SCRIPTS_LOADED=true
+fi
+
# make sure we know how to find our bash bins.
export PATH=/bin:$PATH
+
# signals that we're doing a fresh build to the variables script.
export INCLUDED_FROM_BOOTSTRAP=true
+
# pull in our build variables using the path to this script.
export BUILD_SCRIPTS_DIR="$( \cd "$(\dirname "$0")" && \pwd )"
echo build script initial from bootstrap: $BUILD_SCRIPTS_DIR
BUILD_SCRIPTS_DIR="$(echo $BUILD_SCRIPTS_DIR | tr '\\\\' '/' )"
echo build script after: $BUILD_SCRIPTS_DIR
+
# load in feisty meow basic scripts, if not already loaded.
-bash "$BUILD_SCRIPTS_DIR/../core/bootstrap_shells.sh"
-source "$BUILD_SCRIPTS_DIR/../core/launch_feisty_meow.sh"
+if [ -z "$FEISTY_MEOW_SCRIPTS_LOADED" ]; then
+ bash "$BUILD_SCRIPTS_DIR/../core/bootstrap_shells.sh"
+ source "$BUILD_SCRIPTS_DIR/../core/launch_feisty_meow.sh"
+fi
+
# load in build variables based on our deduced paths.
source "$BUILD_SCRIPTS_DIR/build_variables.sh" "$BUILD_SCRIPTS_DIR/build_variables.sh"
##############
+# outer check on whether this already was run or not.
+if [ -z "$BUILD_VARS_LOADED" ]; then
+
# perform some calculations to get the right paths from our parameters.
if [ ! -z "$PARM_1" ]; then
# use the first real parameter since this is probably the 'source' version.
mkdir -p "$LOGS_DIR"
fi
-# hook clam into the compilation system.
-function make()
-{
- /usr/bin/make -I "$CLAM_DIR" $*
-}
-
##############
# debugging area where we say what we think we know.
-#echo scripts: $BUILD_SCRIPTS_DIR
-#echo build tools hier: $BUILDING_HIERARCHY
-#echo this tool: $THIS_TOOL_NAME
-#echo repository: $FEISTY_MEOW_DIR
-#echo clam: $CLAM_DIR
-#echo makeflags: $MAKEFLAGS
+echo scripts: $BUILD_SCRIPTS_DIR
+echo build tools hier: $BUILDING_HIERARCHY
+echo this tool: $THIS_TOOL_NAME
+echo repository: $FEISTY_MEOW_DIR
+echo clam: $CLAM_DIR
##############
bash
fi
+ # sentinel that tells us this script was pulled in.
+ export BUILD_VARS_LOADED=true
+
fi
+fi # outer wrapper for already ran build vars check.
+
+##############
+
+# hook clam into the compilation system.
+# this always needs to be defined since functions aren't exported.
+function make()
+{
+ /usr/bin/make -I "$CLAM_DIR" $*
+}
+
+
print_usage
return 33
fi
-#echo "common tools dir is \"$VSxTOOLS\""
export VSxTOOLS="$(short_path "$VSxTOOLS" | tr "A-Z" "a-z" | sed -e 's/\\/\//g' | sed -e 's/^\(.\):/\/\1/' )"
-#echo cleaned comn tools is $VSxTOOLS
export VIS_STU_ROOT="$(echo $VSxTOOLS | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/' | sed -e 's/^\(.\):/\/\1/' )"
export VSINSTALLDIR="$VIS_STU_ROOT"
-#echo root of visual studio is $VSINSTALLDIR
export WINDIR="$(short_path "$WINDIR" | sed -e 's/\\/\//g' | sed -e 's/^\(.\):/\/\1/' )"
-#echo cleaned windir is $WINDIR
-
-#echo "prior path is $PATH"
export VCINSTALLDIR="$VSINSTALLDIR/VC"
export VSCOMMONROOT="$VSINSTALLDIR/Common7"
export PLATFORM_DIR="$(short_path "$PROGRAMFILES/Microsoft SDKs/Windows/v7.0A" | tr "A-Z" "a-z" | sed -e 's/^\(.*\)\/[^\/]*\/[^\/]*[\/]$/\1/' | sed -e 's/^\(.\):/\/\1/' )"
fi
export WindowsSdkDir="$PLATFORM_DIR"
-#echo platform dir is $PLATFORM_DIR
-#echo "path before is $PATH"
+echo "path before is $PATH"
export PATH="$DevEnvDir:$VCINSTALLDIR/BIN:$VSxTOOLS:$VSxTOOLS/bin:$FrameworkDir/$FrameworkVersion:$FrameworkDir/v3.5:$VCINSTALLDIR/VCPackages:$VSINSTALLDIR/Common7/Tools:$PLATFORM_DIR/bin:$PATH"
-#hmmm: yuck! wake me up when we don't need all of those in the path.
-#echo "path after is $PATH"
+echo "path after is $PATH"
export INCLUDE="$VCINSTALLDIR/ATLMFC/INCLUDE:$VCINSTALLDIR/INCLUDE:$PLATFORM_DIR/include"
#:$FrameworkSDKDir/include"
export FrameworkDir="$(echo $FrameworkDir | sed -e 's/^\/\(.\)[\\\/]\(.*\)$/\1:\\\2/' | tr "/" "\\" 2>/dev/null )"
# the redirection of stderr to null is to get around an obnoxious cygwin
# warning that seems to be erroneously bitching about backslashes.
-#echo framedir now $FrameworkDir
+##############
+
+echo "common tools dir is \"$VSxTOOLS\""
+echo cleaned windir is $WINDIR
+echo cleaned comn tools is $VSxTOOLS
+echo root of visual studio is $VSINSTALLDIR
+echo platform dir is $PLATFORM_DIR
+echo framedir now $FrameworkDir
+
+##############
+