You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2013/05/20 20:49:00 UTC

[lucy-commits] [3/3] git commit: refs/heads/install-c-library - Fix quoting of MSVC compiler options for real

Fix quoting of MSVC compiler options for real


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/d5c3256b
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/d5c3256b
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/d5c3256b

Branch: refs/heads/install-c-library
Commit: d5c3256bf2281fb8b7e3cf2f4c1fa6000294424e
Parents: 6b7dc71
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon May 20 20:48:28 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon May 20 20:48:28 2013 +0200

----------------------------------------------------------------------
 .../compiler/perl/buildlib/Clownfish/CFC/Build.pm  |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/d5c3256b/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build.pm
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build.pm b/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build.pm
index ff8dc36..4ba1a6b 100644
--- a/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build.pm
+++ b/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build.pm
@@ -137,10 +137,11 @@ sub ACTION_code {
     $self->dispatch('ppport');
     $self->dispatch('parsers');
 
-    $self->extra_compiler_flags(
-        '-DCFCPERL',
-        $self->split_like_shell($self->charmony("EXTRA_CFLAGS")),
-    );
+    my @flags = $self->split_like_shell($self->charmony("EXTRA_CFLAGS"));
+    # The flag for the MSVC6 hack contains spaces. Make sure it stays quoted.
+    @flags = map { /\s/ ? qq{"$_"} : $_ } @flags;
+
+    $self->extra_compiler_flags( '-DCFCPERL', @flags );
 
     $self->SUPER::ACTION_code;
 }