]> granicus.if.org Git - postgresql/commitdiff
MSVC builds must use a separate stamp file for copying generated headers.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 18 May 2018 15:53:18 +0000 (11:53 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 18 May 2018 15:53:18 +0000 (11:53 -0400)
Commit bad51a49a tried to use a shortcut with just one stamp file
recording the actions of generating the pg_*_d.h headers and copying
them to the src/include/catalog/ directory.  That doesn't work in all
scenarios though, so we must use two stamp files like the Makefiles do.

John Naylor

Discussion: https://postgr.es/m/CANFyU944GdHr=puPbA78STnqr=8kgMrGF-VDHck6aO_-qNDALg@mail.gmail.com

src/tools/msvc/Solution.pm
src/tools/msvc/clean.bat

index 4ad1f8f8b4ae7e8832a4b0e4521be01705c929e3..a33e68eccf0559ab4516145df78189993e66fb7a 100644 (file)
@@ -501,7 +501,12 @@ EOF
                  || confess "Could not touch bki-stamp";
                close($f);
                chdir('../../..');
+       }
 
+       if (IsNewer(
+                       'src/include/catalog/header-stamp',
+                       'src/backend/catalog/bki-stamp'))
+       {
                # Copy generated headers to include directory.
                opendir(my $dh, 'src/backend/catalog/')
                  || die "Can't opendir src/backend/catalog/ $!";
@@ -516,6 +521,9 @@ EOF
                copyFile(
                        'src/backend/catalog/schemapg.h',
                        'src/include/catalog/schemapg.h');
+               open(my $chs, '>', 'src/include/catalog/header-stamp')
+                 || confess "Could not touch header-stamp";
+               close($chs);
        }
 
        open(my $o, '>', "doc/src/sgml/version.sgml")
index a041ef2ebde396ce795b1ca593ec5ec67c0ca337..65454421d70993339b2bbf970b6c537ea85c2f75 100755 (executable)
@@ -49,6 +49,7 @@ if exist src\include\storage\lwlocknames.h del /q src\include\storage\lwlockname
 if exist src\include\utils\probes.h del /q src\include\utils\probes.h
 if exist src\include\catalog\schemapg.h del /q src\include\catalog\schemapg.h
 if exist src\include\catalog\pg_*_d.h del /q src\include\catalog\pg_*_d.h
+if exist src\include\catalog\header-stamp del /q src\include\catalog\header-stamp
 if exist doc\src\sgml\version.sgml del /q doc\src\sgml\version.sgml
 
 if %DIST%==1 if exist src\backend\utils\fmgroids.h del /q src\backend\utils\fmgroids.h