- Have the closing message say "...terminated because of errors" if
there were any.
+ From Anthony Roach:
+
+ - On Win32 systems, only use "rm" to delete files if Cygwin is being
+ used. ("rm" doesn't understand Win32-format path names.)
+
From Christoph Wiedemann:
- Fix test/SWIG.py to find the Python include directory in all cases.
if (reduce(lambda x, y: x + len(y), cmd, 0) + len(cmd)) <= maxline:
return self.cmd
else:
- # In Cygwin, we want to use rm to delete the temporary file,
- # because del does not exist in the sh shell.
- rm = env.Detect('rm') or 'del'
-
# We do a normpath because mktemp() has what appears to be
# a bug in Win32 that will use a forward slash as a path
# delimiter. Win32's link mistakes that for a command line
tmp = os.path.normpath(tempfile.mktemp('.lnk'))
native_tmp = SCons.Util.get_native_path(tmp)
- # The sh shell will try to escape the backslashes in the
- # path, so unescape them.
if env['SHELL'] and env['SHELL'] == 'sh':
+ # The sh shell will try to escape the backslashes in the
+ # path, so unescape them.
native_tmp = string.replace(native_tmp, '\\', r'\\\\')
+ # In Cygwin, we want to use rm to delete the temporary
+ # file, because del does not exist in the sh shell.
+ rm = env.Detect('rm') or 'del'
+ else:
+ # Don't use 'rm' if the shell is not sh, because rm won't
+ # work with the win32 shells (cmd.exe or command.com) or
+ # win32 path names.
+ rm = 'del'
args = map(SCons.Util.quote_spaces, cmd[1:])
open(tmp, 'w').write(string.join(args, " ") + "\n")
env.StaticLibrary(target = 'foo1-static', source = 'f1.c')
else:
env.StaticLibrary(target = 'foo1', source = 'f1.c')
-SharedLibrary(target = 'foo2', source = Split('f2a.c f2b.c f2c.c'))
+SharedLibrary(target = 'foo2',
+ source = Split('f2a.c f2b.c f2c.c'),
+ WIN32_INSERT_DEF = 1)
env.SharedLibrary(target = 'foo3', source = ['f3a.c', 'f3b.c', 'f3c.c'])
env2.Program(target = 'prog', source = 'prog.c')
""")