$arg ||= shift @options;
open(OUT, ">$arg") or return "$arg: $!\n";
binmode OUT;
+ } elsif ($opt eq "a") {
+ $arg ||= shift @options;
+ open(OUT, ">>$arg") or return "$arg: $!\n";
+ binmode OUT;
} elsif ($opt eq "D") {
$arg ||= shift @options;
foreach $arg (split(//, $arg)) {
Output to filename instead of STDOUT.
+=item B<-afilename>
+
+Append output to filename.
+
=item B<-->
Force end of options.
{
my ( $backend, $generated_file, $file, $final_output ) = @_;
my $return;
+ my $output_switch = "o";
local($") = " -I";
print GENFILE "#!$^X\n" if @_ == 3;
print GENFILE "use ByteLoader $ByteLoader::VERSION;\n";
+
+ $output_switch ="a";
}
close(GENFILE);
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
_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;
}
}