mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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:
		@@ -90,6 +90,7 @@ sub DeterminePlatform
 | 
				
			|||||||
sub IsNewer
 | 
					sub IsNewer
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	my ($newfile, $oldfile) = @_;
 | 
						my ($newfile, $oldfile) = @_;
 | 
				
			||||||
 | 
						-e $oldfile or warn "source file \"$oldfile\" does not exist";
 | 
				
			||||||
	if (   $oldfile ne 'src\tools\msvc\config.pl'
 | 
						if (   $oldfile ne 'src\tools\msvc\config.pl'
 | 
				
			||||||
		&& $oldfile ne 'src\tools\msvc\config_default.pl')
 | 
							&& $oldfile ne 'src\tools\msvc\config_default.pl')
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -311,7 +312,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
 | 
				
			|||||||
	if ($self->{options}->{python}
 | 
						if ($self->{options}->{python}
 | 
				
			||||||
		&& IsNewer(
 | 
							&& IsNewer(
 | 
				
			||||||
			'src\pl\plpython\spiexceptions.h',
 | 
								'src\pl\plpython\spiexceptions.h',
 | 
				
			||||||
			'src\include\backend\errcodes.txt'))
 | 
								'src\backend\utils\errcodes.txt'))
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		print "Generating spiexceptions.h...\n";
 | 
							print "Generating spiexceptions.h...\n";
 | 
				
			||||||
		system(
 | 
							system(
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user