updated a bit more for windows. getting farther, but now hosing up at
authorChris Koeritz <fred@gruntose.com>
Fri, 6 Apr 2012 16:22:50 +0000 (12:22 -0400)
committerChris Koeritz <fred@gruntose.com>
Fri, 6 Apr 2012 16:22:50 +0000 (12:22 -0400)
our tool binaries, who do not understand the cygwin path format.

nucleus/makefile
scripts/clam/cpp/ms_manifest.sh
scripts/clam/cpp/variables.def
scripts/core/functions.sh
scripts/generator/vis_stu_vars.sh
scripts/generator/wrapdoze.sh [new file with mode: 0644]

index 5e5c392a300605a0c0dfe6807d64088116799044..8fe1d4396d5bd008c1182d3063fc281288bb08b7 100644 (file)
@@ -41,13 +41,12 @@ if [ $$? -ne 0 ]; then \
   echo build failure while copying paths initialization file.; \
   exit 1; \
 fi; \
-echo cmd is: $(CLAM_BIN)/value_tagger$(EXE_END) $(PRODUCTION_DIR)/codescan.ini; \
-$(CLAM_BIN)/value_tagger$(EXE_END) $(PRODUCTION_DIR)/codescan.ini; \
+bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BIN)/value_tagger$(EXE_END) $(PRODUCTION_DIR)/codescan.ini; \
 if [ $$? -ne 0 ]; then \
   echo build failure during value tagging.; \
   exit 1; \
 fi; \
-$(CLAM_BIN)/write_build_config$(EXE_END); \
+bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BIN)/write_build_config$(EXE_END); \
 if [ $$? -ne 0 ]; then \
   echo build failure while writing config.; \
   exit 1; \
index 7ee8844cd1aba01d6ab41e86ac98c1486d06ea79..a752837cc893309fbb4aa382ce4bfadcb6ec4ab0 100755 (executable)
@@ -8,10 +8,10 @@ if [ -z "$WIN32_MANIFEST_FILE" ]; then
 fi
 error_val=0
 if [ -f "$basename.manifest" -a -f "$basename" ]; then 
-  mt -manifest $basename.manifest $WIN32_MANIFEST_FILE -outputresource:$basename\;$where >/dev/null 
+  bash $BUILD_SCRIPTS_DIR/wrapdoze.sh mt -manifest $basename.manifest $WIN32_MANIFEST_FILE -outputresource:$basename\;$where >/dev/null 
   error_val=$?
 elif [ -f "$basename" ]; then 
-  mt -manifest $WIN32_MANIFEST_FILE -outputresource:$basename\;$where >/dev/null
+  bash $BUILD_SCRIPTS_DIR/wrapdoze.sh mt -manifest $WIN32_MANIFEST_FILE -outputresource:$basename\;$where >/dev/null
   error_val=$?
 else
   echo skipping manifest generation for $basename.
index 4a36911b338c49260a8cf8fa757de522c4ea4595..41030be783826ac7c7bd7d62ac8d76439fd27334 100644 (file)
@@ -672,8 +672,8 @@ ifeq "$(COMPILER)" "VISUAL_CPP"
   export PDB_DIR = $(TARGETS_DIR)
 
   # set these way up here so we can override them later.
-  CC = $(COMPILER_ROOT_DIR)/bin/cl
-  LINK_TOOL = $(COMPILER_ROOT_DIR)/bin/link
+  CC = bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/cl
+  LINK_TOOL = bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(COMPILER_ROOT_DIR)/bin/link
 
   # This is needed to protect against the use of 64-bit time_t structure
   # on windows.  We are casting to time_t from a 32-bit structure.
index 20bb047567d2e0fd831c5eab79cdce9b2a57c640..aa8ac20407988383c23749a79d268223628c64f4 100644 (file)
@@ -156,10 +156,10 @@ if [ -z "$skip_all" ]; then
     sudo /etc/init.d/alsasound restart
   }
   
-  # switches from a /X/path form to an X:/ form.
+  # switches from a /X/path form to an X:/ form.  this also processes cygwin paths.
   function msys_to_dos_path() {
     # we always remove dos slashes in favor of forward slashes.
-    echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/'
+    echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\/cygdrive//' | sed -e 's/\/\([a-zA-Z]\)\/\(.*\)/\1:\/\2/'
   }
   
   # switches from an X:/ form to an /X/path form.
index a4de1dca869693e8c58d16e2b5fd0bc4afdf5ab6..f2f1006e556bdb43f614b8a9329d87e80ff7062e 100644 (file)
@@ -62,10 +62,25 @@ export LIB="$VCINSTALLDIR/ATLMFC/LIB:$VCINSTALLDIR/LIB:$PLATFORM_DIR/lib"
 #:$FrameworkSDKDir/lib"
 
 # convert framework dir back or things yell like hell.
-export FrameworkDir="$(echo $FrameworkDir | sed -e 's/^\/\(.\)[\\\/]\(.*\)$/\1:\\\2/' | tr "/" "\\" 2>/dev/null )"
+export FrameworkDir=$(msys_to_dos_path $FrameworkDir)
   # the redirection of stderr to null is to get around an obnoxious cygwin
   # warning that seems to be erroneously bitching about backslashes.
 
+# mark this as executable because we will need it.
+#chmod 755 $FEISTY_MEOW_SCRIPTS/generator/wrapdoze.sh
+
+# convert all other relevant paths back to dos form, or visual studio barfs.
+#export BUILD_SCRIPTS_DIR=$(msys_to_dos_path $BUILD_SCRIPTS_DIR)
+#export BUILDING_HIERARCHY=$(msys_to_dos_path $BUILDING_HIERARCHY)
+#export BUILDER_DIR=$(msys_to_dos_path $BUILDER_DIR)
+#export BUILD_TOP=$(msys_to_dos_path $BUILD_TOP)
+#export PRODUCTION_DIR=$(msys_to_dos_path $PRODUCTION_DIR)
+#export LOGS_DIR=$(msys_to_dos_path $LOGS_DIR)
+#export TOOL_SOURCES=$(msys_to_dos_path $TOOL_SOURCES)
+#export BINARY_DIR=$(msys_to_dos_path $BINARY_DIR)
+#export TARGETS_DIR=$(msys_to_dos_path $TARGETS_DIR)
+#export INTERMEDIATE_EXE_DIR=$(msys_to_dos_path $INTERMEDIATE_EXE_DIR)
+#export WASTE_DIR=$(msys_to_dos_path $WASTE_DIR)
 
 ##############
 
diff --git a/scripts/generator/wrapdoze.sh b/scripts/generator/wrapdoze.sh
new file mode 100644 (file)
index 0000000..99d610c
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
+
+declare -a commands=()
+
+for i in "$@"; do
+  # we only mess with the command line on windows.
+  if [ "$OS" == "Windows_NT" ]; then
+    commands+=($(msys_to_dos_path $i))
+  else
+    commands+=("$i")
+  fi
+done
+
+#  echo commands are now:
+#  for i in "${commands[@]}"; do
+#    echo $i
+#  done
+
+# now actually run the possibly chewed command.
+"${commands[@]}"
+
+