From: Andrew Dunstan Date: Fri, 8 Apr 2011 02:17:06 +0000 (-0400) Subject: Avoid use of mixed slash style paths in arguments to xcopy in MSVC builds. X-Git-Tag: REL9_1_BETA1~141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a53112338c2f5b74383ce075fbec098cd06a3ad7;p=postgresql Avoid use of mixed slash style paths in arguments to xcopy in MSVC builds. Some versions of xcopy, notably on Windows 7 don't like it. Backpatch to 8.3, where we first used xcopy. --- diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index e1747c4fda..f1028b7374 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -479,15 +479,17 @@ sub CopyIncludeFiles my $D; opendir($D, 'src/include') || croak "Could not opendir on src/include!\n"; + # some xcopy progs don't like mixed slash style paths + (my $ctarget = $target) =~ s!/!\\!g; while (my $d = readdir($D)) { next if ($d =~ /^\./); next if ($d eq '.git'); next if ($d eq 'CVS'); - next unless (-d 'src/include/' . $d); + next unless (-d "src/include/$d"); - EnsureDirectories($target . '/include/server', $d); - system("xcopy /s /i /q /r /y src\\include\\$d\\*.h \"$target\\include\\server\\$d\\\"") + EnsureDirectories("$target/include/server/$d"); + system(qq{xcopy /s /i /q /r /y src\\include\\$d\\*.h "$ctarget\\include\\server\\$d\\"}) && croak("Failed to copy include directory $d\n"); } closedir($D);