summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorNoah Misch2016-06-12 08:19:56 +0000
committerNoah Misch2016-06-12 08:19:56 +0000
commit3be0a62ffe58f0753d190cbe22acbeb8b4926b85 (patch)
tree6da431545c91d5f54d56b38208e8f946dcdbd6b4 /src/tools
parentb098abf90537edf0ce9c70e8eb55320baf6e445d (diff)
Finish pgindent run for 9.6: Perl files.
Diffstat (limited to 'src/tools')
-rwxr-xr-xsrc/tools/copyright.pl4
-rwxr-xr-xsrc/tools/git_changelog42
-rw-r--r--src/tools/msvc/Install.pm3
-rw-r--r--src/tools/msvc/Mkvcbuild.pm22
-rw-r--r--src/tools/msvc/Solution.pm16
-rw-r--r--src/tools/msvc/build.pl3
-rw-r--r--src/tools/msvc/config_default.pl2
-rw-r--r--src/tools/msvc/pgflex.pl4
-rw-r--r--src/tools/msvc/vcregress.pl39
9 files changed, 71 insertions, 64 deletions
diff --git a/src/tools/copyright.pl b/src/tools/copyright.pl
index 07d260b0b1b..aab162ed753 100755
--- a/src/tools/copyright.pl
+++ b/src/tools/copyright.pl
@@ -16,8 +16,8 @@ use File::Find;
use File::Basename;
use Tie::File;
-my $pgdg = 'PostgreSQL Global Development Group';
-my $cc = 'Copyright \(c\)';
+my $pgdg = 'PostgreSQL Global Development Group';
+my $cc = 'Copyright \(c\)';
my $ccliteral = 'Copyright (c)';
# year-1900 is what localtime(time) puts in element 5
diff --git a/src/tools/git_changelog b/src/tools/git_changelog
index 8d770162275..c9a503f3fe0 100755
--- a/src/tools/git_changelog
+++ b/src/tools/git_changelog
@@ -66,24 +66,24 @@ my @BRANCHES = qw(master
# Might want to make this parameter user-settable.
my $timestamp_slop = 24 * 60 * 60;
-my $brief = 0;
-my $details_after = 0;
-my $post_date = 0;
-my $master_only = 0;
+my $brief = 0;
+my $details_after = 0;
+my $post_date = 0;
+my $master_only = 0;
my $non_master_only = 0;
-my $oldest_first = 0;
+my $oldest_first = 0;
my $since;
my @output_buffer;
my $output_line = '';
Getopt::Long::GetOptions(
- 'brief' => \$brief,
- 'details-after' => \$details_after,
- 'master-only' => \$master_only,
+ 'brief' => \$brief,
+ 'details-after' => \$details_after,
+ 'master-only' => \$master_only,
'non-master-only' => \$non_master_only,
- 'post-date' => \$post_date,
- 'oldest-first' => \$oldest_first,
- 'since=s' => \$since) || usage();
+ 'post-date' => \$post_date,
+ 'oldest-first' => \$oldest_first,
+ 'since=s' => \$since) || usage();
usage() if @ARGV;
my @git = qw(git log --format=fuller --date=iso);
@@ -250,7 +250,7 @@ while (1)
if ($master_only)
{
$print_it = (@{ $winner->{'commits'} } == 1)
- && ($winner->{'commits'}[0]->{'branch'} eq 'master');
+ && ($winner->{'commits'}[0]->{'branch'} eq 'master');
}
elsif ($non_master_only)
{
@@ -374,20 +374,20 @@ sub output_details
{
$item->{'message'} =~ m/^\s*(.*)/;
- output_str("%s [%s] %s\n",
- substr($c->{'date'}, 0, 10),
- substr($c->{'commit'}, 0, 9),
- substr($1, 0, 56));
+ output_str(
+ "%s [%s] %s\n",
+ substr($c->{'date'}, 0, 10),
+ substr($c->{'commit'}, 0, 9),
+ substr($1, 0, 56));
}
else
{
output_str("Branch: %s ", $c->{'branch'})
- if (!$master_only);
+ if (!$master_only);
output_str("Release: %s ", $c->{'last_tag'})
- if (defined $c->{'last_tag'});
- output_str("[%s] %s\n",
- substr($c->{'commit'}, 0, 9),
- $c->{'date'});
+ if (defined $c->{'last_tag'});
+ output_str("[%s] %s\n", substr($c->{'commit'}, 0, 9),
+ $c->{'date'});
}
}
output_str("\n");
diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm
index 3c36c5df13e..031719d5d8e 100644
--- a/src/tools/msvc/Install.pm
+++ b/src/tools/msvc/Install.pm
@@ -582,7 +582,8 @@ sub CopyIncludeFiles
'Public headers', $target . '/include/',
'src/include/', 'postgres_ext.h',
'pg_config.h', 'pg_config_ext.h',
- 'pg_config_os.h', 'dynloader.h', 'pg_config_manual.h');
+ 'pg_config_os.h', 'dynloader.h',
+ 'pg_config_manual.h');
lcopy('src/include/libpq/libpq-fs.h', $target . '/include/libpq/')
|| croak 'Could not copy libpq-fs.h';
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index e7268cb2ed3..fe905d3c9d1 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -41,9 +41,12 @@ my $contrib_extrasource = {
'cube' => [ 'contrib/cube/cubescan.l', 'contrib/cube/cubeparse.y' ],
'seg' => [ 'contrib/seg/segscan.l', 'contrib/seg/segparse.y' ], };
my @contrib_excludes = (
- 'commit_ts', 'hstore_plperl', 'hstore_plpython', 'intagg',
- 'ltree_plpython', 'pgcrypto', 'sepgsql', 'brin',
- 'test_extensions', 'test_pg_dump', 'snapshot_too_old');
+ 'commit_ts', 'hstore_plperl',
+ 'hstore_plpython', 'intagg',
+ 'ltree_plpython', 'pgcrypto',
+ 'sepgsql', 'brin',
+ 'test_extensions', 'test_pg_dump',
+ 'snapshot_too_old');
# Set of variables for frontend modules
my $frontend_defines = { 'initdb' => 'FRONTEND' };
@@ -63,9 +66,9 @@ my $frontend_extralibs = {
'psql' => ['ws2_32.lib'] };
my $frontend_extraincludes = {
'initdb' => ['src/timezone'],
- 'psql' => [ 'src/backend' ] };
+ 'psql' => ['src/backend'] };
my $frontend_extrasource = {
- 'psql' => [ 'src/bin/psql/psqlscanslash.l' ],
+ 'psql' => ['src/bin/psql/psqlscanslash.l'],
'pgbench' =>
[ 'src/bin/pgbench/exprscan.l', 'src/bin/pgbench/exprparse.y' ] };
my @frontend_excludes = (
@@ -155,8 +158,10 @@ sub mkvcbuild
$postgres->AddFiles('src/backend/bootstrap', 'bootscanner.l',
'bootparse.y');
$postgres->AddFiles('src/backend/utils/misc', 'guc-file.l');
- $postgres->AddFiles('src/backend/replication', 'repl_scanner.l',
- 'repl_gram.y', 'syncrep_scanner.l', 'syncrep_gram.y');
+ $postgres->AddFiles(
+ 'src/backend/replication', 'repl_scanner.l',
+ 'repl_gram.y', 'syncrep_scanner.l',
+ 'syncrep_gram.y');
$postgres->AddDefine('BUILDING_DLL');
$postgres->AddLibrary('secur32.lib');
$postgres->AddLibrary('ws2_32.lib');
@@ -625,8 +630,7 @@ sub mkvcbuild
}
}
$proj->AddIncludeDir('src/interfaces/libpq');
- $proj->AddReference($libpq, $libpgfeutils, $libpgcommon,
- $libpgport);
+ $proj->AddReference($libpq, $libpgfeutils, $libpgcommon, $libpgport);
$proj->AddDirResourceFile('src/bin/scripts');
$proj->AddLibrary('ws2_32.lib');
}
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index 43620c249fa..f07029bce16 100644
--- a/src/tools/msvc/Solution.pm
+++ b/src/tools/msvc/Solution.pm
@@ -286,7 +286,8 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
}
if (IsNewer(
- 'src/include/storage/lwlocknames.h', 'src/backend/storage/lmgr/lwlocknames.txt'))
+ 'src/include/storage/lwlocknames.h',
+ 'src/backend/storage/lmgr/lwlocknames.txt'))
{
print "Generating lwlocknames.c and lwlocknames.h...\n";
chdir('src/backend/storage/lmgr');
@@ -297,13 +298,13 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
'src/include/storage/lwlocknames.h',
'src/backend/storage/lmgr/lwlocknames.h'))
{
- copyFile('src/backend/storage/lmgr/lwlocknames.h',
+ copyFile(
+ 'src/backend/storage/lmgr/lwlocknames.h',
'src/include/storage/lwlocknames.h');
}
if (IsNewer(
- 'src/include/dynloader.h',
- 'src/backend/port/dynloader/win32.h'))
+ 'src/include/dynloader.h', 'src/backend/port/dynloader/win32.h'))
{
copyFile('src/backend/port/dynloader/win32.h',
'src/include/dynloader.h');
@@ -352,8 +353,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY
if ($self->{options}->{tcl}
&& IsNewer(
- 'src/pl/tcl/pltclerrcodes.h',
- 'src/backend/utils/errcodes.txt'))
+ 'src/pl/tcl/pltclerrcodes.h', 'src/backend/utils/errcodes.txt'))
{
print "Generating pltclerrcodes.h...\n";
system(
@@ -653,9 +653,9 @@ sub GetFakeConfigure
$cfg .= ' --enable-cassert' if ($self->{options}->{asserts});
$cfg .= ' --enable-integer-datetimes'
if ($self->{options}->{integer_datetimes});
- $cfg .= ' --enable-nls' if ($self->{options}->{nls});
+ $cfg .= ' --enable-nls' if ($self->{options}->{nls});
$cfg .= ' --enable-tap-tests' if ($self->{options}->{tap_tests});
- $cfg .= ' --with-ldap' if ($self->{options}->{ldap});
+ $cfg .= ' --with-ldap' if ($self->{options}->{ldap});
$cfg .= ' --without-zlib' unless ($self->{options}->{zlib});
$cfg .= ' --with-extra-version' if ($self->{options}->{extraver});
$cfg .= ' --with-openssl' if ($self->{options}->{openssl});
diff --git a/src/tools/msvc/build.pl b/src/tools/msvc/build.pl
index c4e4dc79a34..007e3c73b25 100644
--- a/src/tools/msvc/build.pl
+++ b/src/tools/msvc/build.pl
@@ -53,7 +53,8 @@ elsif (uc($ARGV[0]) ne "RELEASE")
if ($buildwhat and $vcver >= 10.00)
{
system(
-"msbuild $buildwhat.vcxproj /verbosity:normal /p:Configuration=$bconf");
+ "msbuild $buildwhat.vcxproj /verbosity:normal /p:Configuration=$bconf"
+ );
}
elsif ($buildwhat)
{
diff --git a/src/tools/msvc/config_default.pl b/src/tools/msvc/config_default.pl
index 33631b486b2..f046687bd06 100644
--- a/src/tools/msvc/config_default.pl
+++ b/src/tools/msvc/config_default.pl
@@ -3,7 +3,7 @@ use strict;
use warnings;
our $config = {
- asserts => 0, # --enable-cassert
+ asserts => 0, # --enable-cassert
# integer_datetimes=>1, # --enable-integer-datetimes - on is now default
# float4byval=>1, # --disable-float4-byval, on by default
diff --git a/src/tools/msvc/pgflex.pl b/src/tools/msvc/pgflex.pl
index 0410e3aa02b..474ce63e5ca 100644
--- a/src/tools/msvc/pgflex.pl
+++ b/src/tools/msvc/pgflex.pl
@@ -16,8 +16,8 @@ my ($flexver) = `flex -V`; # grab first line
$flexver = (split(/\s+/, $flexver))[1];
$flexver =~ s/[^0-9.]//g;
my @verparts = split(/\./, $flexver);
-unless ($verparts[0] == 2 &&
- ($verparts[1] > 5 || ($verparts[1] == 5 && $verparts[2] >= 31)))
+unless ($verparts[0] == 2
+ && ($verparts[1] > 5 || ($verparts[1] == 5 && $verparts[2] >= 31)))
{
print "WARNING! Flex install not found, or unsupported Flex version.\n";
print "echo Attempting to build without.\n";
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index 52c403791d9..075279a00e7 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -184,11 +184,11 @@ sub tap_check
my $dir = shift;
chdir $dir;
- my @args = ( "prove", "--verbose", "t/*.pl");
+ my @args = ("prove", "--verbose", "t/*.pl");
# adjust the environment for just this test
local %ENV = %ENV;
- $ENV{PERL5LIB} = "$topdir/src/test/perl;$ENV{PERL5LIB}";
+ $ENV{PERL5LIB} = "$topdir/src/test/perl;$ENV{PERL5LIB}";
$ENV{PG_REGRESS} = "$topdir/$Config/pg_regress/pg_regress";
$ENV{TESTDIR} = "$dir";
@@ -332,6 +332,7 @@ sub contribcheck
my $mstat = 0;
foreach my $module (glob("*"))
{
+
# these configuration-based exclusions must match Install.pm
next if ($module eq "uuid-ossp" && !defined($config->{uuid}));
next if ($module eq "sslinfo" && !defined($config->{openssl}));
@@ -365,8 +366,8 @@ sub recoverycheck
{
InstallTemp();
- my $mstat = 0;
- my $dir = "$topdir/src/test/recovery";
+ my $mstat = 0;
+ my $dir = "$topdir/src/test/recovery";
my $status = tap_check($dir);
exit $status if $status;
}
@@ -547,20 +548,20 @@ sub InstallTemp
sub usage
{
print STDERR
- "Usage: vcregress.pl <mode> [ <schedule> ]\n\n",
- "Options for <mode>:\n",
- " bincheck run tests of utilities in src/bin/\n",
- " check deploy instance and run regression tests on it\n",
- " contribcheck run tests of modules in contrib/\n",
- " ecpgcheck run regression tests of ECPG\n",
- " installcheck run regression tests on existing instance\n",
- " isolationcheck run isolation tests\n",
- " modulescheck run tests of modules in src/test/modules/\n",
- " plcheck run tests of PL languages\n",
- " recoverycheck run recovery test suite\n",
- " upgradecheck run tests of pg_upgrade\n",
- "\nOptions for <schedule>:\n",
- " serial serial mode\n",
- " parallel parallel mode\n";
+ "Usage: vcregress.pl <mode> [ <schedule> ]\n\n",
+ "Options for <mode>:\n",
+ " bincheck run tests of utilities in src/bin/\n",
+ " check deploy instance and run regression tests on it\n",
+ " contribcheck run tests of modules in contrib/\n",
+ " ecpgcheck run regression tests of ECPG\n",
+ " installcheck run regression tests on existing instance\n",
+ " isolationcheck run isolation tests\n",
+ " modulescheck run tests of modules in src/test/modules/\n",
+ " plcheck run tests of PL languages\n",
+ " recoverycheck run recovery test suite\n",
+ " upgradecheck run tests of pg_upgrade\n",
+ "\nOptions for <schedule>:\n",
+ " serial serial mode\n",
+ " parallel parallel mode\n";
exit(1);
}