Skip to content

Commit ad083e4

Browse files
committed
MSVC: Rebuild spiexceptions.h when out of date.
Also, add a warning to catch future instances of naming a nonexistent file as a prerequisite. Back-patch to 9.3 (all supported versions).
1 parent 8c92e66 commit ad083e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/msvc/Solution.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ sub DeterminePlatform
8787
sub IsNewer
8888
{
8989
my ($newfile, $oldfile) = @_;
90+
-e $oldfile or warn "source file \"$oldfile\" does not exist";
9091
if ( $oldfile ne 'src/tools/msvc/config.pl'
9192
&& $oldfile ne 'src/tools/msvc/config_default.pl')
9293
{
@@ -321,7 +322,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
321322
if ($self->{options}->{python}
322323
&& IsNewer(
323324
'src/pl/plpython/spiexceptions.h',
324-
'src/include/backend/errcodes.txt'))
325+
'src/backend/utils/errcodes.txt'))
325326
{
326327
print "Generating spiexceptions.h...\n";
327328
system(

0 commit comments

Comments
 (0)