Add a WAF workaround for the 'Input line is too long.' error in win32/mingw.
1.1 --- a/wscript Tue Jun 17 13:37:04 2008 -0700
1.2 +++ b/wscript Wed Jun 18 15:21:08 2008 +0100
1.3 @@ -244,6 +244,22 @@
1.4 obj.source = "scratch/%s" % filename
1.5 obj.target = "scratch/%s" % name
1.6
1.7 +
1.8 +##
1.9 +## This replacement spawn function increases the maximum command line length to 32k
1.10 +##
1.11 +def _exec_command_interact_win32(s):
1.12 + if Params.g_verbose:
1.13 + print s
1.14 + startupinfo = subprocess.STARTUPINFO()
1.15 + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
1.16 + proc = subprocess.Popen(s, shell=False, startupinfo=startupinfo)
1.17 + stat = proc.wait()
1.18 + if stat & 0xff:
1.19 + return stat | 0x80
1.20 + return stat >> 8
1.21 +
1.22 +
1.23 def build(bld):
1.24 if Params.g_options.no_task_lines:
1.25 import Runner
1.26 @@ -251,6 +267,10 @@
1.27 pass
1.28 Runner.printout = null_printout
1.29
1.30 + if sys.platform == 'win32':
1.31 + import Runner
1.32 + Runner.exec_command = _exec_command_interact_win32
1.33 +
1.34 Params.g_cwd_launch = Params.g_build.m_curdirnode.abspath()
1.35 bld.create_ns3_program = types.MethodType(create_ns3_program, bld)
1.36 variant_name = bld.env_of_name('default')['NS3_ACTIVE_VARIANT']