summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/config.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-05-13 14:44:49 +1000
committerChris Johns <chrisj@rtems.org>2013-05-13 14:44:49 +1000
commit5237f1ccb77342d17eac2b97b274726722d2e914 (patch)
treefca51d8d162d27af2f35915e4ae57f34d1b0eae2 /source-builder/sb/config.py
parentAdd an RTEMS config wrapper around Makefile.inc. (diff)
downloadrtems-source-builder-5237f1ccb77342d17eac2b97b274726722d2e914.tar.bz2
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.
Diffstat (limited to 'source-builder/sb/config.py')
-rw-r--r--source-builder/sb/config.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/source-builder/sb/config.py b/source-builder/sb/config.py
index 75fa39f..9838a10 100644
--- a/source-builder/sb/config.py
+++ b/source-builder/sb/config.py
@@ -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: