diff options
author | Steven Knight <knight@baldmt.com> | 2005-03-20 00:23:12 +0000 |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-03-20 00:23:12 +0000 |
commit | 82a50acec0e8ac5d2c02d01bfad31df542563636 (patch) | |
tree | 456136ba40d95e37de418fef77c1a2b088a129c6 /src/engine/SCons/Debug.py | |
parent | 6a74f6bcc688c7fec85fadc732c98e786d99bbda (diff) | |
download | scons-82a50acec0e8ac5d2c02d01bfad31df542563636.tar.gz |
Fix re-scanning of built files for implicit dependencies when the -j option is used.
Diffstat (limited to 'src/engine/SCons/Debug.py')
-rw-r--r-- | src/engine/SCons/Debug.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/engine/SCons/Debug.py b/src/engine/SCons/Debug.py index bf7ed438..0dbb116d 100644 --- a/src/engine/SCons/Debug.py +++ b/src/engine/SCons/Debug.py @@ -152,3 +152,26 @@ def func_shorten(func_tuple): f = f[i:] break return (f,)+func_tuple[1:] + + + +TraceFP = {} +TraceDefault = '/dev/tty' + +def Trace(msg, file=None, mode='a'): + """Write a trace a message to a file. Whenever a file is specified, + it becomes the default for the next call to Trace().""" + global TraceDefault + if file is None: + file = TraceDefault + else: + TraceDefault = file + try: + fp = TraceFP[file] + except KeyError: + try: + fp = TraceFP[file] = open(file, mode) + except TypeError: + # Assume we were passed an open file pointer. + fp = file + fp.write(msg) |