Re: Change to config.pl processing in the msvc build environment

Lists: pgsql-hackers
From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Change to config.pl processing in the msvc build environment
Date: 2010-01-01 15:32:49
Message-ID: 9837222c1001010732p4da20c38k4f002380b7e5f871@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I'd like to apply the attached patch to the msvc build environment,
which changes how config.pl is handled. (For the unenlightened, this
is the replacement stuff we have for autoconf)

Today, there is one config.pl. We ship it with a couple of defaults
(which points to a very old installation of mine, really, and probably
shouldn't have included those paths in the first place), and you are
supposed to edit this config.pl file in-place to change which 3rd
party libs etc you have.

This is pretty convenient for end-users building from source. Of which
we don't have many. And it's annoying for doing any development work
on it, because it shows up in your "git diff" or whatever, and you
can't ignore the file or you won't get new updates out.

I therefor propose that we rename this file to "config.pl.default",
and change the scripts to first load config.pl.default, and then load
config.pl if it exists. config.pl then lives completely outside the
source tree (should be in .cvsignore) and won't show up in any diffs
or anything.

It changes the format of the config.pl file (not the default one), so
that the user can now specify just one or two options, and doesn't hav
eto respecify all. So now you can have just:
$config->{zlib}='c:\zlib';

(or similar).

*If* you put in th place the old config.pl file, it will override
whatever is in the default file. Thus, I don't believe this would have
any effect on the buildfarm or the oneclick-installer build
environments.

Comments? Objectsions? Holes in the reasoning? :-)

(patch excludes the rename of config.pl to config.pl.default, for readability)

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

Attachment Content-Type Size
msvc_config.patch application/octet-stream 1.6 KB

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change to config.pl processing in the msvc build environment
Date: 2010-01-02 01:20:12
Message-ID: 20100102012012.GC8011@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Magnus Hagander wrote:

> I therefor propose that we rename this file to "config.pl.default",
> and change the scripts to first load config.pl.default, and then load
> config.pl if it exists. config.pl then lives completely outside the
> source tree (should be in .cvsignore) and won't show up in any diffs
> or anything.

I've used similar tricks elsewhere and find them pretty useful. The
patch looks reasonably sane to someone 101% unfamiliar with our MSVC
stuff (except that I'd get rid of the parentheses in the "do foo unless
-f $file" lines).

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change to config.pl processing in the msvc build environment
Date: 2010-01-02 11:24:49
Message-ID: 9837222c1001020324r6a82f476rab728d386460019f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Jan 2, 2010 at 02:20, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> Magnus Hagander wrote:
>
>> I therefor propose that we rename this file to "config.pl.default",
>> and change the scripts to first load config.pl.default, and then load
>> config.pl if it exists. config.pl then lives completely outside the
>> source tree (should be in .cvsignore) and won't show up in any diffs
>> or anything.
>
> I've used similar tricks elsewhere and find them pretty useful.  The
> patch looks reasonably sane to someone 101% unfamiliar with our MSVC
> stuff (except that I'd get rid of the parentheses in the "do foo unless
> -f $file" lines).

You now, that's what I had first. Then I changed it to add the
parentheses to make it look like a similar piece of code nearby,
written by somebody much more perly than I am. But now that I think of
it, it may well be me who wrote that code earlier as well, so that'd
no good excuse :-)

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change to config.pl processing in the msvc build environment
Date: 2010-01-02 15:05:26
Message-ID: 1262444726.3542.0.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On fre, 2010-01-01 at 16:32 +0100, Magnus Hagander wrote:
> I therefor propose that we rename this file to "config.pl.default",
> and change the scripts to first load config.pl.default, and then load
> config.pl if it exists.

I'd keep the naming so that the extension .pl is preserved. Helps
editors and such.


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change to config.pl processing in the msvc build environment
Date: 2010-01-03 04:13:09
Message-ID: 4B401955.3040400@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Peter Eisentraut wrote:
> On fre, 2010-01-01 at 16:32 +0100, Magnus Hagander wrote:
>
>> I therefor propose that we rename this file to "config.pl.default",
>> and change the scripts to first load config.pl.default, and then load
>> config.pl if it exists.
>>
>
> I'd keep the naming so that the extension .pl is preserved. Helps
> editors and such.
>
>

Right ... let's call it "default_config.pl" or some such. Otherwise it
looks sane enough. I don't think the "parens on trailing conditions"
issue is anything other than just a matter of taste. I often use them
because I've occasionally been caught by not doing so.

cheers

andrew


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change to config.pl processing in the msvc build environment
Date: 2010-01-04 15:28:43
Message-ID: 20100104152843.GF3778@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andrew Dunstan wrote:

> I don't think the "parens on trailing conditions" issue is anything
> other than just a matter of taste.

Agreed

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change to config.pl processing in the msvc build environment
Date: 2010-01-05 13:37:06
Message-ID: 9837222c1001050537o8005a78g94d26f7a1bdbbe9e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sun, Jan 3, 2010 at 05:13, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> Peter Eisentraut wrote:
>>
>> On fre, 2010-01-01 at 16:32 +0100, Magnus Hagander wrote:
>>
>>>
>>> I therefor propose that we rename this file to "config.pl.default",
>>> and change the scripts to first load config.pl.default, and then load
>>> config.pl if it exists.
>>>
>>
>> I'd keep the naming so that the extension .pl is preserved.  Helps
>> editors and such.
>>
>>
>
> Right ... let's call it "default_config.pl" or some such. Otherwise it looks
> sane enough. I don't think the "parens on trailing conditions" issue is
> anything other than just a matter of taste. I often use them because I've
> occasionally been caught by not doing so.

Ok, I've applied this patch with the name change to config_default.pl
(that way it still sorts next to config.pl etc, which was how Dave
convinced me of the config.pl.default name in the first place :D)

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/