diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-02-04 17:13:30 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-02-04 17:14:06 +0000 |
commit | f44bdceebeee2f09fe107f15d8b99b0280171932 (patch) | |
tree | bf1f87376010fd684251a6be7392fa69813708d8 /win32 | |
parent | 3380c781dc67e9bba70bd5913c7f0f3aa2274bf3 (diff) | |
download | perl-f44bdceebeee2f09fe107f15d8b99b0280171932.tar.gz |
Also cope with extension directory names of the form ext/Data-Dumper/...
Diffstat (limited to 'win32')
-rw-r--r-- | win32/FindExt.pm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/win32/FindExt.pm b/win32/FindExt.pm index d122f3056c..9ba18b6552 100644 --- a/win32/FindExt.pm +++ b/win32/FindExt.pm @@ -77,15 +77,20 @@ sub find_ext while (defined (my $item = readdir $dh)) { next if $item =~ /^\.\.?$/; next if $item eq "DynaLoader"; - my $this_ext = "$prefix$item"; - if (-f "$ext_dir$this_ext/$item.xs" || -f "$ext_dir$this_ext/$item.c" ) { + my $this_ext = my $this_ext_dir = "$prefix$item"; + my $leaf = $item; + + $this_ext =~ s!-!/!g; + $leaf =~ s/.*-//; + + if (-f "$ext_dir$this_ext_dir/$leaf.xs" || -f "$ext_dir$this_ext_dir/$leaf.c" ) { $ext{$this_ext} = $static{$this_ext} ? 'static' : 'dynamic'; - } elsif (-f "$ext_dir$this_ext/Makefile.PL") { + } elsif (-f "$ext_dir$this_ext_dir/Makefile.PL") { $ext{$this_ext} = 'nonxs'; } else { # It's not actually an extension. So recurse into it. - if (-d "$ext_dir$this_ext" && $prefix =~ tr#/## < 10) { - find_ext($ext_dir, "$this_ext/"); + if (-d "$ext_dir$this_ext_dir" && $prefix =~ tr#/## < 10) { + find_ext($ext_dir, "$this_ext_dir/"); } } $ext{$this_ext} = 'known' if $ext{$this_ext} && $item =~ $no; |