diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-03 06:52:50 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-03 06:52:50 +0000 |
commit | a07043ec8c6b8db003369856eadf14ccd8d179cc (patch) | |
tree | f3f2205d510858ba7cb3905664e99ab8be436751 /utils | |
parent | 651ad3b17ab67895472664d06caa48dedb1f20bf (diff) | |
download | perl-a07043ec8c6b8db003369856eadf14ccd8d179cc.tar.gz |
support -a switch to append bytecode to an existing file and make
perlcc use it (from Tom Hughes <tom@compton.nu>)
p4raw-id: //depot/perl@4631
Diffstat (limited to 'utils')
-rw-r--r-- | utils/perlcc.PL | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/perlcc.PL b/utils/perlcc.PL index a585580be0..a8c6ab4fc0 100644 --- a/utils/perlcc.PL +++ b/utils/perlcc.PL @@ -253,6 +253,7 @@ sub _createCode { my ( $backend, $generated_file, $file, $final_output ) = @_; my $return; + my $output_switch = "o"; local($") = " -I"; @@ -264,6 +265,8 @@ sub _createCode print GENFILE "#!$^X\n" if @_ == 3; print GENFILE "use ByteLoader $ByteLoader::VERSION;\n"; + + $output_switch ="a"; } close(GENFILE); @@ -278,7 +281,7 @@ sub _createCode chomp $stash; _print( "$^X -I@INC -MO=$backend,$stash $file\n", 36); - $return = _run("$^X -I@INC -MO=$backend,$stash,-o$generated_file $file", 9); + $return = _run("$^X -I@INC -MO=$backend,$stash,-$output_switch$generated_file $file", 9); $return; } else # compiling a shared object @@ -286,7 +289,7 @@ sub _createCode _print( "$^X -I@INC -MO=$backend,-m$final_output $file\n", 36); $return = - _run("$^X -I@INC -MO=$backend,-m$final_output,-o$generated_file $file ", 9); + _run("$^X -I@INC -MO=$backend,-m$final_output,-$output_switch$generated_file $file ", 9); $return; } } |