Skip to content

Commit 9d92543

Browse files
committed
Someday I'll have a talk with the person who thought backslashes were wise in win32.
1 parent a978d53 commit 9d92543

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

configure

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/bin/sh
22

3-
CFG_SRC_DIR=${0%${0##*/}}
4-
CFG_BUILD_DIR=$PWD
5-
63
msg() {
74
echo "configure: $1"
85
}
@@ -78,6 +75,26 @@ need_cmd grep
7875
need_cmd xargs
7976
need_cmd cp
8077
need_cmd find
78+
need_cmd uname
79+
need_cmd date
80+
81+
msg "inspecting environment"
82+
83+
CFG_OSTYPE=$(uname -s)
84+
CFG_CPUTYPE=$(uname -m)
85+
86+
case $CFG_OSTYPE in
87+
88+
MINGW*)
89+
CFG_SRC_DIR=CFG_SRC_DIR=${0%${0##*\\}}
90+
CFG_BUILD_DIR=$PWD
91+
;;
92+
93+
*)
94+
CFG_SRC_DIR=CFG_SRC_DIR=${0%${0##*/}}
95+
CFG_BUILD_DIR=$PWD
96+
;;
97+
esac
8198

8299
msg "recreating config.mk"
83100
echo '' >config.mk
@@ -95,11 +112,6 @@ do
95112
make_dir $i
96113
done
97114

98-
msg "inspecting environment"
99-
100-
CFG_OSTYPE=$(uname -s)
101-
CFG_CPUTYPE=$(uname -m)
102-
103115
putvar CFG_SRC_DIR
104116
putvar CFG_BUILD_DIR
105117
putvar CFG_OSTYPE

0 commit comments

Comments
 (0)