maybe building again, patched references to old core folder.
[feisty_meow.git] / scripts / generator / build_variables.sh
index 51547807acf02d0ccb05e402212624fe4677684f..ff710d985a802eeb82e38ba212e6da5cc1f0fb25 100644 (file)
@@ -120,28 +120,15 @@ if [ ! -z "$SHELL_DEBUG" ]; then
   echo "[OS is \"$OPERATING_SYSTEM\"]"
 fi
 
-# the impact of always redoing the repository directory below means that we
-# will always expect the build scripts to be located within the build they're
-# building.  that's fundamentally broken for some usages.
-# but just using the existing repository directory is fundamentally broken
-# too, since then the build variables will never re-adapt to the repository
-# you want.
-# maybe just documentation; if you are changing your repository and the build
-# scripts are in the right place, then you should unset REPOSITORY_DIR.
-# we at least check that the folder still exists now too, but that's not exact
-# knowledge that it's still the right directory.
-
-if [ -z "$REPOSITORY_DIR" -o ! -d "$REPOSITORY_DIR" ]; then
-  # we create the variable repository dir, but we keep the idiotic dos form of
-  # the path, because otherwise lots of bad things happens when passing the
-  # folders around to visual studio commands that don't allow a space after them.
-  if [ -d "$BUILDING_HIERARCHY/source" ]; then
-    # old style repository is same height as building hierarchy.
-    export REPOSITORY_DIR="$BUILDING_HIERARCHY"
-  else
-    # new style repository is a level above the build hierarchy.
-    export REPOSITORY_DIR="$(echo "$BUILDING_HIERARCHY" | sed -e 's/\(.*\)\/[^\/]*/\1/')"
-  fi
+# we create the variable REPOSITORY_DIR, but we keep the dos form of
+# the path, because otherwise lots of bad things happens when passing the
+# folders around to visual studio commands that don't allow a space after them.
+if [ -d "$BUILDING_HIERARCHY/source" ]; then
+  # old style repository is same height as building hierarchy.
+  export REPOSITORY_DIR="$BUILDING_HIERARCHY"
+else
+  # new style repository is a level above the build hierarchy.
+  export REPOSITORY_DIR="$(echo "$BUILDING_HIERARCHY" | sed -e 's/\(.*\)\/[^\/]*/\1/')"
 fi
 
 if [ "$OPERATING_SYSTEM" = "WIN32" ]; then
@@ -155,12 +142,7 @@ fi
 
 # new BUILD_TOP variable points at the utter top-most level of any files
 # in the building hierarchy.
-if [ -d "$REPOSITORY_DIR/../../build" ]; then
-  export BUILD_TOP="$REPOSITORY_DIR/../.."
-else
-  # this is actually just a guess.
-  export BUILD_TOP="$REPOSITORY_DIR"
-fi
+export BUILD_TOP="$REPOSITORY_DIR"
 
 # this variable points at a folder where we store most of the generated products
 # of the build.  these tend to be the things that will be used for packaging into
@@ -212,7 +194,7 @@ fi
 
 # now compute some more paths with a bit of "heuristics" for where we can
 # find the source code.
-export TOOL_SOURCES="$REPOSITORY_DIR/core/tools"
+export TOOL_SOURCES="$REPOSITORY_DIR/nucleus/tools"
 if [ ! -d "$TOOL_SOURCES/dependency_tool" -o ! -d "$TOOL_SOURCES/clam_tools" ]; then
   if [ ! -d "$TOOL_SOURCES/dependency_tool" -o ! -d "$TOOL_SOURCES/clam_tools" ]; then
     echo "This script cannot locate the tool source code folder.  This is where the"