mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Perltidy run over the MSVC build system files, to clean up code formatting
and indentation styles.
This commit is contained in:
		@@ -3,7 +3,7 @@ package Install;
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# Package that provides 'make install' functionality for msvc builds
 | 
					# Package that provides 'make install' functionality for msvc builds
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.34 2010/01/05 13:31:58 mha Exp $
 | 
					# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.35 2010/04/09 13:05:58 mha Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
use strict;
 | 
					use strict;
 | 
				
			||||||
use warnings;
 | 
					use warnings;
 | 
				
			||||||
@@ -62,30 +62,34 @@ sub Install
 | 
				
			|||||||
    CopySolutionOutput($conf, $target);
 | 
					    CopySolutionOutput($conf, $target);
 | 
				
			||||||
    lcopy($target . '/lib/libpq.dll', $target . '/bin/libpq.dll');
 | 
					    lcopy($target . '/lib/libpq.dll', $target . '/bin/libpq.dll');
 | 
				
			||||||
    my $sample_files = [];
 | 
					    my $sample_files = [];
 | 
				
			||||||
	File::Find::find({wanted => 
 | 
					    File::Find::find(
 | 
				
			||||||
						  sub { /^.*\.sample\z/s && 
 | 
					        {
 | 
				
			||||||
									push(@$sample_files, $File::Find::name); 
 | 
					            wanted =>sub {
 | 
				
			||||||
 | 
					                /^.*\.sample\z/s
 | 
				
			||||||
 | 
					                  &&push(@$sample_files, $File::Find::name);
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
					 "src" );
 | 
					        "src"
 | 
				
			||||||
    CopySetOfFiles('config files', $sample_files , $target . '/share/');
 | 
					    );
 | 
				
			||||||
 | 
					    CopySetOfFiles('config files', $sample_files, $target . '/share/');
 | 
				
			||||||
    CopyFiles(
 | 
					    CopyFiles(
 | 
				
			||||||
        'Import libraries',
 | 
					        'Import libraries',
 | 
				
			||||||
        $target .'/lib/',
 | 
					        $target .'/lib/',
 | 
				
			||||||
        "$conf\\", "postgres\\postgres.lib","libpq\\libpq.lib", "libecpg\\libecpg.lib", "libpgport\\libpgport.lib"
 | 
					        "$conf\\", "postgres\\postgres.lib","libpq\\libpq.lib", "libecpg\\libecpg.lib",
 | 
				
			||||||
 | 
					        "libpgport\\libpgport.lib"
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					    CopySetOfFiles(
 | 
				
			||||||
 | 
					        'timezone names',
 | 
				
			||||||
 | 
					        [ glob('src\timezone\tznames\*.txt') ],
 | 
				
			||||||
 | 
					        $target . '/share/timezonesets/'
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    CopySetOfFiles('timezone names', 
 | 
					 | 
				
			||||||
				   [ glob('src\timezone\tznames\*.txt') ] ,
 | 
					 | 
				
			||||||
				   $target . '/share/timezonesets/');
 | 
					 | 
				
			||||||
    CopyFiles(
 | 
					    CopyFiles(
 | 
				
			||||||
        'timezone sets',
 | 
					        'timezone sets',
 | 
				
			||||||
        $target . '/share/timezonesets/',
 | 
					        $target . '/share/timezonesets/',
 | 
				
			||||||
        'src/timezone/tznames/', 'Default','Australia','India'
 | 
					        'src/timezone/tznames/', 'Default','Australia','India'
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    CopySetOfFiles('BKI files', [ glob("src\\backend\\catalog\\postgres.*") ], 
 | 
					    CopySetOfFiles('BKI files', [ glob("src\\backend\\catalog\\postgres.*") ],$target .'/share/');
 | 
				
			||||||
				   $target .'/share/');
 | 
					    CopySetOfFiles('SQL files', [ glob("src\\backend\\catalog\\*.sql") ],$target . '/share/');
 | 
				
			||||||
    CopySetOfFiles('SQL files', [ glob("src\\backend\\catalog\\*.sql") ], 
 | 
					 | 
				
			||||||
				   $target . '/share/');
 | 
					 | 
				
			||||||
    CopyFiles(
 | 
					    CopyFiles(
 | 
				
			||||||
        'Information schema data',
 | 
					        'Information schema data',
 | 
				
			||||||
        $target . '/share/',
 | 
					        $target . '/share/',
 | 
				
			||||||
@@ -94,12 +98,16 @@ sub Install
 | 
				
			|||||||
    GenerateConversionScript($target);
 | 
					    GenerateConversionScript($target);
 | 
				
			||||||
    GenerateTimezoneFiles($target,$conf);
 | 
					    GenerateTimezoneFiles($target,$conf);
 | 
				
			||||||
    GenerateTsearchFiles($target);
 | 
					    GenerateTsearchFiles($target);
 | 
				
			||||||
    CopySetOfFiles('Stopword files', 
 | 
					    CopySetOfFiles(
 | 
				
			||||||
				   [ glob ("src\\backend\\snowball\\stopwords\\*.stop") ], 
 | 
					        'Stopword files',
 | 
				
			||||||
				   $target . '/share/tsearch_data/');
 | 
					        [ glob("src\\backend\\snowball\\stopwords\\*.stop") ],
 | 
				
			||||||
    CopySetOfFiles('Dictionaries sample files', 
 | 
					        $target . '/share/tsearch_data/'
 | 
				
			||||||
				   [ glob ("src\\backend\\tsearch\\*_sample.*" ) ], 
 | 
					    );
 | 
				
			||||||
				   $target . '/share/tsearch_data/');
 | 
					    CopySetOfFiles(
 | 
				
			||||||
 | 
					        'Dictionaries sample files',
 | 
				
			||||||
 | 
					        [ glob("src\\backend\\tsearch\\*_sample.*") ],
 | 
				
			||||||
 | 
					        $target . '/share/tsearch_data/'
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
    CopyContribFiles($config,$target);
 | 
					    CopyContribFiles($config,$target);
 | 
				
			||||||
    CopyIncludeFiles($target);
 | 
					    CopyIncludeFiles($target);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -189,8 +197,10 @@ sub CopySolutionOutput
 | 
				
			|||||||
            # Static lib, such as libpgport, only used internally during build, don't install
 | 
					            # Static lib, such as libpgport, only used internally during build, don't install
 | 
				
			||||||
            next;
 | 
					            next;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        lcopy("$conf\\$pf\\$pf.$ext","$target\\$dir\\$pf.$ext") || croak "Could not copy $pf.$ext\n";
 | 
					        lcopy("$conf\\$pf\\$pf.$ext","$target\\$dir\\$pf.$ext")
 | 
				
			||||||
        lcopy("$conf\\$pf\\$pf.pdb","$target\\symbols\\$pf.pdb") || croak "Could not copy $pf.pdb\n";
 | 
					          || croak "Could not copy $pf.$ext\n";
 | 
				
			||||||
 | 
					        lcopy("$conf\\$pf\\$pf.pdb","$target\\symbols\\$pf.pdb")
 | 
				
			||||||
 | 
					          || croak "Could not copy $pf.pdb\n";
 | 
				
			||||||
        print ".";
 | 
					        print ".";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    print "\n";
 | 
					    print "\n";
 | 
				
			||||||
@@ -241,7 +251,8 @@ sub GenerateTimezoneFiles
 | 
				
			|||||||
    my @tzfiles = split /\s+/,$1;
 | 
					    my @tzfiles = split /\s+/,$1;
 | 
				
			||||||
    unshift @tzfiles,'';
 | 
					    unshift @tzfiles,'';
 | 
				
			||||||
    print "Generating timezone files...";
 | 
					    print "Generating timezone files...";
 | 
				
			||||||
    system("$conf\\zic\\zic -d \"$target/share/timezone\" " . join(" src/timezone/data/", @tzfiles));
 | 
					    system(
 | 
				
			||||||
 | 
					        "$conf\\zic\\zic -d \"$target/share/timezone\" " . join(" src/timezone/data/", @tzfiles));
 | 
				
			||||||
    print "\n";
 | 
					    print "\n";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -260,6 +271,7 @@ sub GenerateTsearchFiles
 | 
				
			|||||||
    open($F,">$target/share/snowball_create.sql")
 | 
					    open($F,">$target/share/snowball_create.sql")
 | 
				
			||||||
      || die "Could not write snowball_create.sql";
 | 
					      || die "Could not write snowball_create.sql";
 | 
				
			||||||
    print $F read_file('src/backend/snowball/snowball_func.sql.in');
 | 
					    print $F read_file('src/backend/snowball/snowball_func.sql.in');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while ($#pieces > 0)
 | 
					    while ($#pieces > 0)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        my $lang = shift @pieces || last;
 | 
					        my $lang = shift @pieces || last;
 | 
				
			||||||
@@ -267,7 +279,8 @@ sub GenerateTsearchFiles
 | 
				
			|||||||
        my $txt = $tmpl;
 | 
					        my $txt = $tmpl;
 | 
				
			||||||
        my $stop = '';
 | 
					        my $stop = '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (-s "src/backend/snowball/stopwords/$lang.stop") {
 | 
					        if (-s "src/backend/snowball/stopwords/$lang.stop")
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
            $stop = ", StopWords=$lang";
 | 
					            $stop = ", StopWords=$lang";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -383,9 +396,8 @@ sub CopyIncludeFiles
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    my $target = shift;
 | 
					    my $target = shift;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EnsureDirectories($target, 'include', 'include/libpq',
 | 
					    EnsureDirectories($target, 'include', 'include/libpq','include/internal',
 | 
				
			||||||
        'include/internal', 'include/internal/libpq',
 | 
					        'include/internal/libpq','include/server');
 | 
				
			||||||
        'include/server');
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    CopyFiles(
 | 
					    CopyFiles(
 | 
				
			||||||
        'Public headers',
 | 
					        'Public headers',
 | 
				
			||||||
@@ -395,9 +407,11 @@ sub CopyIncludeFiles
 | 
				
			|||||||
    lcopy('src/include/libpq/libpq-fs.h', $target . '/include/libpq/')
 | 
					    lcopy('src/include/libpq/libpq-fs.h', $target . '/include/libpq/')
 | 
				
			||||||
      || croak 'Could not copy libpq-fs.h';
 | 
					      || croak 'Could not copy libpq-fs.h';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    CopyFiles('Libpq headers',
 | 
					    CopyFiles(
 | 
				
			||||||
	      $target . '/include/', 'src/interfaces/libpq/',
 | 
					        'Libpq headers',
 | 
				
			||||||
	      'libpq-fe.h', 'libpq-events.h');
 | 
					        $target . '/include/',
 | 
				
			||||||
 | 
					        'src/interfaces/libpq/','libpq-fe.h', 'libpq-events.h'
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
    CopyFiles(
 | 
					    CopyFiles(
 | 
				
			||||||
        'Libpq internal headers',
 | 
					        'Libpq internal headers',
 | 
				
			||||||
        $target .'/include/internal/',
 | 
					        $target .'/include/internal/',
 | 
				
			||||||
@@ -417,9 +431,7 @@ sub CopyIncludeFiles
 | 
				
			|||||||
        $target . '/include/server/',
 | 
					        $target . '/include/server/',
 | 
				
			||||||
        'src/include/', 'pg_config.h', 'pg_config_os.h'
 | 
					        'src/include/', 'pg_config.h', 'pg_config_os.h'
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    CopySetOfFiles('', 
 | 
					    CopySetOfFiles('',[ glob("src\\include\\*.h") ],$target . '/include/server/');
 | 
				
			||||||
				   [ glob( "src\\include\\*.h" ) ], 
 | 
					 | 
				
			||||||
				   $target . '/include/server/');
 | 
					 | 
				
			||||||
    my $D;
 | 
					    my $D;
 | 
				
			||||||
    opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";
 | 
					    opendir($D, 'src/include') || croak "Could not opendir on src/include!\n";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -430,8 +442,7 @@ sub CopyIncludeFiles
 | 
				
			|||||||
        next unless (-d 'src/include/' . $d);
 | 
					        next unless (-d 'src/include/' . $d);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        EnsureDirectories($target . '/include/server', $d);
 | 
					        EnsureDirectories($target . '/include/server', $d);
 | 
				
			||||||
        system(
 | 
					        system("xcopy /s /i /q /r /y src\\include\\$d\\*.h \"$target\\include\\server\\$d\\\"")
 | 
				
			||||||
            "xcopy /s /i /q /r /y src\\include\\$d\\*.h \"$target\\include\\server\\$d\\\"")
 | 
					 | 
				
			||||||
          && croak("Failed to copy include directory $d\n");
 | 
					          && croak("Failed to copy include directory $d\n");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    closedir($D);
 | 
					    closedir($D);
 | 
				
			||||||
@@ -464,11 +475,15 @@ sub GenerateNLSFiles
 | 
				
			|||||||
    print "Installing NLS files...";
 | 
					    print "Installing NLS files...";
 | 
				
			||||||
    EnsureDirectories($target, "share/locale");
 | 
					    EnsureDirectories($target, "share/locale");
 | 
				
			||||||
    my @flist;
 | 
					    my @flist;
 | 
				
			||||||
	File::Find::find({wanted =>
 | 
					    File::Find::find(
 | 
				
			||||||
						  sub { /^nls\.mk\z/s &&
 | 
					        {
 | 
				
			||||||
									!push(@flist, $File::Find::name);
 | 
					            wanted =>sub {
 | 
				
			||||||
 | 
					                /^nls\.mk\z/s
 | 
				
			||||||
 | 
					                  &&!push(@flist, $File::Find::name);
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
				  }, "src");
 | 
					        },
 | 
				
			||||||
 | 
					        "src"
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
    foreach (@flist)
 | 
					    foreach (@flist)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        my $prgm = DetermineCatalogName($_);
 | 
					        my $prgm = DetermineCatalogName($_);
 | 
				
			||||||
@@ -484,8 +499,7 @@ sub GenerateNLSFiles
 | 
				
			|||||||
            EnsureDirectories($target, "share/locale/$lang", "share/locale/$lang/LC_MESSAGES");
 | 
					            EnsureDirectories($target, "share/locale/$lang", "share/locale/$lang/LC_MESSAGES");
 | 
				
			||||||
            system(
 | 
					            system(
 | 
				
			||||||
"\"$nlspath\\bin\\msgfmt\" -o \"$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo\" $_"
 | 
					"\"$nlspath\\bin\\msgfmt\" -o \"$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo\" $_"
 | 
				
			||||||
              )
 | 
					            )&& croak("Could not run msgfmt on $dir\\$_");
 | 
				
			||||||
              && croak("Could not run msgfmt on $dir\\$_");
 | 
					 | 
				
			||||||
            print ".";
 | 
					            print ".";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@ package Mkvcbuild;
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# Package that generates build files for msvc build
 | 
					# Package that generates build files for msvc build
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.53 2010/02/15 17:10:50 mha Exp $
 | 
					# $PostgreSQL: pgsql/src/tools/msvc/Mkvcbuild.pm,v 1.54 2010/04/09 13:05:58 mha Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
use Carp;
 | 
					use Carp;
 | 
				
			||||||
use Win32;
 | 
					use Win32;
 | 
				
			||||||
@@ -75,9 +75,12 @@ sub mkvcbuild
 | 
				
			|||||||
    $postgres->FullExportDLL('postgres.lib');
 | 
					    $postgres->FullExportDLL('postgres.lib');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    my $snowball = $solution->AddProject('dict_snowball','dll','','src\backend\snowball');
 | 
					    my $snowball = $solution->AddProject('dict_snowball','dll','','src\backend\snowball');
 | 
				
			||||||
    $snowball->RelocateFiles('src\backend\snowball\libstemmer', sub {
 | 
					    $snowball->RelocateFiles(
 | 
				
			||||||
 | 
					        'src\backend\snowball\libstemmer',
 | 
				
			||||||
 | 
					        sub {
 | 
				
			||||||
            return shift !~ /dict_snowball.c$/;
 | 
					            return shift !~ /dict_snowball.c$/;
 | 
				
			||||||
    });
 | 
					        }
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
    $snowball->AddIncludeDir('src\include\snowball');
 | 
					    $snowball->AddIncludeDir('src\include\snowball');
 | 
				
			||||||
    $snowball->AddReference($postgres);
 | 
					    $snowball->AddReference($postgres);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -133,8 +136,8 @@ sub mkvcbuild
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        $plperl->AddReference($postgres);
 | 
					        $plperl->AddReference($postgres);
 | 
				
			||||||
		my @perl_libs = grep {/perl\d+.lib$/ }
 | 
					        my @perl_libs =
 | 
				
			||||||
			glob($solution->{options}->{perl} . '\lib\CORE\perl*.lib');
 | 
					          grep {/perl\d+.lib$/ }glob($solution->{options}->{perl} . '\lib\CORE\perl*.lib');
 | 
				
			||||||
        if (@perl_libs == 1)
 | 
					        if (@perl_libs == 1)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            $plperl->AddLibrary($perl_libs[0]);
 | 
					            $plperl->AddLibrary($perl_libs[0]);
 | 
				
			||||||
@@ -147,14 +150,21 @@ sub mkvcbuild
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if ($solution->{options}->{python})
 | 
					    if ($solution->{options}->{python})
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Attempt to get python version and location. Assume python.exe in specified dir.
 | 
					        # Attempt to get python version and location. Assume python.exe in specified dir.
 | 
				
			||||||
        open(P, $solution->{options}->{python} . "\\python -c \"import sys;print(sys.prefix);print(str(sys.version_info[0])+str(sys.version_info[1]))\" |") || die "Could not query for python version!\n";
 | 
					        open(P,
 | 
				
			||||||
        my $pyprefix = <P>;chomp($pyprefix);
 | 
					            $solution->{options}->{python}
 | 
				
			||||||
        my $pyver = <P>;chomp($pyver);
 | 
					              . "\\python -c \"import sys;print(sys.prefix);print(str(sys.version_info[0])+str(sys.version_info[1]))\" |"
 | 
				
			||||||
 | 
					        ) || die "Could not query for python version!\n";
 | 
				
			||||||
 | 
					        my $pyprefix = <P>;
 | 
				
			||||||
 | 
					        chomp($pyprefix);
 | 
				
			||||||
 | 
					        my $pyver = <P>;
 | 
				
			||||||
 | 
					        chomp($pyver);
 | 
				
			||||||
        close(P);
 | 
					        close(P);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Sometimes (always?) if python is not present, the execution actually works, but gives no data...
 | 
					  # Sometimes (always?) if python is not present, the execution actually works, but gives no data...
 | 
				
			||||||
        die "Failed to query python for version information\n" if (!(defined($pyprefix) && defined($pyver)));
 | 
					        die "Failed to query python for version information\n"
 | 
				
			||||||
 | 
					          if (!(defined($pyprefix) && defined($pyver)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        my $plpython = $solution->AddProject('plpython','dll','PLs','src\pl\plpython');
 | 
					        my $plpython = $solution->AddProject('plpython','dll','PLs','src\pl\plpython');
 | 
				
			||||||
        $plpython->AddIncludeDir($pyprefix . '\include');
 | 
					        $plpython->AddIncludeDir($pyprefix . '\include');
 | 
				
			||||||
@@ -189,7 +199,8 @@ sub mkvcbuild
 | 
				
			|||||||
    $libpq->ReplaceFile('src\interfaces\libpq\libpqrc.c','src\interfaces\libpq\libpq.rc');
 | 
					    $libpq->ReplaceFile('src\interfaces\libpq\libpqrc.c','src\interfaces\libpq\libpq.rc');
 | 
				
			||||||
    $libpq->AddReference($libpgport);
 | 
					    $libpq->AddReference($libpgport);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    my $libpqwalreceiver = $solution->AddProject('libpqwalreceiver', 'dll', '', 'src\backend\replication\libpqwalreceiver');
 | 
					    my $libpqwalreceiver = $solution->AddProject('libpqwalreceiver', 'dll', '',
 | 
				
			||||||
 | 
					        'src\backend\replication\libpqwalreceiver');
 | 
				
			||||||
    $libpqwalreceiver->AddIncludeDir('src\interfaces\libpq');
 | 
					    $libpqwalreceiver->AddIncludeDir('src\interfaces\libpq');
 | 
				
			||||||
    $libpqwalreceiver->AddReference($postgres,$libpq);
 | 
					    $libpqwalreceiver->AddReference($postgres,$libpq);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@ package Project;
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# Package that encapsulates a Visual C++ project file generation
 | 
					# Package that encapsulates a Visual C++ project file generation
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# $PostgreSQL: pgsql/src/tools/msvc/Project.pm,v 1.25 2010/01/05 11:12:50 mha Exp $
 | 
					# $PostgreSQL: pgsql/src/tools/msvc/Project.pm,v 1.26 2010/04/09 13:05:58 mha Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
use Carp;
 | 
					use Carp;
 | 
				
			||||||
use strict;
 | 
					use strict;
 | 
				
			||||||
@@ -102,9 +102,11 @@ sub RemoveFile
 | 
				
			|||||||
sub RelocateFiles
 | 
					sub RelocateFiles
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    my ($self, $targetdir, $proc) = @_;
 | 
					    my ($self, $targetdir, $proc) = @_;
 | 
				
			||||||
    foreach my $f (keys %{$self->{files}}) {
 | 
					    foreach my $f (keys %{$self->{files}})
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
        my $r = &$proc($f);
 | 
					        my $r = &$proc($f);
 | 
				
			||||||
        if ($r) {
 | 
					        if ($r)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
            $self->RemoveFile($f);
 | 
					            $self->RemoveFile($f);
 | 
				
			||||||
            $self->AddFile($targetdir . '\\' . basename($f));
 | 
					            $self->AddFile($targetdir . '\\' . basename($f));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -405,7 +407,8 @@ EOF
 | 
				
			|||||||
            my $of = $f;
 | 
					            my $of = $f;
 | 
				
			||||||
            $of =~ s/\.l$/.c/;
 | 
					            $of =~ s/\.l$/.c/;
 | 
				
			||||||
            print F '>'
 | 
					            print F '>'
 | 
				
			||||||
              . $self->GenerateCustomTool('Running flex on ' . $f, 'src\tools\msvc\pgflex.bat ' . $f,$of)
 | 
					              . $self->GenerateCustomTool('Running flex on ' . $f,
 | 
				
			||||||
 | 
					                'src\tools\msvc\pgflex.bat ' . $f,$of)
 | 
				
			||||||
              . '</File>' . "\n";
 | 
					              . '</File>' . "\n";
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        elsif (defined($uniquefiles{$file}))
 | 
					        elsif (defined($uniquefiles{$file}))
 | 
				
			||||||
@@ -439,8 +442,8 @@ sub GenerateCustomTool
 | 
				
			|||||||
    my ($self, $desc, $tool, $output, $cfg) = @_;
 | 
					    my ($self, $desc, $tool, $output, $cfg) = @_;
 | 
				
			||||||
    if (!defined($cfg))
 | 
					    if (!defined($cfg))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return $self->GenerateCustomTool($desc, $tool, $output, 'Debug') .
 | 
					        return $self->GenerateCustomTool($desc, $tool, $output, 'Debug')
 | 
				
			||||||
          $self->GenerateCustomTool($desc, $tool, $output, 'Release');
 | 
					          .$self->GenerateCustomTool($desc, $tool, $output, 'Release');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return
 | 
					    return
 | 
				
			||||||
"<FileConfiguration Name=\"$cfg|$self->{platform}\"><Tool Name=\"VCCustomBuildTool\" Description=\"$desc\" CommandLine=\"$tool\" AdditionalDependencies=\"\" Outputs=\"$output\" /></FileConfiguration>";
 | 
					"<FileConfiguration Name=\"$cfg|$self->{platform}\"><Tool Name=\"VCCustomBuildTool\" Description=\"$desc\" CommandLine=\"$tool\" AdditionalDependencies=\"\" Outputs=\"$output\" /></FileConfiguration>";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@ package Solution;
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# Package that encapsulates a Visual C++ solution file generation
 | 
					# Package that encapsulates a Visual C++ solution file generation
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.56 2010/03/03 03:29:37 adunstan Exp $
 | 
					# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.57 2010/04/09 13:05:58 mha Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
use Carp;
 | 
					use Carp;
 | 
				
			||||||
use strict;
 | 
					use strict;
 | 
				
			||||||
@@ -22,6 +22,7 @@ sub new
 | 
				
			|||||||
        platform => undef,
 | 
					        platform => undef,
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    bless $self;
 | 
					    bless $self;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # integer_datetimes is now the default
 | 
					    # integer_datetimes is now the default
 | 
				
			||||||
    $options->{integer_datetimes} = 1
 | 
					    $options->{integer_datetimes} = 1
 | 
				
			||||||
      unless exists $options->{integer_datetimes};
 | 
					      unless exists $options->{integer_datetimes};
 | 
				
			||||||
@@ -61,11 +62,12 @@ sub DetermineToolVersions
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    my $self = shift;
 | 
					    my $self = shift;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Determine version of vcbuild command, to set proper verison of visual studio
 | 
					    # Determine version of vcbuild command, to set proper verison of visual studio
 | 
				
			||||||
    open(P,"vcbuild /? |") || die "vcbuild command not found";
 | 
					    open(P,"vcbuild /? |") || die "vcbuild command not found";
 | 
				
			||||||
    my $line = <P>;
 | 
					    my $line = <P>;
 | 
				
			||||||
    close(P);
 | 
					    close(P);
 | 
				
			||||||
    if ($line !~ /^Microsoft\s*\(R\) Visual C\+\+ Project Builder - \D+(\d+)\.00\.\d+/) {
 | 
					    if ($line !~ /^Microsoft\s*\(R\) Visual C\+\+ Project Builder - \D+(\d+)\.00\.\d+/)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
        die "Unable to determine vcbuild version from first line of output!";
 | 
					        die "Unable to determine vcbuild version from first line of output!";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if ($1 == 8) { $self->{vcver} = '8.00' }
 | 
					    if ($1 == 8) { $self->{vcver} = '8.00' }
 | 
				
			||||||
@@ -73,12 +75,14 @@ sub DetermineToolVersions
 | 
				
			|||||||
    else { die "Unsupported version of Visual Studio: $1" }
 | 
					    else { die "Unsupported version of Visual Studio: $1" }
 | 
				
			||||||
    print "Detected Visual Studio version $self->{vcver}\n";
 | 
					    print "Detected Visual Studio version $self->{vcver}\n";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Determine if we are in 32 or 64-bit mode. Do this by seeing if CL has
 | 
					    # Determine if we are in 32 or 64-bit mode. Do this by seeing if CL has
 | 
				
			||||||
# 64-bit only parameters.
 | 
					    # 64-bit only parameters.
 | 
				
			||||||
    $self->{platform} = 'Win32';
 | 
					    $self->{platform} = 'Win32';
 | 
				
			||||||
    open(P,"cl /? 2>NUL|") || die "cl command not found";
 | 
					    open(P,"cl /? 2>NUL|") || die "cl command not found";
 | 
				
			||||||
	while (<P>) {
 | 
					    while (<P>)
 | 
				
			||||||
		if (/^\/favor:</) {
 | 
					    {
 | 
				
			||||||
 | 
					        if (/^\/favor:</)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
            $self->{platform} = 'x64';
 | 
					            $self->{platform} = 'x64';
 | 
				
			||||||
            last;
 | 
					            last;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -87,7 +91,6 @@ sub DetermineToolVersions
 | 
				
			|||||||
    print "Detected hardware platform: $self->{platform}\n";
 | 
					    print "Detected hardware platform: $self->{platform}\n";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
# Return 1 if $oldfile is newer than $newfile, or if $newfile doesn't exist.
 | 
					# Return 1 if $oldfile is newer than $newfile, or if $newfile doesn't exist.
 | 
				
			||||||
# Special case - if config.pl has changed, always return 1
 | 
					# Special case - if config.pl has changed, always return 1
 | 
				
			||||||
sub IsNewer
 | 
					sub IsNewer
 | 
				
			||||||
@@ -95,8 +98,11 @@ sub IsNewer
 | 
				
			|||||||
    my ($newfile, $oldfile) = @_;
 | 
					    my ($newfile, $oldfile) = @_;
 | 
				
			||||||
    if ($oldfile ne 'src\tools\msvc\config.pl' && $oldfile ne 'src\tools\msvc\config_default.pl')
 | 
					    if ($oldfile ne 'src\tools\msvc\config.pl' && $oldfile ne 'src\tools\msvc\config_default.pl')
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        return 1 if (-f 'src\tools\msvc\config.pl') && IsNewer($newfile, 'src\tools\msvc\config.pl');
 | 
					        return 1
 | 
				
			||||||
        return 1 if (-f 'src\tools\msvc\config_default.pl') && IsNewer($newfile, 'src\tools\msvc\config_default.pl');
 | 
					          if (-f 'src\tools\msvc\config.pl') && IsNewer($newfile, 'src\tools\msvc\config.pl');
 | 
				
			||||||
 | 
					        return 1
 | 
				
			||||||
 | 
					          if (-f 'src\tools\msvc\config_default.pl')
 | 
				
			||||||
 | 
					          && IsNewer($newfile, 'src\tools\msvc\config_default.pl');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return 1 if (!(-e $newfile));
 | 
					    return 1 if (!(-e $newfile));
 | 
				
			||||||
    my @nstat = stat($newfile);
 | 
					    my @nstat = stat($newfile);
 | 
				
			||||||
@@ -174,12 +180,9 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        print O "#define BLCKSZ ",1024 * $self->{options}->{blocksize},"\n";
 | 
					        print O "#define BLCKSZ ",1024 * $self->{options}->{blocksize},"\n";
 | 
				
			||||||
        print O "#define RELSEG_SIZE ",
 | 
					        print O "#define RELSEG_SIZE ",
 | 
				
			||||||
			(1024 / $self->{options}->{blocksize}) * 
 | 
					          (1024 / $self->{options}->{blocksize}) *$self->{options}->{segsize} * 1024, "\n";
 | 
				
			||||||
				$self->{options}->{segsize} * 1024, "\n";
 | 
					        print O "#define XLOG_BLCKSZ ",1024 * $self->{options}->{wal_blocksize},"\n";
 | 
				
			||||||
		print O "#define XLOG_BLCKSZ ",
 | 
					        print O "#define XLOG_SEG_SIZE (",$self->{options}->{wal_segsize}," * 1024 * 1024)\n";
 | 
				
			||||||
			1024 * $self->{options}->{wal_blocksize},"\n";
 | 
					 | 
				
			||||||
		print O "#define XLOG_SEG_SIZE (",
 | 
					 | 
				
			||||||
			$self->{options}->{wal_segsize}," * 1024 * 1024)\n";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if ($self->{options}->{float4byval})
 | 
					        if ($self->{options}->{float4byval})
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -235,10 +238,23 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
 | 
				
			|||||||
        close(I);
 | 
					        close(I);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $self->GenerateDefFile("src\\interfaces\\libpq\\libpqdll.def","src\\interfaces\\libpq\\exports.txt","LIBPQ");
 | 
					    $self->GenerateDefFile("src\\interfaces\\libpq\\libpqdll.def",
 | 
				
			||||||
    $self->GenerateDefFile("src\\interfaces\\ecpg\\ecpglib\\ecpglib.def","src\\interfaces\\ecpg\\ecpglib\\exports.txt","LIBECPG");
 | 
					        "src\\interfaces\\libpq\\exports.txt","LIBPQ");
 | 
				
			||||||
    $self->GenerateDefFile("src\\interfaces\\ecpg\\compatlib\\compatlib.def","src\\interfaces\\ecpg\\compatlib\\exports.txt","LIBECPG_COMPAT");
 | 
					    $self->GenerateDefFile(
 | 
				
			||||||
    $self->GenerateDefFile("src\\interfaces\\ecpg\\pgtypeslib\\pgtypeslib.def","src\\interfaces\\ecpg\\pgtypeslib\\exports.txt","LIBPGTYPES");
 | 
					        "src\\interfaces\\ecpg\\ecpglib\\ecpglib.def",
 | 
				
			||||||
 | 
					        "src\\interfaces\\ecpg\\ecpglib\\exports.txt",
 | 
				
			||||||
 | 
					        "LIBECPG"
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					    $self->GenerateDefFile(
 | 
				
			||||||
 | 
					        "src\\interfaces\\ecpg\\compatlib\\compatlib.def",
 | 
				
			||||||
 | 
					        "src\\interfaces\\ecpg\\compatlib\\exports.txt",
 | 
				
			||||||
 | 
					        "LIBECPG_COMPAT"
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					    $self->GenerateDefFile(
 | 
				
			||||||
 | 
					        "src\\interfaces\\ecpg\\pgtypeslib\\pgtypeslib.def",
 | 
				
			||||||
 | 
					        "src\\interfaces\\ecpg\\pgtypeslib\\exports.txt",
 | 
				
			||||||
 | 
					        "LIBPGTYPES"
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (IsNewer('src\backend\utils\fmgrtab.c','src\include\catalog\pg_proc.h'))
 | 
					    if (IsNewer('src\backend\utils\fmgrtab.c','src\include\catalog\pg_proc.h'))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@@ -252,7 +268,9 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
 | 
				
			|||||||
    if (IsNewer('src\include\utils\probes.h','src\backend\utils\probes.d'))
 | 
					    if (IsNewer('src\include\utils\probes.h','src\backend\utils\probes.d'))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        print "Generating probes.h...\n";
 | 
					        print "Generating probes.h...\n";
 | 
				
			||||||
		system('psed -f src\backend\utils\Gen_dummy_probes.sed src\backend\utils\probes.d > src\include\utils\probes.h'); 
 | 
					        system(
 | 
				
			||||||
 | 
					'psed -f src\backend\utils\Gen_dummy_probes.sed src\backend\utils\probes.d > src\include\utils\probes.h'
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (IsNewer('src\interfaces\libpq\libpq.rc','src\interfaces\libpq\libpq.rc.in'))
 | 
					    if (IsNewer('src\interfaces\libpq\libpq.rc','src\interfaces\libpq\libpq.rc.in'))
 | 
				
			||||||
@@ -279,12 +297,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
 | 
				
			|||||||
        chdir('..\..\..');
 | 
					        chdir('..\..\..');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (
 | 
					    if (IsNewer('src\interfaces\ecpg\preproc\preproc.y','src\backend\parser\gram.y'))
 | 
				
			||||||
        IsNewer(
 | 
					 | 
				
			||||||
            'src\interfaces\ecpg\preproc\preproc.y',
 | 
					 | 
				
			||||||
            'src\backend\parser\gram.y'
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
      )
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        print "Generating preproc.y...\n";
 | 
					        print "Generating preproc.y...\n";
 | 
				
			||||||
        chdir('src\interfaces\ecpg\preproc');
 | 
					        chdir('src\interfaces\ecpg\preproc');
 | 
				
			||||||
@@ -346,7 +359,9 @@ EOF
 | 
				
			|||||||
            print "Generating postgres.bki and schemapg.h...\n";
 | 
					            print "Generating postgres.bki and schemapg.h...\n";
 | 
				
			||||||
            chdir('src\backend\catalog');
 | 
					            chdir('src\backend\catalog');
 | 
				
			||||||
            my $bki_srcs = join(' ../../../src/include/catalog/', @allbki);
 | 
					            my $bki_srcs = join(' ../../../src/include/catalog/', @allbki);
 | 
				
			||||||
            system("perl genbki.pl -I../../../src/include/catalog --set-version=$self->{majorver} $bki_srcs");
 | 
					            system(
 | 
				
			||||||
 | 
					"perl genbki.pl -I../../../src/include/catalog --set-version=$self->{majorver} $bki_srcs"
 | 
				
			||||||
 | 
					            );
 | 
				
			||||||
            chdir('..\..\..');
 | 
					            chdir('..\..\..');
 | 
				
			||||||
            copyFile('src\backend\catalog\schemapg.h', 'src\include\catalog\schemapg.h');
 | 
					            copyFile('src\backend\catalog\schemapg.h', 'src\include\catalog\schemapg.h');
 | 
				
			||||||
            last;
 | 
					            last;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# -*-perl-*- hey - emacs - this is a perl file
 | 
					# -*-perl-*- hey - emacs - this is a perl file
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# $PostgreSQL: pgsql/src/tools/msvc/build.pl,v 1.2 2010/01/05 13:31:58 mha Exp $
 | 
					# $PostgreSQL: pgsql/src/tools/msvc/build.pl,v 1.3 2010/04/09 13:05:58 mha Exp $
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@@ -29,7 +29,6 @@ elsif (-e "./buildenv.pl" )
 | 
				
			|||||||
    require "./buildenv.pl";
 | 
					    require "./buildenv.pl";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
# set up the project
 | 
					# set up the project
 | 
				
			||||||
our $config;
 | 
					our $config;
 | 
				
			||||||
require "config_default.pl";
 | 
					require "config_default.pl";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,12 +1,13 @@
 | 
				
			|||||||
my @def;
 | 
					my @def;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Script that generates a .DEF file for all objects in a directory
 | 
					# Script that generates a .DEF file for all objects in a directory
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# $PostgreSQL: pgsql/src/tools/msvc/gendef.pl,v 1.9 2010/01/01 17:34:25 mha Exp $
 | 
					# $PostgreSQL: pgsql/src/tools/msvc/gendef.pl,v 1.10 2010/04/09 13:05:58 mha Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
die "Usage: gendef.pl <modulepath> <platform>\n" unless
 | 
					die "Usage: gendef.pl <modulepath> <platform>\n"
 | 
				
			||||||
   (($ARGV[0] =~ /\\([^\\]+$)/) && ($ARGV[1] == 'Win32' || $ARGV[1] == 'x64'));
 | 
					  unless(($ARGV[0] =~ /\\([^\\]+$)/) && ($ARGV[1] == 'Win32' || $ARGV[1] == 'x64'));
 | 
				
			||||||
my $defname = uc $1;
 | 
					my $defname = uc $1;
 | 
				
			||||||
my $platform = $ARGV[1];
 | 
					my $platform = $ARGV[1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# -*-perl-*- hey - emacs - this is a perl file
 | 
					# -*-perl-*- hey - emacs - this is a perl file
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# $PostgreSQL: pgsql/src/tools/msvc/vcregress.pl,v 1.14 2010/03/02 17:06:51 adunstan Exp $
 | 
					# $PostgreSQL: pgsql/src/tools/msvc/vcregress.pl,v 1.15 2010/04/09 13:05:58 mha Exp $
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use strict;
 | 
					use strict;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -86,12 +86,9 @@ exit 0;
 | 
				
			|||||||
sub installcheck
 | 
					sub installcheck
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    my @args = (
 | 
					    my @args = (
 | 
				
			||||||
        "../../../$Config/pg_regress/pg_regress",
 | 
					        "../../../$Config/pg_regress/pg_regress","--dlpath=.",
 | 
				
			||||||
        "--dlpath=.",
 | 
					        "--psqldir=../../../$Config/psql","--schedule=${schedule}_schedule",
 | 
				
			||||||
        "--psqldir=../../../$Config/psql",
 | 
					        "--multibyte=SQL_ASCII","--no-locale"
 | 
				
			||||||
        "--schedule=${schedule}_schedule",
 | 
					 | 
				
			||||||
        "--multibyte=SQL_ASCII",
 | 
					 | 
				
			||||||
        "--no-locale"
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    push(@args,$maxconn) if $maxconn;
 | 
					    push(@args,$maxconn) if $maxconn;
 | 
				
			||||||
    system(@args);
 | 
					    system(@args);
 | 
				
			||||||
@@ -102,14 +99,10 @@ sub installcheck
 | 
				
			|||||||
sub check
 | 
					sub check
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    my @args = (
 | 
					    my @args = (
 | 
				
			||||||
        "../../../$Config/pg_regress/pg_regress",
 | 
					        "../../../$Config/pg_regress/pg_regress","--dlpath=.",
 | 
				
			||||||
        "--dlpath=.",
 | 
					        "--psqldir=../../../$Config/psql","--schedule=${schedule}_schedule",
 | 
				
			||||||
        "--psqldir=../../../$Config/psql",
 | 
					        "--multibyte=SQL_ASCII","--no-locale",
 | 
				
			||||||
        "--schedule=${schedule}_schedule",
 | 
					        "--temp-install=./tmp_check","--top-builddir=\"$topdir\""
 | 
				
			||||||
        "--multibyte=SQL_ASCII",
 | 
					 | 
				
			||||||
        "--no-locale",
 | 
					 | 
				
			||||||
        "--temp-install=./tmp_check",
 | 
					 | 
				
			||||||
        "--top-builddir=\"$topdir\""
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    push(@args,$maxconn) if $maxconn;
 | 
					    push(@args,$maxconn) if $maxconn;
 | 
				
			||||||
    push(@args,$temp_config) if $temp_config;
 | 
					    push(@args,$temp_config) if $temp_config;
 | 
				
			||||||
@@ -153,13 +146,14 @@ sub plcheck
 | 
				
			|||||||
        my $lang = $pl eq 'tcl' ? 'pltcl' : $pl;
 | 
					        my $lang = $pl eq 'tcl' ? 'pltcl' : $pl;
 | 
				
			||||||
        next unless -d "../../$Config/$lang";
 | 
					        next unless -d "../../$Config/$lang";
 | 
				
			||||||
        $lang = 'plpythonu' if $lang eq 'plpython';
 | 
					        $lang = 'plpythonu' if $lang eq 'plpython';
 | 
				
			||||||
		my @lang_args = ( "--load-language=$lang" );
 | 
					        my @lang_args = ("--load-language=$lang");
 | 
				
			||||||
        chdir $pl;
 | 
					        chdir $pl;
 | 
				
			||||||
        my @tests = fetchTests();
 | 
					        my @tests = fetchTests();
 | 
				
			||||||
        if ($lang eq 'plperl')
 | 
					        if ($lang eq 'plperl')
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # run both trusted and untrusted perl tests
 | 
					            # run both trusted and untrusted perl tests
 | 
				
			||||||
			push (@lang_args, "--load-language=plperlu");
 | 
					            push(@lang_args, "--load-language=plperlu");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # assume we're using this perl to built postgres
 | 
					            # assume we're using this perl to built postgres
 | 
				
			||||||
            # test if we can run two interpreters in one backend, and if so
 | 
					            # test if we can run two interpreters in one backend, and if so
 | 
				
			||||||
@@ -192,10 +186,11 @@ sub contribcheck
 | 
				
			|||||||
    my $mstat = 0;
 | 
					    my $mstat = 0;
 | 
				
			||||||
    foreach my $module (glob("*"))
 | 
					    foreach my $module (glob("*"))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
		next if ($module eq 'xml2' && ! $config->{xml});
 | 
					        next if ($module eq 'xml2' && !$config->{xml});
 | 
				
			||||||
        next unless -d "$module/sql" && 
 | 
					        next
 | 
				
			||||||
			-d "$module/expected" && 
 | 
					          unless -d "$module/sql"
 | 
				
			||||||
			(-f "$module/GNUmakefile" || -f "$module/Makefile");
 | 
					              &&-d "$module/expected"
 | 
				
			||||||
 | 
					              &&(-f "$module/GNUmakefile" || -f "$module/Makefile");
 | 
				
			||||||
        chdir $module;
 | 
					        chdir $module;
 | 
				
			||||||
        print "============================================================\n";
 | 
					        print "============================================================\n";
 | 
				
			||||||
        print "Checking $module\n";
 | 
					        print "Checking $module\n";
 | 
				
			||||||
@@ -226,6 +221,7 @@ sub fetchRegressOpts
 | 
				
			|||||||
    my @opts;
 | 
					    my @opts;
 | 
				
			||||||
    if ($m =~ /^\s*REGRESS_OPTS\s*=(.*)/m)
 | 
					    if ($m =~ /^\s*REGRESS_OPTS\s*=(.*)/m)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # ignore options that use makefile variables - can't handle those
 | 
					        # ignore options that use makefile variables - can't handle those
 | 
				
			||||||
        # ignore anything that isn't an option staring with --
 | 
					        # ignore anything that isn't an option staring with --
 | 
				
			||||||
        @opts = grep { $_ !~ /\$\(/ && $_ =~ /^--/ } split(/\s+/,$1);
 | 
					        @opts = grep { $_ !~ /\$\(/ && $_ =~ /^--/ } split(/\s+/,$1);
 | 
				
			||||||
@@ -288,6 +284,6 @@ sub usage
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    print STDERR
 | 
					    print STDERR
 | 
				
			||||||
      "Usage: vcregress.pl ",
 | 
					      "Usage: vcregress.pl ",
 | 
				
			||||||
		"<check|installcheck|plcheck|contribcheck|ecpgcheck> [schedule]\n" ;
 | 
					      "<check|installcheck|plcheck|contribcheck|ecpgcheck> [schedule]\n";
 | 
				
			||||||
    exit(1);
 | 
					    exit(1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user