Hello,

  "This cd can only go one level down" fix attached. Pugs
(http://pugscode.org/) Win32 build needs this patch.

--
Michal Jurosz
Index: lib/ExtUtils/MM_Win32.pm
===================================================================
--- lib/ExtUtils/MM_Win32.pm    (revision 3688)
+++ lib/ExtUtils/MM_Win32.pm    (working copy)
@@ -474,14 +474,11 @@
 dmake can handle Unix style cd'ing but nmake (at least 1.5) cannot.  It
 wants:
 
-    cd dir
+    cd dir1\dir2
     command
     another_command
-    cd ..
+    cd ..\..
 
-B<NOTE> This cd can only go one level down.  So far this sufficient for
-what MakeMaker needs.
-
 =cut
 
 sub cd {
@@ -490,12 +487,14 @@
     return $self->SUPER::cd($dir, @cmds) unless $self->make eq 'nmake';
 
     my $cmd = join "\n\t", map "$_", @cmds;
+    my $back_dir = '..';
+    $back_dir .= '\\..' while $dir =~ /.\\./g;
 
     # No leading tab and no trailing newline makes for easier embedding.
-    my $make_frag = sprintf <<'MAKE_FRAG', $dir, $cmd;
+    my $make_frag = sprintf <<'MAKE_FRAG', $dir, $cmd, $back_dir;
 cd %s
        %s
-       cd ..
+       cd %s
 MAKE_FRAG
 
     chomp $make_frag;

Reply via email to