Symbian port: add Series 90 support
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_Unix.pm
index ba3be67..22cea82 100644 (file)
@@ -18,7 +18,7 @@ use vars qw($VERSION @ISA
 
 use ExtUtils::MakeMaker qw($Verbose neatvalue);
 
-$VERSION = '1.50_04';
+$VERSION = '1.51_01';
 
 require ExtUtils::MM_Any;
 @ISA = qw(ExtUtils::MM_Any);
@@ -2538,7 +2538,7 @@ doc_inst_perl:
                MAP_LIBPERL "$(MAP_LIBPERL)" \
                >> }.$self->catfile('$(DESTINSTALLARCHLIB)','perllocal.pod').q{
 
-};
+} if -f 'Makefile.PL';
 
     push @m, q{
 inst_perl: pure_inst_perl doc_inst_perl
@@ -2977,7 +2977,14 @@ PPD_OUT
 
     }
 
-    $ppd_xml .= sprintf <<'PPD_OUT', $Config{archname};
+    my $archname = $Config{archname};
+    if ($] >= 5.008) {
+        # archname did not change from 5.6 to 5.8, but those versions may
+        # not be not binary compatible so now we append the part of the
+        # version that changes when binary compatibility may change
+        $archname .= "-". substr($Config{version},0,3);
+    }
+    $ppd_xml .= sprintf <<'PPD_OUT', $archname;
         <OS NAME="$(OSNAME)" />
         <ARCHITECTURE NAME="%s" />
 PPD_OUT
@@ -3408,6 +3415,7 @@ sub test {
     }
     # note: 'test.pl' name is also hardcoded in init_dirscan()
     my(@m);
+    my $subdirs_test = ($self->{DIR} && @{$self->{DIR}} ? 'subdirs-test' : '');
     push(@m,"
 TEST_VERBOSE=0
 TEST_TYPE=test_\$(LINKTYPE)
@@ -3417,17 +3425,17 @@ TESTDB_SW = -d
 
 testdb :: testdb_\$(LINKTYPE)
 
-test :: \$(TEST_TYPE)
+test :: \$(TEST_TYPE) $subdirs_test
 ");
 
     foreach my $dir (@{ $self->{DIR} }) {
         my $test = $self->oneliner(sprintf <<'CODE', $dir);
 chdir '%s';  
-system '$(MAKE) test $(PASTHRU)' 
+system '$(MAKE) $(USEMAKEFILE) $(FIRST_MAKEFILE) test $(PASTHRU)' 
     if -f '$(FIRST_MAKEFILE)';
 CODE
 
-        push(@m, "\t\$(NOECHO) $test\n");
+        push(@m, "\nsubdirs-test ::\n\t\$(NOECHO) $test\n");
     }
 
     push(@m, "\t\$(NOECHO) \$(ECHO) 'No tests defined for \$(NAME) extension.'\n")