diff options
Diffstat (limited to 'Source/WebCore/bindings/scripts/preprocessor.pm')
-rw-r--r-- | Source/WebCore/bindings/scripts/preprocessor.pm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/WebCore/bindings/scripts/preprocessor.pm b/Source/WebCore/bindings/scripts/preprocessor.pm index a34e8461b..5d9376d65 100644 --- a/Source/WebCore/bindings/scripts/preprocessor.pm +++ b/Source/WebCore/bindings/scripts/preprocessor.pm @@ -24,6 +24,7 @@ use warnings; use Config; use IPC::Open2; use IPC::Open3; +use Text::ParseWords; BEGIN { use Exporter (); @@ -59,6 +60,9 @@ sub applyPreprocessor } else { push(@args, qw(-E -P -x c++)); } + } else { + @args = shellwords($preprocessor); + $preprocessor = shift @args; } if ($Config::Config{"osname"} eq "darwin") { @@ -99,9 +103,12 @@ sub applyPreprocessor } }; } elsif ($Config::Config{"osname"} eq "MSWin32") { - $pid = open2(\*PP_OUT, \*PP_IN, $preprocessor, @args, @macros, $fileName); + # Suppress STDERR so that if we're using cl.exe, the output + # name isn't needlessly echoed. + use Symbol 'gensym'; my $err = gensym; + $pid = open3(\*PP_IN, \*PP_OUT, $err, $preprocessor, @args, @macros, $fileName); } else { - $pid = open2(\*PP_OUT, \*PP_IN, split(' ', $preprocessor), @args, @macros, $fileName); + $pid = open2(\*PP_OUT, \*PP_IN, $preprocessor, @args, @macros, $fileName); } close PP_IN; my @documentContent = <PP_OUT>; |