aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-11-27 20:14:47 -0500
committerAndrew Dunstan <andrew@dunslane.net>2011-11-27 20:14:47 -0500
commit91572ee0a6dfeb62dda6c375f613d1b7fdfc1383 (patch)
tree001ba5acbcea64fbdd197508c05f32bc8fe20ee4 /src
parent9f4563f743eab0682f908d51fa3a9c630b31322d (diff)
downloadpostgresql-91572ee0a6dfeb62dda6c375f613d1b7fdfc1383.tar.gz
postgresql-91572ee0a6dfeb62dda6c375f613d1b7fdfc1383.zip
Make pg_dumpall build with the right object files under MSVC.
This fixes a longstanding but up to now benign bug in the way pg_dumpall was built. The bug was exposed by recent code adjustments. The Makefile does not use $(OBJS) to build pg_dumpall, so this fix removes their source files from the pg_dumpall object and adds in the one source file it consequently needs.
Diffstat (limited to 'src')
-rw-r--r--src/tools/msvc/Mkvcbuild.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 482f10051b1..94ecb657cfc 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -344,9 +344,17 @@ sub mkvcbuild
$pgdump->AddFile('src\backend\parser\kwlookup.c');
my $pgdumpall = AddSimpleFrontend('pg_dump', 1);
+ # pg_dumpall doesn't use the files in the Makefile's $(OBJS), unlike
+ # pg_dump and pg_restore.
+ # So remove their sources from the object, keeping the other setup that
+ # AddSimpleFrontend() has done.
+ my @nodumpall = grep { m/src\\bin\\pg_dump\\.*\.c$/ }
+ keys %{$pgdumpall->{files}};
+ delete @{$pgdumpall->{files}}{@nodumpall};
$pgdumpall->{name} = 'pg_dumpall';
$pgdumpall->AddIncludeDir('src\backend');
$pgdumpall->AddFile('src\bin\pg_dump\pg_dumpall.c');
+ $pgdumpall->AddFile('src\bin\pg_dump\dumputils.c');
$pgdumpall->AddFile('src\bin\pg_dump\keywords.c');
$pgdumpall->AddFile('src\backend\parser\kwlookup.c');