Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit af322a8

Browse files
committed
Move the default configuration for the MSVC build system to config_default.pl,
and allow using config.pl to override the defaults. config.pl is removed from the repository, so changes there will no longer show up when doing diff, and will not prevent switching branches and such things. config.pl would normally be used to override single values, but if an old-style config.pl is read, it will override the entire default configuration, making it backwards compatible.
1 parent 04de9be commit af322a8

File tree

5 files changed

+26
-21
lines changed

5 files changed

+26
-21
lines changed

src/tools/msvc/Install.pm

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package Install;
33
#
44
# Package that provides 'make install' functionality for msvc builds
55
#
6-
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.33 2009/04/20 08:38:00 mha Exp $
6+
# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.34 2010/01/05 13:31:58 mha Exp $
77
#
88
use strict;
99
use warnings;
@@ -38,7 +38,8 @@ sub Install
3838

3939
my $target = shift;
4040
our $config;
41-
require 'config.pl';
41+
require "config_default.pl";
42+
require "config.pl" if (-f "config.pl");
4243

4344
chdir("../../..") if (-f "../../../configure");
4445
chdir("../../../..") if (-f "../../../../configure");

src/tools/msvc/Solution.pm

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package Solution;
33
#
44
# Package that encapsulates a Visual C++ solution file generation
55
#
6-
# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.52 2010/01/05 01:06:57 tgl Exp $
6+
# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.53 2010/01/05 13:31:58 mha Exp $
77
#
88
use Carp;
99
use strict;
@@ -93,9 +93,10 @@ sub DetermineToolVersions
9393
sub IsNewer
9494
{
9595
my ($newfile, $oldfile) = @_;
96-
if ($oldfile ne 'src\tools\msvc\config.pl')
96+
if ($oldfile ne 'src\tools\msvc\config.pl' && $oldfile ne 'src\tools\msvc\config_default.pl')
9797
{
98-
return 1 if IsNewer($newfile, 'src\tools\msvc\config.pl');
98+
return 1 if (-f 'src\tools\msvc\config.pl') && IsNewer($newfile, 'src\tools\msvc\config.pl');
99+
return 1 if (-f 'src\tools\msvc\config_default.pl') && IsNewer($newfile, 'src\tools\msvc\config_default.pl');
99100
}
100101
return 1 if (!(-e $newfile));
101102
my @nstat = stat($newfile);

src/tools/msvc/build.pl

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# -*-perl-*- hey - emacs - this is a perl file
33

4-
# $PostgreSQL: pgsql/src/tools/msvc/build.pl,v 1.1 2007/09/23 21:52:56 adunstan Exp $
4+
# $PostgreSQL: pgsql/src/tools/msvc/build.pl,v 1.2 2010/01/05 13:31:58 mha Exp $
55

66
BEGIN
77
{
@@ -32,7 +32,8 @@ BEGIN
3232

3333
# set up the project
3434
our $config;
35-
require "config.pl";
35+
require "config_default.pl";
36+
require "config.pl" if (-f "src/tools/msvc/config.pl");
3637

3738
Mkvcbuild::mkvcbuild($config);
3839

src/tools/msvc/config.pl renamed to src/tools/msvc/config_default.pl

+11-11
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
# blocksize => 8, # --with-blocksize, 8kB by default
1111
# wal_blocksize => 8, # --with-wal-blocksize, 8kb by default
1212
# wal_segsize => 16, # --with-wal-segsize, 16MB by default
13+
ldap=>1, # --with-ldap
1314
nls=>undef, # --enable-nls=<path>
14-
tcl=>'c:\tcl', # --with-tls=<path>
15-
perl=>'c:\perl', # --with-perl
16-
python=>'c:\python24', # --with-python=<path>
17-
krb5=>'c:\prog\pgsql\depend\krb5', # --with-krb5=<path>
18-
ldap=>1, # --with-ldap
19-
openssl=>'c:\openssl', # --with-ssl=<path>
20-
uuid=>'c:\prog\pgsql\depend\ossp-uuid', #--with-ossp-uuid
21-
xml=>'c:\prog\pgsql\depend\libxml2',
22-
xslt=>'c:\prog\pgsql\depend\libxslt',
23-
iconv=>'c:\prog\pgsql\depend\iconv',
24-
zlib=>'c:\prog\pgsql\depend\zlib'# --with-zlib=<path>
15+
tcl=>undef, # --with-tls=<path>
16+
perl=>undef, # --with-perl
17+
python=>undef, # --with-python=<path>
18+
krb5=>undef, # --with-krb5=<path>
19+
openssl=>undef, # --with-ssl=<path>
20+
uuid=>undef, # --with-ossp-uuid
21+
xml=>undef, # --with-libxml=<path>
22+
xslt=>undef, # --with-libxslt=<path>
23+
iconv=>undef, # (not in configure, path to iconv)
24+
zlib=>undef # --with-zlib=<path>
2525
};
2626

2727
1;

src/tools/msvc/mkvcbuild.pl

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Script that parses Unix style build environment and generates build files
33
# for building with Visual Studio.
44
#
5-
# $PostgreSQL: pgsql/src/tools/msvc/mkvcbuild.pl,v 1.18 2007/03/17 14:01:01 mha Exp $
5+
# $PostgreSQL: pgsql/src/tools/msvc/mkvcbuild.pl,v 1.19 2010/01/05 13:31:58 mha Exp $
66
#
77
use strict;
88
use warnings;
@@ -12,9 +12,11 @@
1212
chdir('..\..\..') if (-d '..\msvc' && -d '..\..\..\src');
1313
die 'Must run from root or msvc directory' unless (-d 'src\tools\msvc' && -d 'src');
1414

15-
die 'Could not find config.pl' unless (-f 'src/tools/msvc/config.pl');
15+
die 'Could not find config_default.pl' unless (-f 'src/tools/msvc/config_default.pl');
16+
print "Warning: no config.pl found, using default.\n" unless (-f 'src/tools/msvc/config.pl');
1617

1718
our $config;
18-
require 'src/tools/msvc/config.pl';
19+
require 'src/tools/msvc/config_default.pl';
20+
require 'src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl');
1921

2022
Mkvcbuild::mkvcbuild($config);

0 commit comments

Comments
 (0)