From: Nicholas Clark Date: Fri, 6 Feb 2009 18:28:47 +0000 (+0000) Subject: Cope with new-style ext/Data-Dumper as well as old-style ext/Data/Dumper X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=238a6851e196b122761952f8b2127d8fe9e01658;p=p5sagit%2Fp5-mst-13.2.git Cope with new-style ext/Data-Dumper as well as old-style ext/Data/Dumper --- diff --git a/Configure b/Configure index 6063e53..67c20b5 100755 --- a/Configure +++ b/Configure @@ -21619,10 +21619,12 @@ find_extensions=' case "$xxx" in DynaLoader|dynaload) ;; *) - if $test -f $xxx/$xxx.xs -o -f $xxx/$xxx.c; then - known_extensions="$known_extensions $1$xxx"; + this_ext=`echo $xxx | $sed -e s/-/\\\//g`; + leaf=`echo $xxx | $sed -e s/.*-//`; + if $test -f $xxx/$leaf.xs -o -f $xxx/$leaf.c; then + known_extensions="$known_extensions $1$this_ext"; elif $test -f $xxx/Makefile.PL; then - nonxs_extensions="$nonxs_extensions $1$xxx"; + nonxs_extensions="$nonxs_extensions $1$this_ext"; else if $test -d $xxx -a $# -lt 10; then set $1$xxx/ $*; diff --git a/make_ext.pl b/make_ext.pl index 2875422..5224f41 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -176,7 +176,16 @@ if ($is_Win32) { foreach my $spec (@extspec) { my $mname = $spec; $mname =~ s!/!::!g; - my $ext_pathname = "ext/$spec"; + my $ext_pathname; + if (-d "ext/$spec") { + # Old style ext/Data/Dumper/ + $ext_pathname = "ext/$spec"; + } else { + # New style ext/Data-Dumper/ + my $copy = $spec; + $copy =~ tr!/!-!; + $ext_pathname = "ext/$copy"; + } my $up = $ext_pathname; $up =~ s![^/]+!..!g;