Browse code

reedit failed patch in 798629afb4 (* fix for mingw, when mulle-bootstrap is running uninstalled)

Nat! authored on 06-09-2017 18:31:37
Showing 1 changed files
... ...
@@ -34,17 +34,15 @@ MULLE_BOOTSTRAP_MINGW_SH="included"
34 34
 
35 35
 find_msvc_executable()
36 36
 {
37
-   local exe
38
-   local name
39
-
40
-   exe="${1:-cl.exe}"
41
-   name="${2:-compiler}"
37
+   local exe="${1:-cl.exe}"
38
+   local name="${2:-compiler}"
39
+   local searchpath="${3:-$PATH}"
42 40
 
43 41
    local path
44 42
    local compiler
45 43
 
46 44
    IFS=":"
47
-   for path in $PATH
45
+   for path in ${searchpath}
48 46
    do
49 47
       IFS="${DEFAULT_IFS}"
50 48
 
... ...
@@ -113,8 +111,10 @@ setup_mingw_buildenvironment()
113 111
    fi
114 112
 
115 113
    local preprocessor
116
-
117
-   preprocessor="`find_msvc_executable "mulle-mingw-cpp.sh" "preprocessor"`"
114
+   local searchpath
115
+ 
116
+   searchpath="`dirname -- "${MULLE_EXECUTABLE_PATH}"`:$PATH"
117
+   preprocessor="`find_msvc_executable "mulle-mingw-cpp.sh" "preprocessor" "${searchpath}"`"
118 118
    if [ ! -z "${preprocessor}" ]
119 119
    then
120 120
       CPP="${preprocessor}"