Skip to content

Commit

Permalink
make com.dbg binary optional
Browse files Browse the repository at this point in the history
  • Loading branch information
G4Vi committed Jan 30, 2023
1 parent 4724b21 commit f28fefd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/Perl/Dist/APPerl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1072,11 +1072,14 @@ sub Build {
};
$copyexe->($PERL_APE, $APPPATH);
my $srcdbg = "$PERL_APE.dbg";
if(! -f $srcdbg) {
for(1..2) {
if(-f $srcdbg) {
$copyexe->($srcdbg, "$APPPATH.dbg");
last;
}
$srcdbg = $PERL_APE;
$srcdbg =~ s/com$/elf/;
}
$copyexe->($srcdbg, "$APPPATH.dbg");
if((! exists $UserProjectConfig->{nobuild_perl_bin}) || scalar(keys %{$itemconfig->{zip_extra_files}})) {
print "cd $ZIP_ROOT\n";
chdir($ZIP_ROOT) or die "failed to enter ziproot";
Expand Down Expand Up @@ -1188,6 +1191,7 @@ sub Build {

foreach my $file ('perl.com', 'perl.com.dbg') {
my $srcpath = "$TEMPDIR/$file";
-e $srcpath or next;
my $destpath = "$OUTPUTDIR/$file";
print "mv $srcpath $destpath\n";
move($srcpath, $destpath) or die "move failed: $!";
Expand All @@ -1201,6 +1205,7 @@ sub Build {
my $destfile = $itemconfig->{dest};
$destfile .= '.dbg' if ($srcfile =~ /dbg$/);
my @args = ("$UserProjectConfig->{apperl_output}/$CurAPPerlName/$srcfile", $destfile);
-e $args[0] or next;
print 'cp '.join(' ', @args)."\n";
cp(@args) or die "copy failed: $!";
}
Expand Down

0 comments on commit f28fefd

Please sign in to comment.