We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a978d53 commit 9d92543Copy full SHA for 9d92543
configure
@@ -1,8 +1,5 @@
1
#!/bin/sh
2
3
-CFG_SRC_DIR=${0%${0##*/}}
4
-CFG_BUILD_DIR=$PWD
5
-
6
msg() {
7
echo "configure: $1"
8
}
@@ -78,6 +75,26 @@ need_cmd grep
78
75
need_cmd xargs
79
76
need_cmd cp
80
77
need_cmd find
+need_cmd uname
+need_cmd date
+
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
96
97
+esac
98
99
msg "recreating config.mk"
100
echo '' >config.mk
@@ -95,11 +112,6 @@ do
112
make_dir $i
113
done
114
-msg "inspecting environment"
-CFG_OSTYPE=$(uname -s)
101
-CFG_CPUTYPE=$(uname -m)
102
103
115
putvar CFG_SRC_DIR
104
116
putvar CFG_BUILD_DIR
105
117
putvar CFG_OSTYPE
0 commit comments