# New Ticket Created by  Greg Bacon 
# Please include the string:  [perl #39164]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=39164 >


The attached patch allows parrot to build on Cygwin when build_dir
contains spaces.

How well does this play on other platforms?

Greg
Index: config/init/hints/cygwin.pm
===================================================================
--- config/init/hints/cygwin.pm (revision 12726)
+++ config/init/hints/cygwin.pm (working copy)
@@ -14,6 +14,9 @@
     my $libs = $conf->data->get('libs');
     $libs =~ s/-lutil\b//g;
 
+    my $build_dir = $conf->data->get('build_dir');
+    $build_dir =~ s/ /\\ /g;
+
     # A note about building shared libraries:  Perl5 uses the 'ld2' tool, which
     # is installed as part of the perl5 installation.  So far, it appears
     # parrot can get by with simply using gcc -shared, so we override the
@@ -21,6 +24,7 @@
     # If this later causes problems, it might be worth revisiting.
     # A. Dougherty 9/9/2002
     $conf->data->set(
+        build_dir           => $build_dir,
         ld                  => 'gcc',
         ld_share_flags      => '-shared',
         ld_load_flags       => '-shared',
Index: config/gen/makefiles/dynpmc_pl.in
===================================================================
--- config/gen/makefiles/dynpmc_pl.in   (revision 12726)
+++ config/gen/makefiles/dynpmc_pl.in   (working copy)
@@ -31,7 +31,7 @@
 our $CFLAGS = [EMAIL PROTECTED]@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ 
@cg_flag@ @[EMAIL PROTECTED];
 
 our $LIBPARROT = qq[];
-#CONDITIONED_LINE(parrot_is_shared):$LIBPARROT = [EMAIL PROTECTED]@];
+#CONDITIONED_LINE(parrot_is_shared):$LIBPARROT = [EMAIL PROTECTED]@];
 
 # Here comes some stuff for Win32.
 our $PATHQUOTE = '';
Index: config/gen/makefiles/dynpmc.in
===================================================================
--- config/gen/makefiles/dynpmc.in      (revision 12726)
+++ config/gen/makefiles/dynpmc.in      (working copy)
@@ -49,13 +49,13 @@
   pyproxyclass \
   pyiter
 
-BUILD = $(PERL) "@build_dir@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]"
+BUILD = $(PERL) @build_dir@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]
 
 all :
        @$(BUILD) generate $(PMCS)
        @$(BUILD) compile $(PMCS)
        @$(BUILD) linklibs $(PMCS)
-       @$(BUILD) copy "--destination=$(RUNTIME_DIR)" $(PMCS)
+       @$(BUILD) copy --destination=$(RUNTIME_DIR) $(PMCS)
 
 test : all
        cd ../.. ; perl -Ilib t/harness t/dynpmc/*.t
Index: config/gen/makefiles/dynoplibs_pl.in
===================================================================
--- config/gen/makefiles/dynoplibs_pl.in        (revision 12726)
+++ config/gen/makefiles/dynoplibs_pl.in        (working copy)
@@ -31,7 +31,7 @@
 our $CFLAGS = [EMAIL PROTECTED]@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ 
@cg_flag@ @[EMAIL PROTECTED];
 
 our $LIBPARROT = qq[];
-#CONDITIONED_LINE(parrot_is_shared):$LIBPARROT = [EMAIL PROTECTED]@];
+#CONDITIONED_LINE(parrot_is_shared):$LIBPARROT = [EMAIL PROTECTED]@];
 
 # Here comes some stuff for Win32.
 our $PATHQUOTE = '';
Index: config/gen/makefiles/dynoplibs.in
===================================================================
--- config/gen/makefiles/dynoplibs.in   (revision 12726)
+++ config/gen/makefiles/dynoplibs.in   (working copy)
@@ -12,13 +12,13 @@
   myops \
   dan
 
-BUILD = $(PERL) "@build_dir@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]"
+BUILD = $(PERL) @build_dir@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL 
PROTECTED]
 
 all :
        @$(BUILD) generate $(OPLIBS)
        @$(BUILD) compile $(OPLIBS)
        @$(BUILD) linklibs $(OPLIBS)
-       @$(BUILD) copy "--destination=$(RUNTIME_DIR)" $(OPLIBS)
+       @$(BUILD) copy --destination=$(RUNTIME_DIR) $(OPLIBS)
 
 test : all
         cd [EMAIL PROTECTED]@.. ; perl -Ilib t/harness t/dynoplibs/*.t

Reply via email to