Integrate from macperl:
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_NW5.pm
index 61d6436..03a565f 100644 (file)
@@ -107,8 +107,7 @@ sub constants {
     push @m, "BOOT_SYMBOL = $self->{'BOOT_SYMBOL'}\n";
 
     # If the final binary name is greater than 8 chars,
-    # truncate it here and rename it after creation
-    # otherwise, Watcom Linker fails
+    # truncate it here.
     if(length($self->{'BASEEXT'}) > 8) {
         $self->{'NLM_SHORT_NAME'} = substr($self->{'BASEEXT'},0,8);
         push @m, "NLM_SHORT_NAME = $self->{'NLM_SHORT_NAME'}\n";
@@ -335,8 +334,7 @@ MAKE_FRAG
     # Taking care of long names like FileHandle, ByteLoader, SDBM_File etc
     if($self->{NLM_SHORT_NAME}) {
         # In case of nlms with names exceeding 8 chars, build nlm in the 
-        # current dir, rename and move to auto\lib.  If we create in auto\lib
-        # in the first place, we can't rename afterwards.
+        # current dir, rename and move to auto\lib.
         $m .= q{ -o $(NLM_SHORT_NAME).$(DLEXT)}
     } else {
         $m .= q{ -o $(INST_AUTODIR)\\$(BASEEXT).$(DLEXT)}
@@ -347,12 +345,10 @@ MAKE_FRAG
 
     $m .= q{ $(PERL_INC)\Main.lib -commandfile $(BASEEXT).def}."\n";
 
-    # If it is having a short name, rename it 
     if($self->{NLM_SHORT_NAME}) {
         $m .= <<'MAKE_FRAG';
-       if exist $(INST_AUTODIR)\$(BASEEXT).$(DLEXT) del $(INST_AUTODIR)\$(BASEEXT).$(DLEXT) 
-       rename $(NLM_SHORT_NAME).$(DLEXT) $(BASEEXT).$(DLEXT) 
-       move $(BASEEXT).$(DLEXT) $(INST_AUTODIR)
+       if exist $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT) del $(INST_AUTODIR)\$(NLM_SHORT_NAME).$(DLEXT) 
+       move $(NLM_SHORT_NAME).$(DLEXT) $(INST_AUTODIR)
 MAKE_FRAG
     }