taking out bin directory for java code too.
[feisty_meow.git] / scripts / generator / build_variables.sh
index a4a2f4e64bebd2a2e897143baecda1c1d4fc97e0..c21f1b781302592de3851d42ecd116dc6fb1ee51 100644 (file)
@@ -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.
@@ -68,13 +71,6 @@ export CLAM_DIR="$(cd $BUILD_SCRIPTS_DIR/../clam ; \pwd)"
 # synonym to make other builds happy.
 export BUILDER_DIR="$BUILDING_HIERARCHY"
 
-# guess the current platform.
-IS_UNIX=$(uname | grep -i linux)
-if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i unix); fi
-if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i darwin); fi
-IS_DOS=$(uname | grep -i ming)
-if [ -z "$IS_DOS" ]; then IS_DOS=$(uname | grep -i cygwin); fi
-
 # set some clam parameters for compilation.  if the script can't guess the
 # right configuration, then you will need to set them in the last 'else'
 # below.
@@ -92,6 +88,11 @@ if [ ! -z "$SHELL_DEBUG" ]; then
   echo "[FEISTY_MEOW_DIR is $FEISTY_MEOW_DIR]"
 fi
 
+if [ "$OPERATING_SYSTEM" == "WIN32" ]; then
+  # harsh on the paths and make them use backwards slashes.
+  export SERIOUS_SLASH_TREATMENT=true
+fi
+
 # new BUILD_TOP variable points at the utter top-most level of any files
 # in the building hierarchy.
 export BUILD_TOP="$FEISTY_MEOW_DIR"
@@ -107,22 +108,17 @@ 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
+if [ ! -z "$SHELL_DEBUG" ]; then
+  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
+fi
 
 ##############
 
@@ -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" $*
+}
+
+