Skip to content

Commit

Permalink
Add bmake compatibility code
Browse files Browse the repository at this point in the history
In bsd make $* only contains the directory of the file if it's run in
compatability mode. This breaks with Moose's use of the xs/ directory.
  • Loading branch information
Leont authored and karenetheridge committed May 15, 2018
1 parent e189bf4 commit f33cff8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ for, noteworthy changes.
- Moose::Manual::Construction now notes that roles can modify the BUILD sub.
(thanks, E. Choroba!)

[OTHER]

- adjustments have been made to the Makefile for 'bmake', so it now works
when not run in compatibility mode (Leon Timmermans).

2.2010 2018-02-16

[OTHER]
Expand Down
17 changes: 17 additions & 0 deletions inc/MMHelper.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ package MY;
use Config;
# These two are necessary to keep bmake happy
sub xs_c {
my $self = shift;
my $ret = $self->SUPER::xs_c(@_);
$ret =~ s/\$\*\.xs/\$</g;
$ret =~ s/\$\*\.c\b/\$@/g;
return $ret;
}
sub c_o {
my $self = shift;
my $ret = $self->SUPER::c_o(@_);
$ret =~ s/\$\*\.c\b/\$</g;
$ret =~ s/\$\*\$\(OBJ_EXT\)/\$@/g;
return $ret;
}
sub const_cccmd {
my $ret = shift->SUPER::const_cccmd(@_);
return q{} unless $ret;
Expand Down

0 comments on commit f33cff8

Please sign in to comment.