Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06ca28d

Browse files
committed
Fix vcbuild failures and chkpass dependency caused by854adb8
Switching the Windows build scripts to use forward slashes instead ofbackslashes has caused a couple of issues in VC builds:- The file tree list was not correctly generated, build script generating vcproj file missing tree dependencies when listing items in Filter.- VC builds do not accept file paths with forward slashes, perhaps it could be possible to use a Condition but it seems safer to simply enforce the file paths to use backslashes in the vcproj files.- chkpass had an unneeded dependency with libpgport and libpgcommon to make build succeed but actually it is not necessary as crypt.c is already listed for this project and should be replaced with a fake name as it is a unique file.Michael Paquier
1 parentf954254 commit06ca28d

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

‎src/tools/msvc/MSBuildProject.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ EOF
143143

144144
# File already exists, so fake a new name
145145
my$obj =$dir;
146-
$obj =~s/\\/_/g;
146+
$obj =~s!/!_!g;
147147

148148
print$f<<EOF;
149149
<ClCompile Include="$fileNameWithPath">

‎src/tools/msvc/Mkvcbuild.pm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ my $contrib_defines = { 'refint' => 'REFINT_VERBOSE' };
3333
my@contrib_uselibpq =
3434
('dblink','oid2name','postgres_fdw','vacuumlo');
3535
my@contrib_uselibpgport = (
36-
'chkpass',
3736
'oid2name',
3837
'pg_standby',
3938
'vacuumlo');
4039
my@contrib_uselibpgcommon = (
41-
'chkpass',
4240
'oid2name',
4341
'pg_standby',
4442
'vacuumlo');

‎src/tools/msvc/VCBuildProject.pm

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,43 +75,48 @@ EOF
7575
my$dir =$1;
7676
my$file =$2;
7777

78-
# Walk backwards down the directory stack and close any dirs we're done with
78+
# Walk backwards down the directory stack and close any dirs
79+
# we're done with.
7980
while ($#dirstack >= 0)
8081
{
81-
if (join('\\',@dirstack)eq
82-
substr($dir, 0,length(join('\\',@dirstack))))
82+
if (join('/',@dirstack)eq
83+
substr($dir, 0,length(join('/',@dirstack))))
8384
{
84-
lastif (length($dir) ==length(join('\\',@dirstack)));
85+
lastif (length($dir) ==length(join('/',@dirstack)));
8586
last
86-
if (substr($dir,length(join('\\',@dirstack)), 1)eq'\\');
87+
if (substr($dir,length(join('/',@dirstack)), 1)eq'/');
8788
}
8889
print$f'' x$#dirstack ." </Filter>\n";
8990
pop@dirstack;
9091
}
9192

9293
# Now walk forwards and create whatever directories are needed
93-
while (join('\\',@dirstack)ne$dir)
94+
while (join('/',@dirstack)ne$dir)
9495
{
95-
my$left =substr($dir,length(join('\\',@dirstack)));
96-
$left =~s/^\\//;
97-
my@pieces =split /\\/,$left;
96+
my$left =substr($dir,length(join('/',@dirstack)));
97+
$left =~s/^\///;
98+
my@pieces =split /\//,$left;
9899
push@dirstack,$pieces[0];
99100
print$f'' x$#dirstack
100101
." <Filter Name=\"$pieces[0]\" Filter=\"\">\n";
101102
}
102103

104+
# VC builds do not like file paths with forward slashes.
105+
my$fileNameWithPathFormatted =$fileNameWithPath;
106+
$fileNameWithPathFormatted =~s/\//\\/g;
107+
103108
print$f'' x$#dirstack
104-
." <File RelativePath=\"$fileNameWithPath\"";
109+
." <File RelativePath=\"$fileNameWithPathFormatted\"";
105110
if ($fileNameWithPath =~/\.y$/)
106111
{
107112
my$of =$fileNameWithPath;
108113
$of =~s/\.y$/.c/;
109114
$of =~
110-
s{^src\\pl\\plpgsql\\src\\gram.c$}{src\\pl\\plpgsql\\src\\pl_gram.c};
115+
s{^src/pl/plpgsql/src/gram.c$}{src/pl/plpgsql/src/pl_gram.c};
111116
print$f'>'
112117
.$self->GenerateCustomTool(
113118
'Running bison on' .$fileNameWithPath,
114-
"perl src\\tools\\msvc\\pgbison.pl$fileNameWithPath",$of)
119+
"perl src/tools/msvc/pgbison.pl$fileNameWithPath",$of)
115120
.'</File>' ."\n";
116121
}
117122
elsif ($fileNameWithPath =~/\.l$/)
@@ -121,15 +126,15 @@ s{^src\\pl\\plpgsql\\src\\gram.c$}{src\\pl\\plpgsql\\src\\pl_gram.c};
121126
print$f'>'
122127
.$self->GenerateCustomTool(
123128
'Running flex on' .$fileNameWithPath,
124-
"perl src\\tools\\msvc\\pgflex.pl$fileNameWithPath",$of)
129+
"perl src/tools/msvc/pgflex.pl$fileNameWithPath",$of)
125130
.'</File>' ."\n";
126131
}
127132
elsif (defined($uniquefiles{$file}))
128133
{
129134

130135
# File already exists, so fake a new name
131136
my$obj =$dir;
132-
$obj =~s/\\/_/g;
137+
$obj =~s!/!_!g;
133138
print$f
134139
"><FileConfiguration Name=\"Debug|$self->{platform}\"><Tool Name=\"VCCLCompilerTool\" ObjectFile=\".\\debug\\$self->{name}\\$obj"
135140
."_$file.obj\" /></FileConfiguration><FileConfiguration Name=\"Release|$self->{platform}\"><Tool Name=\"VCCLCompilerTool\" ObjectFile=\".\\release\\$self->{name}\\$obj"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp