Skip to content

Commit

Permalink
Skip linking XS code for pure Perl install
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
zmughal committed May 26, 2021
1 parent 699e95a commit 24589ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ WriteMakefile1(
TEST_REQUIRES => \%TEST_DEPS,
XS => {map { (my $tgt = $_) =~ s/\.xs$/\.c/; $_ => $tgt; } @XS_FILES},
MAGICXS => 1,
SKIP => [ $loadable_xs ? () : qw(static dynamic) ],
depend => {'$(FIRST_MAKEFILE)' => '$(VERSION_FROM)'},
test => {TESTS => join(' ', 't/pp/*.t', ($loadable_xs ? 't/xs/*.t' : ()), 'xt/*.t')},
# Otherwise 'cxinc' isn't defined
Expand Down

0 comments on commit 24589ba

Please sign in to comment.