From: Chris Koeritz Date: Fri, 6 Apr 2012 15:06:15 +0000 (-0400) Subject: updated for making cygwin behave a bit better. still not right though. X-Git-Tag: 2.140.90~1441 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=805aef436e1d6d5baccf79ac23e9dd2799f37a92;p=feisty_meow.git updated for making cygwin behave a bit better. still not right though. --- diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index e0184f5d..a75c5f57 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -14,6 +14,9 @@ # 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 @@ -30,6 +33,7 @@ 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 ############## @@ -95,3 +99,8 @@ if [ -z "$LIGHTWEIGHT_INIT" ]; then 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 + diff --git a/scripts/generator/bootstrap_build.sh b/scripts/generator/bootstrap_build.sh index 33a9b24a..4f439bd0 100644 --- a/scripts/generator/bootstrap_build.sh +++ b/scripts/generator/bootstrap_build.sh @@ -25,16 +25,22 @@ # 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" diff --git a/scripts/generator/build_variables.sh b/scripts/generator/build_variables.sh index a4a2f4e6..10ad9ccd 100644 --- a/scripts/generator/build_variables.sh +++ b/scripts/generator/build_variables.sh @@ -50,6 +50,9 @@ source $FEISTY_MEOW_SCRIPTS/core/functions.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. @@ -107,22 +110,15 @@ if [ ! -d "$LOGS_DIR" ]; then 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 ############## @@ -219,5 +215,20 @@ if [ -z "$got_bad" ]; then 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" $* +} + + diff --git a/scripts/generator/vis_stu_vars.sh b/scripts/generator/vis_stu_vars.sh index 670c04ca..a4de1dca 100644 --- a/scripts/generator/vis_stu_vars.sh +++ b/scripts/generator/vis_stu_vars.sh @@ -29,18 +29,12 @@ if [ -z "$VSxTOOLS" ]; then 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" @@ -56,12 +50,10 @@ if [ ! -d "$PLATFORM_DIR" ]; then 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" @@ -73,6 +65,16 @@ export LIB="$VCINSTALLDIR/ATLMFC/LIB:$VCINSTALLDIR/LIB:$PLATFORM_DIR/lib" 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 + +############## +