Skip to content

Commit 0078c82

Browse files
Leontkarenetheridge
authored andcommitted
Add bmake compatibility code
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.
1 parent 910e7f2 commit 0078c82

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Changes

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ for, noteworthy changes.
88
- Moose::Manual::Construction now notes that roles can modify the BUILD sub.
99
(thanks, E. Choroba!)
1010

11+
[OTHER]
12+
13+
- adjustments have been made to the Makefile for 'bmake', so it now works
14+
when not run in compatibility mode (Leon Timmermans).
15+
1116
2.2010 2018-02-16
1217

1318
[OTHER]

inc/MMHelper.pm

+17
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,23 @@ package MY;
5252
5353
use Config;
5454
55+
# These two are necessary to keep bmake happy
56+
sub xs_c {
57+
my $self = shift;
58+
my $ret = $self->SUPER::xs_c(@_);
59+
$ret =~ s/\$\*\.xs/\$</g;
60+
$ret =~ s/\$\*\.c\b/\$@/g;
61+
return $ret;
62+
}
63+
64+
sub c_o {
65+
my $self = shift;
66+
my $ret = $self->SUPER::c_o(@_);
67+
$ret =~ s/\$\*\.c\b/\$</g;
68+
$ret =~ s/\$\*\$\(OBJ_EXT\)/\$@/g;
69+
return $ret;
70+
}
71+
5572
sub const_cccmd {
5673
my $ret = shift->SUPER::const_cccmd(@_);
5774
return q{} unless $ret;

0 commit comments

Comments
 (0)