about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-03-23 16:30:26 -0700
committerGraydon Hoare <graydon@mozilla.com>2011-03-23 16:30:26 -0700
commit9b617dab3c6a563d7c31dabcd0fba5c6342c09c1 (patch)
tree4997b6d398b286205aad36341a85c18d48e0aaa6
parent0b63512f4cb0aca1579b110d9104eeed4918a6eb (diff)
More bandaids for win32.
-rwxr-xr-xconfigure18
1 files changed, 5 insertions, 13 deletions
diff --git a/configure b/configure
index 0f10acdf8d0..529ad8ad90b 100755
--- a/configure
+++ b/configure
@@ -77,24 +77,16 @@ need_cmd cp
 need_cmd find
 need_cmd uname
 need_cmd date
+need_cmd tr
 
 msg "inspecting environment"
 
 CFG_OSTYPE=$(uname -s)
 CFG_CPUTYPE=$(uname -m)
 
-case $CFG_OSTYPE in
-
-    MINGW*)
-        CFG_SRC_DIR=${0%${0##*\\}}
-        CFG_BUILD_DIR=$PWD
-        ;;
-
-    *)
-        CFG_SRC_DIR=${0%${0##*/}}
-        CFG_BUILD_DIR=$PWD
-        ;;
-esac
+CFG_SELF=$(echo $0 | tr '\' '/')
+CFG_SRC_DIR=${CFG_SELF%${CFG_SELF##*/}}
+CFG_BUILD_DIR=$(echo $PWD | tr '\' '/')
 
 msg "recreating config.mk"
 echo '' >config.mk
@@ -180,7 +172,7 @@ putvar CFG_LLVM_LDFLAGS
 putvar CFG_LLVM_LIBS
 
 # Munge any paths that appear in config.mk back to posix-y
-perl -i.bak -p -e 's@ ([a-zA-Z]):\\@ /\1/@go;' \
+perl -i.bak -p -e 's@ ([a-zA-Z]):[/\\]@ /\1/@go;' \
                -e 's@\\@/@go;' config.mk
 rm -f config.mk.bak