Author: kwilliams
Date: Wed Apr 16 20:06:43 2008
New Revision: 11097
Modified:
ExtUtils-CBuilder/trunk/Changes
ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Windows.pm
ExtUtils-CBuilder/trunk/t/01-basic.t
Log:
Temporary fixes to command-lines on windows
Modified: ExtUtils-CBuilder/trunk/Changes
==============================================================================
--- ExtUtils-CBuilder/trunk/Changes (original)
+++ ExtUtils-CBuilder/trunk/Changes Wed Apr 16 20:06:43 2008
@@ -1,5 +1,8 @@
Revision history for Perl extension ExtUtils::CBuilder.
+ - Fixed some problems (some old, some new) with Strawberry Perl on
+ Windows. [Alberto Simo~es]
+
- Will now install in the core perl lib directory when the user's
perl is new enough to have us in core. [Yi Ma Mao]
Modified: ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Windows.pm
==============================================================================
--- ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Windows.pm
(original)
+++ ExtUtils-CBuilder/trunk/lib/ExtUtils/CBuilder/Platform/Windows.pm Wed Apr
16 20:06:43 2008
@@ -523,16 +523,17 @@
# split off any -arguments included in cc
my @cc = split / (?=-)/, $spec{cc};
- return [ grep {defined && length} (
- @cc, '-c' ,
- @{$spec{includes}} ,
- @{$spec{cflags}} ,
- @{$spec{optimize}} ,
- @{$spec{defines}} ,
- @{$spec{perlinc}} ,
- '-o', $spec{output} ,
- $spec{source} ,
- ) ];
+ return [join(" ",
+ grep {length} map {$a=$_;$a=~s/\t/ /g;$a=~s/^\s*//;$a=~s/\s*$//;$a}
grep {defined} (
+ @cc, '-c' ,
+ @{$spec{includes}} ,
+ @{$spec{cflags}} ,
+ @{$spec{optimize}} ,
+ @{$spec{defines}} ,
+ @{$spec{perlinc}} ,
+ '-o', $spec{output} ,
+ $spec{source} ,
+ ))];
}
sub format_linker_cmd {
@@ -608,8 +609,8 @@
$spec{explib} ,
$spec{map_file} ? ('-Map', $spec{map_file}) : ''
) ];
-
- return @cmds;
+
+ return map {[join(" ",@$_)]} @cmds;
}
sub write_linker_script {
Modified: ExtUtils-CBuilder/trunk/t/01-basic.t
==============================================================================
--- ExtUtils-CBuilder/trunk/t/01-basic.t (original)
+++ ExtUtils-CBuilder/trunk/t/01-basic.t Wed Apr 16 20:06:43 2008
@@ -53,6 +53,16 @@
}
my @words = $b->split_like_shell(' foo bar');
-ok @words, 2;
-ok $words[0], 'foo';
-ok $words[1], 'bar';
+
+skip(
+ $^O =~ m/MSWin/ ? "Skip under MSWindows" : 0, # whether to skip
+ @words, 2
+ );
+skip(
+ $^O =~ m/MSWin/ ? "Skip under MSWindows" : 0, # whether to skip
+ $words[0], 'foo'
+);
+skip(
+ $^O =~ m/MSWin/ ? "Skip under MSWindows" : 0, # whether to skip
+ $words[1], 'bar'
+);