Subversion Repositories DevTools

Rev

Rev 6065 | Rev 6133 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6065 Rev 6073
Line 10241... Line 10241...
10241
# Description     : Escape/Quote a pathname for make
10241
# Description     : Escape/Quote a pathname for make
10242
#                       Allow files with a $ in the name
10242
#                       Allow files with a $ in the name
10243
#                       Allow files with a space in the name
10243
#                       Allow files with a space in the name
10244
#                       Allow files with a comma in the name
10244
#                       Allow files with a comma in the name
10245
#                       Allow for paths that have make-varible prefixes
10245
#                       Allow for paths that have make-varible prefixes
10246
#                           $(GBE_...)/
10246
#                           $(GBE_...) or ${GBE_...} or $(OBJDIR)
10247
#                           as these may be generated internally
10247
#                           as these may be generated internally
10248
#                       Allow for files with a colon in the name
10248
#                       Allow for files with a colon in the name
10249
#                           Mode dependent
10249
#                           Mode dependent
10250
#                               0 - No effect
10250
#                               0 - No effect
10251
#                               T - \\\:
10251
#                               T - \\\:
Line 10274... Line 10274...
10274
    #
10274
    #
10275
    $uarg =~ m~^((\$\(.*?\)/)*)(.*)~;
10275
    $uarg =~ m~^((\$\(.*?\)/)*)(.*)~;
10276
    my $prefix = defined $1 ? $1 : '';
10276
    my $prefix = defined $1 ? $1 : '';
10277
    my $arg    = defined $3 ? $3 : '';
10277
    my $arg    = defined $3 ? $3 : '';
10278
 
10278
 
10279
    $arg =~ s~\$(?!\(GBE_[A-Z]+\)|\(OBJDIR\))~\$\$~g;       # $, not followed by (GBE_ or (OBJDIR)- is not $(GBE_ AND nor $(OBJDIR)
10279
    $arg =~ s~\$(?!\(GBE_[A-Z]+\)|{GBE_[A-Z]+}|\(OBJDIR\))~\$\$~g;       # $, not followed by (GBE_ or ${GBE_ or (OBJDIR)- is not $(GBE_ AND not $(OBJDIR)
10280
    $arg =~ s~ ~\\ ~g;
10280
    $arg =~ s~ ~\\ ~g;
10281
    $arg =~ s~,~\$(comma)~g;
10281
    $arg =~ s~,~\$(comma)~g;
10282
    $arg =~ s~%~\\%~g;
10282
    $arg =~ s~%~\\%~g;
10283
    $arg =~ s~:~\\\\\\:~g if ($mode eq 'T' &&  $::ScmHost eq "Unix");
10283
    $arg =~ s~:~\\\\\\:~g if ($mode eq 'T' &&  $::ScmHost eq "Unix");
10284
    $arg =~ s~:~\\:~g     if ($mode eq 'S' &&  $::ScmHost eq "Unix");
10284
    $arg =~ s~:~\\:~g     if ($mode eq 'S' &&  $::ScmHost eq "Unix");