aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-04-07 22:17:06 -0400
committerAndrew Dunstan <andrew@dunslane.net>2011-04-07 22:17:06 -0400
commita53112338c2f5b74383ce075fbec098cd06a3ad7 (patch)
tree31af32b18e57bb72c440c8e39be76f17f1f6fab9
parent56c7140ca813ba4c7ecb122a1d2b1268e705d092 (diff)
downloadpostgresql-a53112338c2f5b74383ce075fbec098cd06a3ad7.tar.gz
postgresql-a53112338c2f5b74383ce075fbec098cd06a3ad7.zip
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.
-rw-r--r--src/tools/msvc/Install.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm
index e1747c4fda0..f1028b73741 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);