[wx] Build fix, do not build WebCore as a convenience library as this leads to
[WebKit.git] / WebKitTools / wx / build / waf_extensions.py
index fcf34df107534c4d1e007756e4bc42e869f4cbfb..f50f2641870f58f46b07a4dbc5712c3a2dae3f15 100644 (file)
@@ -34,10 +34,14 @@ def exec_command(s, **kw):
     filename = ''
     if sys.platform.startswith('win') and len(' '.join(s)) > 32000:
         import tempfile
-        file = tempfile.NamedTemporaryFile(delete=False)
-        filename = file.name
-        file.write(' '.join(s[1:]))
-        file.close()
+        (fd, filename) = tempfile.mkstemp()
+        t = []
+        for i in s:
+            if i.find(" ") != -1:
+                i = '"%s"' % i
+            t.append(i)
+        os.write(fd, ' '.join(t[1:]))
+        os.close(fd)
         
         s = [s[0], '@' + filename]