From: Nicholas Clark Date: Fri, 25 Sep 2009 10:56:04 +0000 (+0100) Subject: Support building nonxs extensions from cpan/ on Unix. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=321c358920f04a77dd5318e7d76f9526d684fd5c;p=p5sagit%2Fp5-mst-13.2.git Support building nonxs extensions from cpan/ on Unix. --- diff --git a/Makefile.SH b/Makefile.SH index 9dad2e5..2b28787 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -218,7 +218,11 @@ done nonxs_list=' ' for f in $nonxs_ext; do p=`echo "$f" | tr / -` - nonxs_list="$nonxs_list ext/$p/pm_to_blib" + for d in ext cpan; do + if test -d $d/$p; then + nonxs_list="$nonxs_list $d/$p/pm_to_blib" + fi + done done dtrace_h='' diff --git a/make_ext.pl b/make_ext.pl index 17f1227..bcddb90 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -20,6 +20,7 @@ my @toolchain = qw(ext/constant/lib ext/Cwd ext/Cwd/lib ext/ExtUtils-Command/lib ext/File-Path/lib ext/AutoLoader/lib); my @ext_dirs = qw(ext cpan); +my $ext_dirs_re = '(?:' . join('|', @ext_dirs) . ')'; # This script acts as a simple interface for building extensions. @@ -100,7 +101,7 @@ foreach (@extspec) { if (s{^lib/auto/}{}) { # Remove lib/auto prefix and /*.* suffix s{/[^/]+\.[^/]+$}{}; - } elsif (s{^ext/}{}) { + } elsif (s{^$ext_dirs_re/}{}) { # Remove ext/ prefix and /pm_to_blib suffix s{/pm_to_blib$}{}; # Targets are given as files on disk, but the extension spec is still