Fix support for Windows (MinGW) native builds using MSYS.

Fix paths that need to be coverted to host format.

The shell expansion needs to invoke a shell on Windows as cmd.exe
will not work.

Munch the paths into smaller sizes for Windows due to the limited
path size.
This commit is contained in:
Chris Johns
2013-05-13 14:44:49 +10:00
parent e2266055bc
commit 5237f1ccb7
7 changed files with 51 additions and 12 deletions

View File

@@ -353,7 +353,11 @@ class file:
if len(sl):
e = execute.capture_execution()
for s in sl:
exit_code, proc, output = e.shell(s[2:-1])
if options.host_windows:
cmd = '%s -c "%s"' % (self.macros.expand('%{__sh}'), s[2:-1])
else:
cmd = s[2:-1]
exit_code, proc, output = e.shell(cmd)
if exit_code == 0:
line = line.replace(s, output)
else: