summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-04-07 22:16:16 -0400
committerAndrew Dunstan <andrew@dunslane.net>2011-04-07 22:16:16 -0400
commit502ff05209ad08c50eb4f7ef491ff4d880a6cb64 (patch)
treeb8f35768468713b011b9c89c0ae4fbbdb142419a
parentec31cdeb885ed425872e4e75b187a1d222073a10 (diff)
downloadpostgresql-502ff05209ad08c50eb4f7ef491ff4d880a6cb64.tar.gz
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.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm
index 4a0ccb6b61..f400f75b06 100644
--- a/src/tools/msvc/Install.pm
+++ b/src/tools/msvc/Install.pm
@@ -416,15 +416,16 @@ sub CopyIncludeFiles
my $D;
opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";
- while (my $d = readdir($D))
+ # 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 '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);