+############################
+
+# we only run the rest of the script if we know we didn't have some kind of
+# bad thing happen earlier.
+if [ -z "$got_bad" ]; then
+
+ # where we store the binaries used for building the rest of the code base.
+ export CLAM_BINARIES="$RUNTIME_PATH/clam_bin"
+ # the final destination for the new binaries which provide the
+ # build with all the applications it needs to get going.
+ export TARGETS_STORE="$RUNTIME_PATH/binaries"
+ # targets directory is meaningful to clam, which will use it for output.
+ export INTERMEDIATE_STORE="$TARGETS_STORE"
+ # where we are building the applications before they get promoted.
+
+#hmmm: could allow override on this if already set.
+ # calculate which build ini file to use.
+ export BUILD_PARAMETER_FILE="$PRODUCTION_STORE/feisty_meow_config.ini"
+ if [ ! -f "$BUILD_PARAMETER_FILE" ]; then
+ echo "Cannot find a useful build configuration file."
+ fi
+
+ # pick the executable's file ending based on the platform.
+ if [ "$OPERATING_SYSTEM" == "UNIX" ]; then
+ export EXE_ENDING=""
+ elif [ "$OPERATING_SYSTEM" == "WIN32" ]; then
+ export EXE_ENDING=".exe"
+ else
+ echo "The OPERATING_SYSTEM variable is unset or unknown. Bailing out."
+ fi
+
+ # we should have established our internal variables now, so let's try
+ # using them.
+ export PATH=$(dos_to_unix_path $CLAM_BINARIES):$PATH
+
+ # load up the helper variables for visual studio on winders.
+ if [ "$OPERATING_SYSTEM" == "WIN32" ]; then
+ # moved back to the good path of using gcc, not visual studio.
+#what vars needed?
+#trying just unixy ones, since we're doing cygwin on doze.
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TARGETS_STORE"
+ else
+ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TARGETS_STORE"
+ fi
+
+ popd &>/dev/null # checking is over, jump back to the starting point.
+
+ ############################
+
+ # at this point, all the build related variables should be valid.
+
+ if [ -z "$INCLUDED_FROM_BOOTSTRAP" \
+ -a -z "$PARM_1" ]; then
+ # we are running as a stand-alone script, so we stay resident with our
+ # current set of variables.
+ bash
+ fi