diff options
| author | Graydon Hoare <[email protected]> | 2011-03-23 13:26:17 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-23 13:28:41 -0700 |
| commit | 9d925436f32065f4a1940a9728e4b6f9c8e22c08 (patch) | |
| tree | 7776d513cdb716577c60eea055f4db58e780d423 | |
| parent | Add layer of indirection to differentiate LD_LIBRARY_PATH vs. DYLD_LIBRARY_PATH. (diff) | |
| download | rust-9d925436f32065f4a1940a9728e4b6f9c8e22c08.tar.xz rust-9d925436f32065f4a1940a9728e4b6f9c8e22c08.zip | |
Someday I'll have a talk with the person who thought backslashes were wise in win32.
| -rwxr-xr-x | configure | 28 |
1 files changed, 20 insertions, 8 deletions
@@ -1,8 +1,5 @@ #!/bin/sh -CFG_SRC_DIR=${0%${0##*/}} -CFG_BUILD_DIR=$PWD - msg() { echo "configure: $1" } @@ -78,6 +75,26 @@ need_cmd grep need_cmd xargs need_cmd cp need_cmd find +need_cmd uname +need_cmd date + +msg "inspecting environment" + +CFG_OSTYPE=$(uname -s) +CFG_CPUTYPE=$(uname -m) + +case $CFG_OSTYPE in + + MINGW*) + CFG_SRC_DIR=CFG_SRC_DIR=${0%${0##*\\}} + CFG_BUILD_DIR=$PWD + ;; + + *) + CFG_SRC_DIR=CFG_SRC_DIR=${0%${0##*/}} + CFG_BUILD_DIR=$PWD + ;; +esac msg "recreating config.mk" echo '' >config.mk @@ -95,11 +112,6 @@ do make_dir $i done -msg "inspecting environment" - -CFG_OSTYPE=$(uname -s) -CFG_CPUTYPE=$(uname -m) - putvar CFG_SRC_DIR putvar CFG_BUILD_DIR putvar CFG_OSTYPE |