mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
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.
This commit is contained in:
@ -437,15 +437,17 @@ sub CopyIncludeFiles
|
|||||||
my $D;
|
my $D;
|
||||||
opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";
|
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))
|
while (my $d = readdir($D))
|
||||||
{
|
{
|
||||||
next if ($d =~ /^\./);
|
next if ($d =~ /^\./);
|
||||||
next if ($d eq '.git');
|
next if ($d eq '.git');
|
||||||
next if ($d eq 'CVS');
|
next if ($d eq 'CVS');
|
||||||
next unless (-d 'src/include/' . $d);
|
next unless (-d "src/include/$d");
|
||||||
|
|
||||||
EnsureDirectories($target . '/include/server', $d);
|
EnsureDirectories("$target/include/server/$d");
|
||||||
system("xcopy /s /i /q /r /y src\\include\\$d\\*.h \"$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");
|
&& croak("Failed to copy include directory $d\n");
|
||||||
}
|
}
|
||||||
closedir($D);
|
closedir($D);
|
||||||
|
Reference in New Issue
Block a user