Skip to content

Commit 24589ba

Browse files
committed
Skip linking XS code for pure Perl install
When `PUREPERL_ONLY=1` set, this prevents the Makefile from having rules that compile the XS code. This is useful to have when building dependencies for deploying to a pure Perl install such as when using `App::FatPacker`. This removes the need to skip over files that end in `perl -V:dlext` (e.g., `.so`, `.dll`, `.dylib`) when copying to a deployment. This should allow for using the `cpanm --pureperl` option so that a pure Perl installation can be requested for all installed distributions. Signed-off-by: Zakariyya Mughal <[email protected]>
1 parent 699e95a commit 24589ba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Makefile.PL

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ WriteMakefile1(
120120
TEST_REQUIRES => \%TEST_DEPS,
121121
XS => {map { (my $tgt = $_) =~ s/\.xs$/\.c/; $_ => $tgt; } @XS_FILES},
122122
MAGICXS => 1,
123+
SKIP => [ $loadable_xs ? () : qw(static dynamic) ],
123124
depend => {'$(FIRST_MAKEFILE)' => '$(VERSION_FROM)'},
124125
test => {TESTS => join(' ', 't/pp/*.t', ($loadable_xs ? 't/xs/*.t' : ()), 'xt/*.t')},
125126
# Otherwise 'cxinc' isn't defined

0 commit comments

Comments
 (0)