Skip to content

Commit 730e28f

Browse files
committed
CI FreeBSD, fix distmeta etc with BSD make
1 parent ed9b370 commit 730e28f

File tree

3 files changed

+49
-4
lines changed

3 files changed

+49
-4
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: smoke-freebsd
2+
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
tags-ignore:
8+
- "*"
9+
pull_request:
10+
11+
jobs:
12+
freebsd:
13+
env:
14+
PERL_USE_UNSAFE_INC: 0
15+
AUTHOR_TESTING: 1
16+
AUTOMATED_TESTING: 1
17+
RELEASE_TESTING: 1
18+
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Test in FreeBSD
24+
uses: vmactions/freebsd-vm@v1
25+
with:
26+
usesh: true
27+
copyback: false
28+
prepare: |
29+
pkg install -y perl5
30+
run: |
31+
set -x
32+
freebsd-version
33+
sysctl hw.model
34+
sysctl hw.ncpu
35+
sysctl hw.physmem
36+
sysctl hw.usermem
37+
CPU=$(sysctl -n hw.ncpu)
38+
make -v
39+
export HARNESS_OPTIONS=j$CPU MAKEFLAGS=-j$CPU
40+
perl -V
41+
perl Makefile.PL
42+
make test
43+
make disttest NOECHO=

lib/ExtUtils/MM_Any.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ sub is_make_type {
225225
if $type eq 'gmake' and $minus_v =~ /GNU make/i;
226226
return $maketype2true{$type} = 1
227227
if $type eq 'bsdmake'
228-
and $minus_v =~ /^usage: make \[-BeikNnqrstWwX\]/im;
228+
and $minus_v =~ /^usage:.*make\s*\[-B/im;
229229
$maketype2true{$type} = 0; # it wasn't whatever you asked
230230
}
231231

lib/ExtUtils/MM_Unix.pm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,14 +3471,16 @@ sub replace_manpage_separator {
34713471

34723472
=item cd
34733473
3474+
On BSD make, will add a countervailing C<cd ..> on each command since
3475+
parallel builds run all the commands in a recipe in the same shell.
3476+
34743477
=cut
34753478

34763479
sub cd {
34773480
my($self, $dir, @cmds) = @_;
3478-
3481+
@cmds = map "$_; cd $Updir", @cmds if $self->is_make_type('bsdmake');
34793482
# No leading tab and no trailing newline makes for easier embedding
3480-
my $make_frag = join "\n\t", map { "cd $dir && $_" } @cmds;
3481-
3483+
my $make_frag = join "\n\t", map "cd $dir && $_", @cmds;
34823484
return $make_frag;
34833485
}
34843486

0 commit comments

Comments
 (0)