better naming... bootstrap_shells => reconfigure_feisty_meow and bootstrap_build...
authorChris Koeritz <fred@gruntose.com>
Sat, 6 Feb 2016 02:50:32 +0000 (21:50 -0500)
committerChris Koeritz <fred@gruntose.com>
Sat, 6 Feb 2016 02:50:32 +0000 (21:50 -0500)
building.txt
doc/binaries_note.txt
doc/clam_manual/clam_docs.html
scripts/core/bootstrap_shells.sh [deleted file]
scripts/core/functions.sh
scripts/core/generate_aliases.pl
scripts/core/launch_feisty_meow.sh
scripts/core/reconfigure_feisty_meow.sh [new file with mode: 0644]
scripts/generator/bootstrap_build.sh [deleted file]
scripts/generator/produce_feisty_meow.sh [new file with mode: 0644]
scripts/rev_control/getem.sh

index bd2be9e9b01ab74e970327ceba315f4f66c94d5a..5e9f0a4865e68ff951e4132500c0397ec145a000 100644 (file)
@@ -19,7 +19,7 @@ Quick Start for the Feisty Meow Codebase:
     Note that you may need to install some dependencies first (see below
     for installation instructions).
 
-    bash ~/feisty_meow/scripts/generator/bootstrap_build.sh
+    bash ~/feisty_meow/scripts/generator/produce_feisty_meow.sh
 
     All the applications can be found in $BINDIR
     after the build is complete.
@@ -36,7 +36,7 @@ Quick Start for the Feisty Meow Codebase:
     Set up the feisty_meow scripts the first time; this is only needed once,
     unless you want to regenerate the scripts from the latest version.
 
-    bash ~/feisty_meow/scripts/core/bootstrap_shells.sh
+    bash ~/feisty_meow/scripts/core/reconfigure_feisty_meow.sh
 
     Load the script environment into the current shell.
 
index 7c6b43552f42d4b86c03308e647b5b18d421112f..d56dfe39fc13d8017bf2344e808d370a50d6d492 100644 (file)
@@ -4,7 +4,7 @@ in the production/win32_helper folder.  Feel free to not trust it.
 
 short_path.exe:
   This tool is built by the feisty meow application bootstrapping process
-  (that is, by scripts/generator/bootstrap_build.sh), but unfortunately it is
+  (that is, by scripts/generator/produce_feisty_meow.sh), but unfortunately it is
   needed *by* that process when your visual studio installation path has
   spaces in it.  To fix this chicken & egg problem, you can manually change
   your VC root variable (e.g. VS100COMNTOOLS) to the short path version (as
index 0be9ed9da884f7b88e058abda08493358d3698e0..eb4a54850b87827feba5bd217702d71d4d2ad5f1 100644 (file)
           <small> </small><big> </big><small> </small>
           <li><big>If you would rather rebuild them from source, then
               running
-              the script "bin/bootstrap_build.sh" will
+              the script "scripts/generator/produce_feisty_meow.sh" will
               recreate all of these internal tools.<br>
             </big></li>
           <small> </small><big> </big><small> </small>
diff --git a/scripts/core/bootstrap_shells.sh b/scripts/core/bootstrap_shells.sh
deleted file mode 100644 (file)
index 0e64325..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-#
-# bootstrap_shells:
-#
-# This script creates the directory for auto-generated scripts and gets
-# the current user's account ready to use the feisty meow scripts.
-#
-# Note: this does not yet ensure that the profile is executed on shell
-# startup.  that can be added manually by editing your .bashrc file.
-# read the examples/feisty_meow_startup/bashrc_user file for more details.
-
-ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && /bin/pwd )"
-CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )"
-THIS_TOOL_NAME="$(basename "$0")"
-
-# set up the feisty_meow dir.
-pushd "$CORE_SCRIPTS_DIR/../.." &>/dev/null
-source "$CORE_SCRIPTS_DIR/functions.sh"
-
-#echo originating folder is $ORIGINATING_FOLDER
-export FEISTY_MEOW_APEX="$(/bin/pwd)"
-#echo feisty now is FEISTY_MEOW_APEX=$FEISTY_MEOW_APEX
-
-# repetitive bit stolen from variables.  should make a file out of this somehow.
-IS_DOS=$(uname | grep -i ming)
-if [ -z "$IS_DOS" ]; then IS_DOS=$(uname | grep -i cygwin); fi
-# now if we're stuck in DOS, then fix the feisty meow variable name.
-if [ ! -z "$IS_DOS" ]; then
-  FEISTY_MEOW_APEX="$(cmd /c chdir | tr A-Z a-z | sed -e 's/\\/\//g')"
-echo feisty meow dos is: $FEISTY_MEOW_APEX
-  FEISTY_MEOW_APEX="$(dos_to_unix_path "$FEISTY_MEOW_APEX")"
-echo new feisty meow fixed dir is: $FEISTY_MEOW_APEX
-fi
-
-popd &>/dev/null
-
-export FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_APEX/scripts"
-
-# FEISTY_MEOW_LOADING_DOCK is where the generated files feisty_meow uses are located.
-export FEISTY_MEOW_LOADING_DOCK="$HOME/.zz_feisty_loading"
-if [ ! -d "$FEISTY_MEOW_LOADING_DOCK" ]; then
-  mkdir -p "$FEISTY_MEOW_LOADING_DOCK"
-fi
-# make toast out of generated files right away, but leave any custom scripts.
-find "$FEISTY_MEOW_LOADING_DOCK" -maxdepth 1 -type f -exec rm -f "{}" ';' &>/dev/null
-if [ ! -d "$FEISTY_MEOW_LOADING_DOCK/custom" ]; then
-  mkdir "$FEISTY_MEOW_LOADING_DOCK/custom"
-fi
-
-# just a variable we use in here to refer to the generated variables file.
-FEISTY_MEOW_VARIABLES_LOADING_FILE="$FEISTY_MEOW_LOADING_DOCK/fmc_variables.sh"
-# create the alias file as totally blank.
-echo -n >"$FEISTY_MEOW_VARIABLES_LOADING_FILE"
-for i in FEISTY_MEOW_APEX FEISTY_MEOW_SCRIPTS FEISTY_MEOW_LOADING_DOCK; do
-  echo "export $i=${!i}" >>"$FEISTY_MEOW_VARIABLES_LOADING_FILE"
-done
-
-# load our variables so we can run our perl scripts successfully.
-source "$FEISTY_MEOW_SCRIPTS/core/variables.sh"
-
-# create our common aliases.
-perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl"
-
-if [ ! -z "$SHELL_DEBUG" ]; then
-  echo established these variables for feisty_meow assets:
-  echo ==============
-  cat "$FEISTY_MEOW_VARIABLES_LOADING_FILE"
-  echo ==============
-fi
-
index 3ecbca2ff5d0d896084249f4336d0ada991e9f72..09d8836a898094f326e19354b31041f28749094e 100644 (file)
@@ -367,7 +367,7 @@ if [ -z "$skip_all" ]; then
     if [ -z "$wheres_nechung" ]; then
       echo "The nechung oracle program cannot be found.  You may want to consider"
       echo "rebuilding the feisty meow applications with this command:"
-      echo "bash $FEISTY_MEOW_SCRIPTS/generator/bootstrap_build.sh"
+      echo "bash $FEISTY_MEOW_SCRIPTS/generator/produce_feisty_meow.sh"
     else
       $wheres_nechung
     fi
@@ -377,7 +377,7 @@ if [ -z "$skip_all" ]; then
   function regenerate() {
     # do the bootstrapping process again.
     echo "regenerating feisty meow script environment."
-    bash $FEISTY_MEOW_SCRIPTS/core/bootstrap_shells.sh
+    bash $FEISTY_MEOW_SCRIPTS/core/reconfigure_feisty_meow.sh
     echo
     # force a full reload by turning off sentinel variable and alias.
     # the nethack one is used by fred's customizations.
index 8e4a70cfa3d005dbe14512fe80f4de11a1224757..726a0bbf323186d1ebf25ad518d3a99cf5ad1186 100644 (file)
@@ -154,7 +154,7 @@ if ( ! length("$FEISTY_MEOW_LOADING_DOCK") ) {
   print "\
 The FEISTY_MEOW_LOADING_DOCK variable is not defined.  This must point to the location where\n\
 the generated scripts are stored.  Perhaps you still need to run\n\
-bootstrap_shells.sh and set up some environment variables.  Please see\n\
+reconfigure_feisty_meow.sh and set up some environment variables.  Please see\n\
 http://feistymeow.org for more details.\n";
   exit 1;
 #really need to use better exit codes.
index 8f0a3a485aa945f11ab2ea9d1ae857bbbaba3f98..fec110793daf8d4ff2b679219129561402658dac 100644 (file)
@@ -34,7 +34,7 @@ if [ -z "$FEISTY_MEOW_LOADING_DOCK" ]; then
   if [ ! -f "$FEISTY_MEOW_VARIABLES_LOADING_FILE" ]; then
     echo -e '\n\n'
     echo "Feisty meow scripts need initialization via the bootstrap process, e.g.:"
-    echo "  bash $HOME/feisty_meow/scripts/core/bootstrap_shells.sh"
+    echo "  bash $HOME/feisty_meow/scripts/core/reconfigure_feisty_meow.sh"
     echo -e '\n\n'
     ERROR_OCCURRED=true
   fi
diff --git a/scripts/core/reconfigure_feisty_meow.sh b/scripts/core/reconfigure_feisty_meow.sh
new file mode 100644 (file)
index 0000000..3a36be6
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/bash
+#
+# reconfigure_feisty_meow:
+#
+# This script creates the directory for auto-generated scripts and gets
+# the current user's account ready to use the feisty meow scripts.
+#
+# Note: this does not yet ensure that the profile is executed on shell
+# startup.  that can be added manually by editing your .bashrc file.
+# read the examples/feisty_meow_startup/bashrc_user file for more details.
+
+ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && /bin/pwd )"
+CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )"
+THIS_TOOL_NAME="$(basename "$0")"
+
+# set up the feisty_meow dir.
+pushd "$CORE_SCRIPTS_DIR/../.." &>/dev/null
+source "$CORE_SCRIPTS_DIR/functions.sh"
+
+#echo originating folder is $ORIGINATING_FOLDER
+export FEISTY_MEOW_APEX="$(/bin/pwd)"
+#echo feisty now is FEISTY_MEOW_APEX=$FEISTY_MEOW_APEX
+
+# repetitive bit stolen from variables.  should make a file out of this somehow.
+IS_DOS=$(uname | grep -i ming)
+if [ -z "$IS_DOS" ]; then IS_DOS=$(uname | grep -i cygwin); fi
+# now if we're stuck in DOS, then fix the feisty meow variable name.
+if [ ! -z "$IS_DOS" ]; then
+  FEISTY_MEOW_APEX="$(cmd /c chdir | tr A-Z a-z | sed -e 's/\\/\//g')"
+echo feisty meow dos is: $FEISTY_MEOW_APEX
+  FEISTY_MEOW_APEX="$(dos_to_unix_path "$FEISTY_MEOW_APEX")"
+echo new feisty meow fixed dir is: $FEISTY_MEOW_APEX
+fi
+
+popd &>/dev/null
+
+export FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_APEX/scripts"
+
+# FEISTY_MEOW_LOADING_DOCK is where the generated files feisty_meow uses are located.
+export FEISTY_MEOW_LOADING_DOCK="$HOME/.zz_feisty_loading"
+if [ ! -d "$FEISTY_MEOW_LOADING_DOCK" ]; then
+  mkdir -p "$FEISTY_MEOW_LOADING_DOCK"
+fi
+# make toast out of generated files right away, but leave any custom scripts.
+find "$FEISTY_MEOW_LOADING_DOCK" -maxdepth 1 -type f -exec rm -f "{}" ';' &>/dev/null
+if [ ! -d "$FEISTY_MEOW_LOADING_DOCK/custom" ]; then
+  mkdir "$FEISTY_MEOW_LOADING_DOCK/custom"
+fi
+
+# just a variable we use in here to refer to the generated variables file.
+FEISTY_MEOW_VARIABLES_LOADING_FILE="$FEISTY_MEOW_LOADING_DOCK/fmc_variables.sh"
+# create the alias file as totally blank.
+echo -n >"$FEISTY_MEOW_VARIABLES_LOADING_FILE"
+for i in FEISTY_MEOW_APEX FEISTY_MEOW_SCRIPTS FEISTY_MEOW_LOADING_DOCK; do
+  echo "export $i=${!i}" >>"$FEISTY_MEOW_VARIABLES_LOADING_FILE"
+done
+
+# load our variables so we can run our perl scripts successfully.
+source "$FEISTY_MEOW_SCRIPTS/core/variables.sh"
+
+# create our common aliases.
+perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl"
+
+if [ ! -z "$SHELL_DEBUG" ]; then
+  echo established these variables for feisty_meow assets:
+  echo ==============
+  cat "$FEISTY_MEOW_VARIABLES_LOADING_FILE"
+  echo ==============
+fi
+
diff --git a/scripts/generator/bootstrap_build.sh b/scripts/generator/bootstrap_build.sh
deleted file mode 100644 (file)
index 9409850..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-##############
-#  Name   : initial setup script for HOOPLE
-#  Author : Chris Koeritz
-#  Purpose:
-#    This script can bootstrap the HOOPLE libraries from a state where none   #
-#  of the required binaries are built yet.  It will build the tools that the  #
-#  CLAM system and HOOPLE need to get a build done.  Then the script builds   #
-#  the whole source tree as a test of the code's overall health.              #
-##############
-# Copyright (c) 2004-$now By Author.  This program is free software; you can  #
-# redistribute it and/or modify it under the terms of the GNU General Public  #
-# License as published by the Free Software Foundation; either version 2 of   #
-# the License or (at your option) any later version.  This is online at:      #
-#     http://www.fsf.org/copyleft/gpl.html                                    #
-# Please send any updates to: fred@gruntose.com                               #
-##############
-
-# prerequisites for this script:
-#
-# (1) the script should be run with a full path, so that it can decide where
-#     it lives with minimal fuss.
-# (2) on windows, the unix tools bin directory should already be in the path
-#     so that tools like dirname are already available.  use msys or cygwin
-#     at your discretion and your own risk.
-
-# 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")" && /bin/pwd )"
-#echo build scripts dir initial value: $BUILD_SCRIPTS_DIR
-BUILD_SCRIPTS_DIR="$(echo $BUILD_SCRIPTS_DIR | tr '\\\\' '/' )"
-#echo build scripts dir after chewing: $BUILD_SCRIPTS_DIR
-
-# load in feisty meow basic scripts, if not already loaded.
-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
-
-source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
-
-# translate to dos format if there's a cygdrive in there; otherwise microsoft's tools
-# will hose up completely due to unknown paths.
-export FEISTY_MEOW_APEX="$(unix_to_dos_path $FEISTY_MEOW_APEX)"
-
-# load in build variables based on our deduced paths.
-source "$BUILD_SCRIPTS_DIR/build_variables.sh" "$BUILD_SCRIPTS_DIR/build_variables.sh"
-
-##############
-
-# creates the directory for our binaries and gives it a reasonable paths configuration.
-function prepare_binaries_dir()
-{
-  # we'll store binaries here from the bootstrap process.
-  if [ ! -d "$CLAM_BINARY_DIR" ]; then
-    echo "creating binary dir now in $CLAM_BINARY_DIR"
-    mkdir -p "$CLAM_BINARY_DIR"
-  fi
-  if [ ! -f "$CLAM_BINARY_DIR/paths.ini" ]; then
-    echo "copied paths.ini to binary dir."
-    cp "$PRODUCTION_DIR/paths.ini" "$CLAM_BINARY_DIR"
-  fi
-}
-
-##############
-
-# turn off sounds to avoid running the sound player that's not been built yet.
-unset CLAM_ERROR_SOUND
-unset CLAM_FINISH_SOUND
-
-##############
-
-echo "Build bootstrap process has started."
-
-# preconditions for the build process...
-
-# set up our output directories etc.
-prepare_binaries_dir
-
-# set a flag for this process so we can omit certain compilations as necessary.
-export BOOT_STRAPPING=true
-
-# enable this macro to get a much noisier build.
-#export BE_NOISY=NOISY=t
-
-##############
-
-# these default flags turn off unnecessary support when we're rebuilding the
-# minimal toolset needed for a successful build of hoople.
-declare -a BUILD_DEFAULTS=( "BOOT_STRAPPING=t" "OPTIMIZE=t" "REBUILD=t" "DEBUG=" )
-  # bootstrapping is always turned on for this particular script.
-  # we also always optimize these builds and turn off the debug flag.
-  # rebuild ensures that the new apps are made fresh: "REBUILD=t"
-  #   it can be turned off when the build bootstrapper is being tested.
-  # noisy can be added to spew lots of text: "NOISY=t"
-  #   this can help with compilation issues by showing all the flags.
-
-function make_code {
-  make $* $BE_NOISY ${BUILD_DEFAULTS[@]}
-  if [ $? != 0 ]; then
-    echo "Failed to make on: $*"
-    exit 2323
-  fi
-}
-
-# removes pcdos eol from any scripts.  that assumes that the bootstrap script
-# itself isn't polluted with them.
-function strip_cr {
-  ctrl_m=$'\015'
-  for i in $*; do
-    tempgrep="$(mktemp "$TEMPORARIES_DIR/tempgrep.XXXXXX")"
-    grep -l "$ctrl_m" "$i" >$tempgrep
-    if [ ! -z "$(cat $tempgrep)" ]; then
-      temp="$(mktemp "$TEMPORARIES_DIR/tempsed.XXXXXX")"
-      sed -e "s/$ctrl_m$//" <$i >$temp
-      mv -f $temp $i
-    fi
-    rm "$tempgrep"
-  done
-}
-
-# the promote function moves a file from the exe directory into the build's
-# bin directory.  it performs the copy step and makes the file executable.
-# the original name should just be the root of the filename without any
-# extension.
-# NOTE: this depends on the operating system having been chosen above!
-if [ "$OPERATING_SYSTEM" = "UNIX" ]; then
-  function promote {
-    prepare_binaries_dir
-
-    if [ ! -f "$INTERMEDIATE_EXE_DIR/$1" ]; then
-      echo "Failed to build the application $1--quitting now."
-      exit 1892
-    fi
-    cp "$INTERMEDIATE_EXE_DIR/$1" "$CLAM_BINARY_DIR/$1"
-    strip "$CLAM_BINARY_DIR/$1"
-    chmod 755 "$CLAM_BINARY_DIR/$1"
-  }
-elif [ "$OPERATING_SYSTEM" = "WIN32" ]; then
-  function promote {
-    prepare_binaries_dir
-
-    if [ ! -f "$INTERMEDIATE_EXE_DIR/$1.exe" ]; then
-      echo "Failed to build the application $1.exe--quitting now."
-      exit 1892
-    fi
-    cp "$INTERMEDIATE_EXE_DIR/$1.exe" "$CLAM_BINARY_DIR"
-    chmod 755 "$CLAM_BINARY_DIR/$1.exe"
-  }
-else
-  echo "The OPERATING_SYSTEM variable is unset or unknown.  Bailing out."
-  exit 1822
-fi
-
-##############
-
-# start the actual build process now...
-
-# load in the feisty meow building environment.
-source "$BUILD_SCRIPTS_DIR/build_variables.sh" "$BUILD_SCRIPTS_DIR/build_variables.sh"
-
-# clean out any current contents.
-bash "$BUILD_SCRIPTS_DIR/whack_build.sh" clean
-
-# make this again so no one gets cranky.
-mkdir -p "$LOGS_DIR"
-
-toolset_names=(makedep value_tagger version_stamper vsts_version_fixer write_build_config short_path sleep_ms zap_process playsound create_guid)
-
-if [ -z "$SAVE_BINARIES" ]; then
-  for i in ${toolset_names[*]}; do
-    whack_name="$CLAM_BINARY_DIR/$i$EXE_ENDING"
-#echo removing "$whack_name"
-    rm -f "$whack_name"
-  done
-fi
-
-# make the clam shell scripts executable.
-chmod 755 "$CLAM_DIR"/*.sh
-chmod 755 "$CLAM_DIR"/cpp/*.sh
-#chmod 755 "$CLAM_DIR"/csharp/*.sh
-
-# rebuild the dependency tool.  needed by everything, pretty much, but
-# since it's from the xfree project, it doesn't need any of our libraries.
-if [ ! -f "$CLAM_BINARY_DIR/makedep$EXE_ENDING" ]; then
-  pushd "$TOOL_SOURCES/dependency_tool" &>/dev/null
-  make_code pre_compilation NO_DEPS=t OMIT_VERSIONS=t
-  make_code NO_DEPS=t OMIT_VERSIONS=t
-  if [ ! -f "$INTERMEDIATE_EXE_DIR/makedep$EXE_ENDING" ]; then
-    echo ""
-    echo ""
-    echo "The build of the makedep tool has failed.  Unknown causes...  Argh."
-    echo ""
-    exit 1820
-  fi
-  # make the tool available for the rest of the build.
-  promote makedep
-  popd &>/dev/null
-fi
-
-# rebuild the version tools and other support apps.
-if [ ! -f "$CLAM_BINARY_DIR/value_tagger$EXE_ENDING" \
-    -o ! -f "$CLAM_BINARY_DIR/version_stamper$EXE_ENDING" \
-    -o ! -f "$CLAM_BINARY_DIR/vsts_version_fixer$EXE_ENDING" \
-    -o ! -f "$CLAM_BINARY_DIR/write_build_config$EXE_ENDING" ]; then
-  pushd "$TOOL_SOURCES/clam_tools" &>/dev/null
-  make_code pre_compilation OMIT_VERSIONS=t
-  make_code OMIT_VERSIONS=t
-
-#hmmm: really this should check all the expected apps.
-#      nice to just have an array of the things built by this guy.
-  if [ ! -f "$INTERMEDIATE_EXE_DIR/version_stamper$EXE_ENDING" ]; then
-    echo ""
-    echo ""
-    echo "The build of the version_stamper tool has failed.  Unknown causes...  Argh."
-    echo ""
-    exit 1821
-  fi
-
-  promote value_tagger # tool scrambles through headers to standardize outcomes.
-  promote version_stamper  # used for version stamping.
-  promote vsts_version_fixer  # used for version stamping.
-  promote write_build_config  # creates a header of build-specific config info.
-
-  popd &>/dev/null
-fi
-
-# build a few other utilities.
-if [ ! -f "$CLAM_BINARY_DIR/short_path$EXE_ENDING" \
-    -o ! -f "$CLAM_BINARY_DIR/sleep_ms$EXE_ENDING" \
-    -o ! -f "$CLAM_BINARY_DIR/create_guid$EXE_ENDING" \
-    -o ! -f "$CLAM_BINARY_DIR/zap_process$EXE_ENDING" \
-    -o ! -f "$CLAM_BINARY_DIR/playsound$EXE_ENDING" ]; then
-  pushd "$TOOL_SOURCES/simple_utilities" &>/dev/null
-  make_code pre_compilation OMIT_VERSIONS=t
-  make_code OMIT_VERSIONS=t
-
-  promote create_guid  # globally unique ID creator.
-  promote playsound  # sound playback tool.
-  promote short_path  # provides short path names for exes on windows.
-  promote sleep_ms  # sleep tool is used in some scripts.
-  promote zap_process  # kills a process in the task list.
-
-  popd &>/dev/null
-fi
-
-echo "The build binaries have been re-created (or were already present)."
-
-# we won't do the full build if they told us to just do the bootstrap.
-if [ -z "$JUST_BOOTSTRAP_APPS" ]; then
-  echo Cleaning up the temporary files that were built.
-  bash "$BUILD_SCRIPTS_DIR/whack_build.sh" clean
-
-  # recreate our useful junk directories...
-  mkdir -p "$GENERATED_DIR"
-  mkdir -p "$TEMPORARIES_DIR"
-  mkdir -p "$LOGS_DIR"
-
-  echo Now starting a normal build of the repository source code.
-  pushd "$FEISTY_MEOW_APEX" &>/dev/null
-  unset BUILD_DEFAULTS
-  declare -a BUILD_DEFAULTS=( "BOOT_STRAPPING=" "OPTIMIZE=t" "DEBUG=t" "REBUILD=t" )
-  make_code
-
-  popd &>/dev/null
-fi
-
diff --git a/scripts/generator/produce_feisty_meow.sh b/scripts/generator/produce_feisty_meow.sh
new file mode 100644 (file)
index 0000000..354d2fb
--- /dev/null
@@ -0,0 +1,271 @@
+##############
+#  Name   : initial setup script for HOOPLE
+#  Author : Chris Koeritz
+#  Purpose:
+#    This script can bootstrap the HOOPLE libraries from a state where none   #
+#  of the required binaries are built yet.  It will build the tools that the  #
+#  CLAM system and HOOPLE need to get a build done.  Then the script builds   #
+#  the whole source tree as a test of the code's overall health.              #
+##############
+# Copyright (c) 2004-$now By Author.  This program is free software; you can  #
+# redistribute it and/or modify it under the terms of the GNU General Public  #
+# License as published by the Free Software Foundation; either version 2 of   #
+# the License or (at your option) any later version.  This is online at:      #
+#     http://www.fsf.org/copyleft/gpl.html                                    #
+# Please send any updates to: fred@gruntose.com                               #
+##############
+
+# prerequisites for this script:
+#
+# (1) the script should be run with a full path, so that it can decide where
+#     it lives with minimal fuss.
+# (2) on windows, the unix tools bin directory should already be in the path
+#     so that tools like dirname are already available.  use msys or cygwin
+#     at your discretion and your own risk.
+
+# 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")" && /bin/pwd )"
+#echo build scripts dir initial value: $BUILD_SCRIPTS_DIR
+BUILD_SCRIPTS_DIR="$(echo $BUILD_SCRIPTS_DIR | tr '\\\\' '/' )"
+#echo build scripts dir after chewing: $BUILD_SCRIPTS_DIR
+
+# load in feisty meow basic scripts, if not already loaded.
+if [ -z "$FEISTY_MEOW_SCRIPTS_LOADED" ]; then
+  bash "$BUILD_SCRIPTS_DIR/../core/reconfigure_feisty_meow.sh"
+  source "$BUILD_SCRIPTS_DIR/../core/launch_feisty_meow.sh"
+fi
+
+source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
+
+# translate to dos format if there's a cygdrive in there; otherwise microsoft's tools
+# will hose up completely due to unknown paths.
+export FEISTY_MEOW_APEX="$(unix_to_dos_path $FEISTY_MEOW_APEX)"
+
+# load in build variables based on our deduced paths.
+source "$BUILD_SCRIPTS_DIR/build_variables.sh" "$BUILD_SCRIPTS_DIR/build_variables.sh"
+
+##############
+
+# creates the directory for our binaries and gives it a reasonable paths configuration.
+function prepare_binaries_dir()
+{
+  # we'll store binaries here from the bootstrap process.
+  if [ ! -d "$CLAM_BINARY_DIR" ]; then
+    echo "creating binary dir now in $CLAM_BINARY_DIR"
+    mkdir -p "$CLAM_BINARY_DIR"
+  fi
+  if [ ! -f "$CLAM_BINARY_DIR/paths.ini" ]; then
+    echo "copied paths.ini to binary dir."
+    cp "$PRODUCTION_DIR/paths.ini" "$CLAM_BINARY_DIR"
+  fi
+}
+
+##############
+
+# turn off sounds to avoid running the sound player that's not been built yet.
+unset CLAM_ERROR_SOUND
+unset CLAM_FINISH_SOUND
+
+##############
+
+echo "Build bootstrap process has started."
+
+# preconditions for the build process...
+
+# set up our output directories etc.
+prepare_binaries_dir
+
+# set a flag for this process so we can omit certain compilations as necessary.
+export BOOT_STRAPPING=true
+
+# enable this macro to get a much noisier build.
+#export BE_NOISY=NOISY=t
+
+##############
+
+# these default flags turn off unnecessary support when we're rebuilding the
+# minimal toolset needed for a successful build of hoople.
+declare -a BUILD_DEFAULTS=( "BOOT_STRAPPING=t" "OPTIMIZE=t" "REBUILD=t" "DEBUG=" )
+  # bootstrapping is always turned on for this particular script.
+  # we also always optimize these builds and turn off the debug flag.
+  # rebuild ensures that the new apps are made fresh: "REBUILD=t"
+  #   it can be turned off when the build bootstrapper is being tested.
+  # noisy can be added to spew lots of text: "NOISY=t"
+  #   this can help with compilation issues by showing all the flags.
+
+function make_code {
+  make $* $BE_NOISY ${BUILD_DEFAULTS[@]}
+  if [ $? != 0 ]; then
+    echo "Failed to make on: $*"
+    exit 2323
+  fi
+}
+
+# removes pcdos eol from any scripts.  that assumes that the bootstrap script
+# itself isn't polluted with them.
+function strip_cr {
+  ctrl_m=$'\015'
+  for i in $*; do
+    tempgrep="$(mktemp "$TEMPORARIES_DIR/tempgrep.XXXXXX")"
+    grep -l "$ctrl_m" "$i" >$tempgrep
+    if [ ! -z "$(cat $tempgrep)" ]; then
+      temp="$(mktemp "$TEMPORARIES_DIR/tempsed.XXXXXX")"
+      sed -e "s/$ctrl_m$//" <$i >$temp
+      mv -f $temp $i
+    fi
+    rm "$tempgrep"
+  done
+}
+
+# the promote function moves a file from the exe directory into the build's
+# bin directory.  it performs the copy step and makes the file executable.
+# the original name should just be the root of the filename without any
+# extension.
+# NOTE: this depends on the operating system having been chosen above!
+if [ "$OPERATING_SYSTEM" = "UNIX" ]; then
+  function promote {
+    prepare_binaries_dir
+
+    if [ ! -f "$INTERMEDIATE_EXE_DIR/$1" ]; then
+      echo "Failed to build the application $1--quitting now."
+      exit 1892
+    fi
+    cp "$INTERMEDIATE_EXE_DIR/$1" "$CLAM_BINARY_DIR/$1"
+    strip "$CLAM_BINARY_DIR/$1"
+    chmod 755 "$CLAM_BINARY_DIR/$1"
+  }
+elif [ "$OPERATING_SYSTEM" = "WIN32" ]; then
+  function promote {
+    prepare_binaries_dir
+
+    if [ ! -f "$INTERMEDIATE_EXE_DIR/$1.exe" ]; then
+      echo "Failed to build the application $1.exe--quitting now."
+      exit 1892
+    fi
+    cp "$INTERMEDIATE_EXE_DIR/$1.exe" "$CLAM_BINARY_DIR"
+    chmod 755 "$CLAM_BINARY_DIR/$1.exe"
+  }
+else
+  echo "The OPERATING_SYSTEM variable is unset or unknown.  Bailing out."
+  exit 1822
+fi
+
+##############
+
+# start the actual build process now...
+
+# load in the feisty meow building environment.
+source "$BUILD_SCRIPTS_DIR/build_variables.sh" "$BUILD_SCRIPTS_DIR/build_variables.sh"
+
+# clean out any current contents.
+bash "$BUILD_SCRIPTS_DIR/whack_build.sh" clean
+
+# make this again so no one gets cranky.
+mkdir -p "$LOGS_DIR"
+
+toolset_names=(makedep value_tagger version_stamper vsts_version_fixer write_build_config short_path sleep_ms zap_process playsound create_guid)
+
+if [ -z "$SAVE_BINARIES" ]; then
+  for i in ${toolset_names[*]}; do
+    whack_name="$CLAM_BINARY_DIR/$i$EXE_ENDING"
+#echo removing "$whack_name"
+    rm -f "$whack_name"
+  done
+fi
+
+# make the clam shell scripts executable.
+chmod 755 "$CLAM_DIR"/*.sh
+chmod 755 "$CLAM_DIR"/cpp/*.sh
+#chmod 755 "$CLAM_DIR"/csharp/*.sh
+
+# rebuild the dependency tool.  needed by everything, pretty much, but
+# since it's from the xfree project, it doesn't need any of our libraries.
+if [ ! -f "$CLAM_BINARY_DIR/makedep$EXE_ENDING" ]; then
+  pushd "$TOOL_SOURCES/dependency_tool" &>/dev/null
+  make_code pre_compilation NO_DEPS=t OMIT_VERSIONS=t
+  make_code NO_DEPS=t OMIT_VERSIONS=t
+  if [ ! -f "$INTERMEDIATE_EXE_DIR/makedep$EXE_ENDING" ]; then
+    echo ""
+    echo ""
+    echo "The build of the makedep tool has failed.  Unknown causes...  Argh."
+    echo ""
+    exit 1820
+  fi
+  # make the tool available for the rest of the build.
+  promote makedep
+  popd &>/dev/null
+fi
+
+# rebuild the version tools and other support apps.
+if [ ! -f "$CLAM_BINARY_DIR/value_tagger$EXE_ENDING" \
+    -o ! -f "$CLAM_BINARY_DIR/version_stamper$EXE_ENDING" \
+    -o ! -f "$CLAM_BINARY_DIR/vsts_version_fixer$EXE_ENDING" \
+    -o ! -f "$CLAM_BINARY_DIR/write_build_config$EXE_ENDING" ]; then
+  pushd "$TOOL_SOURCES/clam_tools" &>/dev/null
+  make_code pre_compilation OMIT_VERSIONS=t
+  make_code OMIT_VERSIONS=t
+
+#hmmm: really this should check all the expected apps.
+#      nice to just have an array of the things built by this guy.
+  if [ ! -f "$INTERMEDIATE_EXE_DIR/version_stamper$EXE_ENDING" ]; then
+    echo ""
+    echo ""
+    echo "The build of the version_stamper tool has failed.  Unknown causes...  Argh."
+    echo ""
+    exit 1821
+  fi
+
+  promote value_tagger # tool scrambles through headers to standardize outcomes.
+  promote version_stamper  # used for version stamping.
+  promote vsts_version_fixer  # used for version stamping.
+  promote write_build_config  # creates a header of build-specific config info.
+
+  popd &>/dev/null
+fi
+
+# build a few other utilities.
+if [ ! -f "$CLAM_BINARY_DIR/short_path$EXE_ENDING" \
+    -o ! -f "$CLAM_BINARY_DIR/sleep_ms$EXE_ENDING" \
+    -o ! -f "$CLAM_BINARY_DIR/create_guid$EXE_ENDING" \
+    -o ! -f "$CLAM_BINARY_DIR/zap_process$EXE_ENDING" \
+    -o ! -f "$CLAM_BINARY_DIR/playsound$EXE_ENDING" ]; then
+  pushd "$TOOL_SOURCES/simple_utilities" &>/dev/null
+  make_code pre_compilation OMIT_VERSIONS=t
+  make_code OMIT_VERSIONS=t
+
+  promote create_guid  # globally unique ID creator.
+  promote playsound  # sound playback tool.
+  promote short_path  # provides short path names for exes on windows.
+  promote sleep_ms  # sleep tool is used in some scripts.
+  promote zap_process  # kills a process in the task list.
+
+  popd &>/dev/null
+fi
+
+echo "The build binaries have been re-created (or were already present)."
+
+# we won't do the full build if they told us to just do the bootstrap.
+if [ -z "$JUST_BOOTSTRAP_APPS" ]; then
+  echo Cleaning up the temporary files that were built.
+  bash "$BUILD_SCRIPTS_DIR/whack_build.sh" clean
+
+  # recreate our useful junk directories...
+  mkdir -p "$GENERATED_DIR"
+  mkdir -p "$TEMPORARIES_DIR"
+  mkdir -p "$LOGS_DIR"
+
+  echo Now starting a normal build of the repository source code.
+  pushd "$FEISTY_MEOW_APEX" &>/dev/null
+  unset BUILD_DEFAULTS
+  declare -a BUILD_DEFAULTS=( "BOOT_STRAPPING=" "OPTIMIZE=t" "DEBUG=t" "REBUILD=t" )
+  make_code
+
+  popd &>/dev/null
+fi
+
index 375f113537255bd89c30067ff408eeba5f2e46c9..06e9f95f30db2ed2c03782cec30e448692b8fc58 100644 (file)
@@ -44,7 +44,7 @@ fi
 ##############
 
 # we now regenerate the scripts after getme, to ensure it's done automatically.
-bash "$FEISTY_MEOW_SCRIPTS/core/bootstrap_shells.sh"
+bash "$FEISTY_MEOW_SCRIPTS/core/reconfigure_feisty_meow.sh"
 perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl"
 echo
 nechung