Changeset 4872 for script

Show
Ignore:
Timestamp:
06/20/05 16:14:05 (4 years ago)
Author:
autrijus
svk:copy_cache_prev:
6641
Message:

* adjust pugscc to play with the new PIR backend

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • script/pugscc

    r4851 r4872  
    1111 
    1212if (!@ARGV || grep /^--help$/, @ARGV) { 
    13     die "Usage: $0 [--run] [--pugs|--haskell|--parrot] [ source[.p6] | -e oneliner ]\n"; 
     13    die "Usage: $0 [--run] [--pugs|--haskell|--pir] [ source[.p6] | -e oneliner ]\n"; 
    1414} 
    1515 
     
    3333    shift @ARGV; 
    3434} 
    35 elsif ($ARGV[0] =~ /^(?:-P|--parrot)$/) { 
    36     $backend = 'Parrot'; 
     35elsif ($ARGV[0] =~ /^(?:-P|--pir|--parrot)$/) { 
     36    $backend = 'PIR'; 
    3737    shift @ARGV; 
    3838} 
     
    5656} 
    5757 
    58 if ($backend eq 'Parrot') { 
    59     $out .= ".imc"; 
     58if ($backend eq 'PIR') { 
     59    $out .= '.pir'; 
    6060} 
    6161else { 
     
    7979} 
    8080 
    81 if ($backend eq 'Parrot') { 
     81if ($backend eq 'PIR') { 
    8282    writeFile($out, $program); 
    8383    chmod 0755, $out; 
     
    124124 
    125125if ($run) { 
    126     if ($backend eq 'Parrot' and !-x '/usr/bin/env') { 
    127         system("parrot" => $out); 
     126    if ($backend eq 'PIR' and !-x '/usr/bin/env') { 
     127        system(parrot => $out); 
    128128    } 
    129129    else { 
     
    154154=head1 SYNOPSIS 
    155155 
    156     % pugscc --runpugs -e "'Hello, Parrot'.say" 
    157     % pugscc --runparrot -e "'Hello, Parrot'.say" 
     156    % pugscc --runpir -e "'Hello, Parrot'.say" 
     157    % pugscc --runpugs -e "'Hello, Pugs'.say" 
    158158    % pugscc --runhaskell -e "'Hello, Haskell'.say" 
    159159 
     
    191191=item Pugs - requires Pugs ;-) 
    192192 
    193 =item Parrot - requires Parrot 
     193=item PIR - requires Parrot 
    194194 
    195195L<http://search.cpan.org/~ltoetsch/parrot/>