This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexec.c: Rmv 2 unused macro parameters.
[perl5.git] / make_ext.pl
index 126bf73..12926f8 100644 (file)
@@ -185,10 +185,7 @@ if (IS_WIN32) {
            next;
        }
        push @extspec, $_;
-       if($_ eq 'DynaLoader' and $target !~ /clean$/) {
-           # No, we don't know why nmake can't work out the dependency chain
-           push @{$extra_passthrough{$_}}, 'DynaLoader.c';
-       } elsif(FindExt::is_static($_)) {
+       if($_ ne 'DynaLoader' && FindExt::is_static($_)) {
            push @{$extra_passthrough{$_}}, 'LINKTYPE=static';
        }
     }
@@ -371,7 +368,6 @@ sub build_extension {
                my $leafname = "$leaf.pm";
                my $pathname = join '/', @dirs, $leafname;
                my @locations = ($leafname, $pathname, "lib/$pathname");
-               unshift @locations, 'lib/IO/Compress/Base.pm' if $mname eq 'IO::Compress';
                foreach (@locations) {
                    if (-f $_) {
                        $fromname = $_;
@@ -385,6 +381,17 @@ sub build_extension {
                ($value = $fromname) =~ s/\.pm\z/.pod/;
                $value = $fromname unless -e $value;
            }
+
+            if ($mname eq 'Pod::Checker') {
+                # the abstract in the .pm file is unparseable by MM,
+                # so special-case it. We can't use the package's own
+                # Makefile.PL, as it doesn't handle the executable scripts
+                # right.
+                $key = 'ABSTRACT';
+                # this is copied from the CPAN Makefile.PL v 1.171
+                $value = 'Pod::Checker verifies POD documentation contents for compliance with the POD format specifications';
+            }
+
            open my $fh, '>', 'Makefile.PL'
                or die "Can't open Makefile.PL for writing: $!";
            printf $fh <<'EOM', $0, $mname, $fromname, $key, $value;
@@ -557,16 +564,13 @@ EOS
                         );
     }
 
-    if (!$target or $target !~ /clean$/) {
-       # Give makefile an opportunity to rewrite itself.
-       # reassure users that life goes on...
-       my @args = ('config', @$pass_through);
-       system(@make, @args) and print "@make @args failed, continuing anyway...\n";
-    }
     my @targ = ($target, @$pass_through);
     print "Making $target in $ext_dir\n@make @targ\n" if $verbose;
     local $ENV{PERL_INSTALL_QUIET} = 1;
     my $code = system(@make, @targ);
+    if($code >> 8 != 0){ # probably cleaned itself, try again once more time
+        $code = system(@make, @targ);
+    }
     die "Unsuccessful make($ext_dir): code=$code" if $code != 0;
 
     chdir $return_dir || die "Cannot cd to $return_dir: $!";