Add Canadian Cross support.

Add support to build MinGW tools using Cygwin. This is a Canadian cross
build.

Do not expand the directives when parsing a configuration file. Hold
in the package object the text as read from the configuration file. Still
parse the logic but leave the macros. This allows a configuration to be
varied when the build happens. The Canadian cross uses this to build a
build compiler used to build a Cxc runtime.

Add Cxc support to the build module. In the defaults add rm and rmfile
macros, add Cxc paths and pre-build script code.

In the setbuilder check for a Cxc build and if so and the package
allow Cxc build the build host version then the host target
version.

Add cygiwn support to the defaults processing and to the Windows module.
This commit is contained in:
Chris Johns
2013-04-01 15:19:56 +11:00
parent 0d9b101247
commit 4f26bdb2f0
30 changed files with 562 additions and 1200 deletions

View File

@@ -102,14 +102,20 @@ class execute:
def _readthread(fh, out, prefix = ''):
"""Read from a file handle and write to the output handler
until the file closes."""
count = 0
while True:
line = fh.readline()
count += 1
if len(line) == 0:
break
if out:
out(prefix + line)
else:
log.output(prefix + line)
if count > 10:
log.flush()
count = 0
def _timerthread(proc, timer):
"""Timer thread calls the timer handler if one
is present once a second. The user provides a handler