Ticket #278: tt278-mingw-doublequote.patch

File tt278-mingw-doublequote.patch, 1.1 KB (added by rurban, 6 years ago)
  • config/gen/makefiles/dynoplibs_pl.in

    This is a first hand fix against double-quoting libparrot on mingw.
    libparrot is already quoted in hints/mswin32.pm libparrot_ldflags 
    
    A better fix would detected spaces in build_dir and quote the space
    with \ on posix shells, and protect it with " on mswin32.
    
    destdir or any other targetdir spaces need to to be detected like 
    this, since their are entered by the user and as such properly 
    quoted by the user.
    
    old new  
    3535#IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@]; 
    3636 
    3737# Here comes some stuff for Win32. 
    38 our $PATHQUOTE = q[]; 
    39 if ($^O eq 'MSWin32') { 
    40     # Paths need quoting as they may contain spaces. 
    41     $PATHQUOTE = q["]; 
    42  
    43     unless ($CC =~ /gcc/i) { 
    44         $LIBPARROT = '@build_dir@/libparrot@a@'; 
    45     } 
    46 } 
     38our $PATHQUOTE = $^O eq 'MSWin32' ? '"' : ''; 
    4739 
    4840# OPS2C Config 
    4941our $OPS2C = "$PERL -I $PATHQUOTE" .