From: Magnus Hagander Date: Tue, 5 Jan 2010 13:31:58 +0000 (+0000) Subject: Move the default configuration for the MSVC build system to config_default.pl, X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=91755e425b34faa52ab9541a1b37bcd2e5083671;p=users%2Fandresfreund%2Fpostgres.git 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. --- diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index c9023760a5..ec77288700 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -38,7 +38,8 @@ sub Install my $target = shift; our $config; - require 'config.pl'; + require "config_default.pl"; + require "config.pl" if (-f "config.pl"); chdir("../../..") if (-f "../../../configure"); chdir("../../../..") if (-f "../../../../configure"); diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index c75f40c599..850ad5aea1 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -93,9 +93,10 @@ sub DetermineToolVersions sub IsNewer { my ($newfile, $oldfile) = @_; - if ($oldfile ne 'src\tools\msvc\config.pl') + if ($oldfile ne 'src\tools\msvc\config.pl' && $oldfile ne 'src\tools\msvc\config_default.pl') { - return 1 if IsNewer($newfile, 'src\tools\msvc\config.pl'); + return 1 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)); my @nstat = stat($newfile); diff --git a/src/tools/msvc/build.pl b/src/tools/msvc/build.pl index 2654c86497..dd32fde60c 100644 --- a/src/tools/msvc/build.pl +++ b/src/tools/msvc/build.pl @@ -32,7 +32,8 @@ elsif (-e "./buildenv.pl" ) # set up the project our $config; -require "config.pl"; +require "config_default.pl"; +require "config.pl" if (-f "src/tools/msvc/config.pl"); Mkvcbuild::mkvcbuild($config); diff --git a/src/tools/msvc/config.pl b/src/tools/msvc/config_default.pl similarity index 53% rename from src/tools/msvc/config.pl rename to src/tools/msvc/config_default.pl index 1e3750535d..eea4a70fe7 100644 --- a/src/tools/msvc/config.pl +++ b/src/tools/msvc/config_default.pl @@ -10,18 +10,18 @@ our $config = { # blocksize => 8, # --with-blocksize, 8kB by default # wal_blocksize => 8, # --with-wal-blocksize, 8kb by default # wal_segsize => 16, # --with-wal-segsize, 16MB by default + ldap=>1, # --with-ldap nls=>undef, # --enable-nls= - tcl=>'c:\tcl', # --with-tls= - perl=>'c:\perl', # --with-perl - python=>'c:\python24', # --with-python= - krb5=>'c:\prog\pgsql\depend\krb5', # --with-krb5= - ldap=>1, # --with-ldap - openssl=>'c:\openssl', # --with-ssl= - uuid=>'c:\prog\pgsql\depend\ossp-uuid', #--with-ossp-uuid - xml=>'c:\prog\pgsql\depend\libxml2', - xslt=>'c:\prog\pgsql\depend\libxslt', - iconv=>'c:\prog\pgsql\depend\iconv', - zlib=>'c:\prog\pgsql\depend\zlib'# --with-zlib= + tcl=>undef, # --with-tls= + perl=>undef, # --with-perl + python=>undef, # --with-python= + krb5=>undef, # --with-krb5= + openssl=>undef, # --with-ssl= + uuid=>undef, # --with-ossp-uuid + xml=>undef, # --with-libxml= + xslt=>undef, # --with-libxslt= + iconv=>undef, # (not in configure, path to iconv) + zlib=>undef # --with-zlib= }; 1; diff --git a/src/tools/msvc/mkvcbuild.pl b/src/tools/msvc/mkvcbuild.pl index 4d495da5f1..c594de4e70 100644 --- a/src/tools/msvc/mkvcbuild.pl +++ b/src/tools/msvc/mkvcbuild.pl @@ -12,9 +12,11 @@ use Mkvcbuild; chdir('..\..\..') if (-d '..\msvc' && -d '..\..\..\src'); die 'Must run from root or msvc directory' unless (-d 'src\tools\msvc' && -d 'src'); -die 'Could not find config.pl' unless (-f 'src/tools/msvc/config.pl'); +die 'Could not find config_default.pl' unless (-f 'src/tools/msvc/config_default.pl'); +print "Warning: no config.pl found, using default.\n" unless (-f 'src/tools/msvc/config.pl'); our $config; -require 'src/tools/msvc/config.pl'; +require 'src/tools/msvc/config_default.pl'; +require 'src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl'); Mkvcbuild::mkvcbuild($config);