summaryrefslogtreecommitdiff
path: root/src/tools/msvc/Project.pm
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2010-04-09 13:05:58 +0000
committerMagnus Hagander <magnus@hagander.net>2010-04-09 13:05:58 +0000
commit93f35f0955f4a9c7bda191f80e3b64ba509ce923 (patch)
tree5e5c9926c78097a5d74d987261374c4cc999e284 /src/tools/msvc/Project.pm
parent7c606375650e867bc768f93c037b5c0f981565aa (diff)
Perltidy run over the MSVC build system files, to clean up code formatting
and indentation styles.
Diffstat (limited to 'src/tools/msvc/Project.pm')
-rw-r--r--src/tools/msvc/Project.pm29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm
index 8eee8c11875..aa9c123da65 100644
--- a/src/tools/msvc/Project.pm
+++ b/src/tools/msvc/Project.pm
@@ -3,7 +3,7 @@ package Project;
#
# 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 strict;
@@ -102,11 +102,13 @@ sub RemoveFile
sub RelocateFiles
{
my ($self, $targetdir, $proc) = @_;
- foreach my $f (keys %{$self->{files}}) {
+ foreach my $f (keys %{$self->{files}})
+ {
my $r = &$proc($f);
- if ($r) {
- $self->RemoveFile($f);
- $self->AddFile($targetdir . '\\' . basename($f));
+ if ($r)
+ {
+ $self->RemoveFile($f);
+ $self->AddFile($targetdir . '\\' . basename($f));
}
}
}
@@ -125,10 +127,10 @@ sub AddReference
sub AddLibrary
{
my ($self, $lib, $dbgsuffix) = @_;
-
+
if ($lib =~ m/\s/)
{
- $lib = '&quot;' . $lib . "&quot;";
+ $lib = '&quot;' . $lib . "&quot;";
}
push @{$self->{libraries}}, $lib;
@@ -348,9 +350,9 @@ sub Save
$self->FullExportDLL($self->{name} . ".lib");
}
- # Warning 4197 is about double exporting, disable this per
- # http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99193
- $self->DisableLinkerWarnings('4197') if ($self->{platform} eq 'x64');
+ # Warning 4197 is about double exporting, disable this per
+ # http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99193
+ $self->DisableLinkerWarnings('4197') if ($self->{platform} eq 'x64');
# Dump the project
open(F, ">$self->{name}.vcproj") || croak("Could not write to $self->{name}.vcproj\n");
@@ -405,7 +407,8 @@ EOF
my $of = $f;
$of =~ s/\.l$/.c/;
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";
}
elsif (defined($uniquefiles{$file}))
@@ -439,8 +442,8 @@ sub GenerateCustomTool
my ($self, $desc, $tool, $output, $cfg) = @_;
if (!defined($cfg))
{
- return $self->GenerateCustomTool($desc, $tool, $output, 'Debug') .
- $self->GenerateCustomTool($desc, $tool, $output, 'Release');
+ return $self->GenerateCustomTool($desc, $tool, $output, 'Debug')
+ .$self->GenerateCustomTool($desc, $tool, $output, 'Release');
}
return
"<FileConfiguration Name=\"$cfg|$self->{platform}\"><Tool Name=\"VCCustomBuildTool\" Description=\"$desc\" CommandLine=\"$tool\" AdditionalDependencies=\"\" Outputs=\"$output\" /></FileConfiguration>";