--- boost_1_53_0/tools/build/v2/tools/mpi.jam 2012-04-27 01:32:41.000000000 +0400 +++ boost_1_53_0_patched/tools/build/v2/tools/mpi.jam 2013-08-04 03:04:03.047765000 +0400 @@ -146,8 +146,11 @@ # Every kind of parameter not mentioned here will be placed in both # cxxflags and linkflags, because we don't know where they should go. local feature_kinds-D = "define" ; + local feature_kinds/D = "define" ; local feature_kinds-I = "include" ; + local feature_kinds/I = "include" ; local feature_kinds-L = "library-path" ; + local feature_kinds/LIBPATH: = "library-path" ; local feature_kinds-l = "find-shared-library" ; while $(cmdline) { @@ -155,7 +158,7 @@ # Check for one of the feature prefixes we know about. If we # find one (and the associated value is nonempty), convert it # into a feature. - local match = [ MATCH "^(-.)(.*)" : $(cmdline) ] ; + local match = [ MATCH "^(-.|/LIBPATH:|/.)(.*)" : $(cmdline) ] ; local matched ; if $(match) && $(match[2]) { local prefix = $(match[1]) ; @@ -231,7 +234,14 @@ # not. Returns true for an exit code of zero, false otherwise. local rule safe-shell-command ( cmdline ) { - local result = [ SHELL "$(cmdline) > /dev/null 2>/dev/null; if [ "$?" -eq "0" ]; then echo SSCOK; fi" ] ; + local result ; + + if [ os.name ] = NT { + result = [ SHELL "$(cmdline) >NUL 2>NUL && echo SSCOK" ] ; + } else { + result = [ SHELL "$(cmdline) > /dev/null 2>/dev/null; if [ "$?" -eq "0" ]; then echo SSCOK; fi" ] ; + } + return [ MATCH ".*(SSCOK).*" : $(result) ] ; }