fix Win32 nmake cant rebuild DynaLoader.obj on Makefile regen bug
authorDaniel Dragan <bulk88@hotmail.com>
Tue, 4 Nov 2014 06:14:04 +0000 (01:14 -0500)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 5 Nov 2014 00:10:10 +0000 (16:10 -0800)
See [perl #123123] for details.

ext/DynaLoader/Makefile.PL
make_ext.pl

index 76c3bc0..864af3e 100644 (file)
@@ -14,7 +14,8 @@ WriteMakefile(
     VERSION_FROM => 'DynaLoader_pm.PL',
     PL_FILES   => {'DynaLoader_pm.PL'=>'DynaLoader.pm'},
     PM         => {'DynaLoader.pm' => '$(INST_LIBDIR)/DynaLoader.pm'},
-    depend      => {'DynaLoader$(OBJ_EXT)' => 'dlutils.c'},
+    depend      => {   'DynaLoader$(OBJ_EXT)' => 'dlutils.c',
+                       'DynaLoader.c' => 'DynaLoader.xs'},
     clean      => {FILES => 'DynaLoader.c DynaLoader.xs DynaLoader.pm'},
 );
 
index 126bf73..dbef0d5 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';
        }
     }