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).
This commit is contained in:
Noah Misch 2017-11-12 18:43:32 -08:00
parent cbfffee41c
commit 9363b8b79b
1 changed files with 2 additions and 1 deletions

View File

@ -81,6 +81,7 @@ sub DeterminePlatform
sub IsNewer
{
my ($newfile, $oldfile) = @_;
-e $oldfile or warn "source file \"$oldfile\" does not exist";
if ( $oldfile ne 'src/tools/msvc/config.pl'
&& $oldfile ne 'src/tools/msvc/config_default.pl')
{
@ -325,7 +326,7 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c
if ($self->{options}->{python}
&& IsNewer(
'src/pl/plpython/spiexceptions.h',
'src/include/backend/errcodes.txt'))
'src/backend/utils/errcodes.txt'))
{
print "Generating spiexceptions.h...\n";
system(