Re: [pgsql-hackers-win32] Build with Visual Studio & MSVC

Lists: pgsql-hackers
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Christopher Kings-Lynne" <chris(dot)kings-lynne(at)calorieking(dot)com>
Cc: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>, <uniware(at)zedware(dot)org>, "Chuck McDevitt" <cmcdevitt(at)greenplum(dot)com>
Subject: Re: [pgsql-hackers-win32] Build with Visual Studio & MSVC
Date: 2006-05-05 07:50:38
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA3536D@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> > Yes. There is a patch pending on -patches which fix almost all of
> > these in HEAD. (There are a few tiny things related to perl and NLS
> > that aren't included in it ATM. And I'm just assuming you're seeing
> > the same problems as I was but I didn't base my work off
> vcproject).
> > I'm also working on a buildscript to convert the Makefiles
> to visual
> > c++ project files, but that's not quite done yet. The idea
> with this
> > work is to have the stuff as integrated as possible with
> main CVS, so
> > the maintenance will be as low as possible - unlike the vcproject
> > project which has been focusing on keeping a separate build
> environment maintained.
>
>
> The CrystalSpace and PlaneShift projects I'm associated with
> have automated MSVC generators. Want me to try to grab them
> for you? They'd be GPL though.

You mean they have a tool that parses GNU Makefiles and generate VC
project files? Sure, that might be interesting. I've seen I think two
others, and tried, but they fell over badly because the pg build system
was too complicated. But I beleive I'm still allowed to loko at GPL
stuff and get ideas as long as I don't copy the code :-)

//MAgnus


From: Christopher Kings-Lynne <chris(dot)kings-lynne(at)calorieking(dot)com>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, uniware(at)zedware(dot)org, Chuck McDevitt <cmcdevitt(at)greenplum(dot)com>
Subject: Re: [pgsql-hackers-win32] Build with Visual Studio & MSVC
Date: 2006-05-05 08:23:18
Message-ID: 445B0B76.5030703@calorieking.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> You mean they have a tool that parses GNU Makefiles and generate VC
> project files? Sure, that might be interesting. I've seen I think two
> others, and tried, but they fell over badly because the pg build system
> was too complicated. But I beleive I'm still allowed to loko at GPL
> stuff and get ideas as long as I don't copy the code :-)

http://cvs.sourceforge.net/viewcvs.py/crystal/CS/mk/msvcgen/

I think it actually takes some sort of XML format or something...or just
reads in files in directories. I'm not sure.

Chris


From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: Christopher Kings-Lynne <chris(dot)kings-lynne(at)calorieking(dot)com>, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, uniware(at)zedware(dot)org, Chuck McDevitt <cmcdevitt(at)greenplum(dot)com>
Subject: Re: [pgsql-hackers-win32] Build with Visual Studio & MSVC
Date: 2006-05-05 17:33:13
Message-ID: 20060505173313.GA26987@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, May 05, 2006 at 09:50:38AM +0200, Magnus Hagander wrote:
> You mean they have a tool that parses GNU Makefiles and generate VC
> project files? Sure, that might be interesting. I've seen I think two
> others, and tried, but they fell over badly because the pg build system
> was too complicated. But I beleive I'm still allowed to loko at GPL
> stuff and get ideas as long as I don't copy the code :-)

[Note: I have no idea how much people have done on this already. It's
just that all this talk of automatic generation makes me curious.
Myself, I have no idea how VC makefile work.]

Is it so hard to automatically generate the necessary info? On a clean
source tree, "make -n" will dump all the commands required to complete
the build. You could probably extract all the info you required from
there, although the directory changing would kill you.

So my thought is, create a number of tracing scripts, eg cc-trace which
examine their arguments to see what needs to be done, recording the
current directory and such. Then execute:

make CC="cc-trace" LD="ld-trace" etc...

And you should be able to build up a tree of what depends on what. This
doesn't take care of the other stuff the makefile does though (like the
generation of pg_config_paths.h, can VC makefile do things like that?)

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.