]> granicus.if.org Git - postgresql/commitdiff
MSVC: Rebuild spiexceptions.h when out of date.
authorNoah Misch <noah@leadboat.com>
Mon, 13 Nov 2017 02:43:32 +0000 (18:43 -0800)
committerNoah Misch <noah@leadboat.com>
Mon, 13 Nov 2017 02:43:45 +0000 (18:43 -0800)
Also, add a warning to catch future instances of naming a nonexistent
file as a prerequisite.  Back-patch to 9.3 (all supported versions).

src/tools/msvc/Solution.pm

index a8fdc31530320d24fd08c80da27a49a236296603..7ae6d371e9c4ab65012f8fa8eb6e2a52aa9d38ba 100644 (file)
@@ -87,6 +87,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')
        {
@@ -321,7 +322,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
        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(