March 20, 2012
All,

I just wanted to post a note here that I have added support for D(2) to
premake (http://industriousone.com/premake).

The fork is available on Bitbucket (https://bitbucket.org/goughy/premake-dev-d/overview) and I would really appreciate feedback if it's of interest to the community.

I have one known issue at the moment (which I'm working on as time permits) which is that addressing sibling projects for linking seems to have issues under some configurations.

I believe this to be a mismatch between, for example, GCC and DMD where GCC allows the definition of independent output directories for targets (libraries) and object files, where DMD does not.  Hopefully it should still work for you.

The fork supports DMD, GDC, and LDC - but only for D2, and currently
only for (g)make. If anyone would like to add support for other
toolchains (MSVC/VisualD, Code::Blocks etc) that would be fantastic.

I have successfully built my own projects and druntime/phobos with it in the past, so I know it can work.

Cheers.

-- 
Andrew Gough
M: 0408 596 656
andrew@goughy.org

March 21, 2012
On Tue, 20 Mar 2012 13:57:50 +1100
Andrew Gough <andrew@goughy.org> wrote:

Hello Andrew,

> The fork supports DMD, GDC, and LDC - but only for D2, and currently
> only for (g)make. If anyone would like to add support for other
> toolchains (MSVC/VisualD, Code::Blocks etc) that would be fantastic.

I'm very happy seeing the prospect of having D support in premake which looks very clean and being of declarative nature.

Now I wonder how difficult is to add support for  other toolchains and asked about it on the mailing list where Jason replied with: "I did try to abstract out common functions between the C++ and C# support. The more data points I have to work with, the easier it will be to identify the areas that need more abstraction (and what it should look like)."

Does adding such support involve only Lua skills?

> I have successfully built my own projects and druntime/phobos with it in the past, so I know it can work.

I plan to start playing with it as soon as I finish some other non-D related tasks.

Thank you for working on it.


Sincerely,
Gour


-- 
But for one who takes pleasure in the self, whose human life is one of self-realization, and who is satisfied in the self only, fully satiated — for him there is no duty.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


March 21, 2012
On Wed, 21 Mar 2012 08:07:34 +0100
Gour <gour@atmarama.net> wrote:

> On Tue, 20 Mar 2012 13:57:50 +1100
> Andrew Gough <andrew@goughy.org> wrote:
> 
> Hello Andrew,
> 
> > The fork supports DMD, GDC, and LDC - but only for D2, and currently
> > only for (g)make. If anyone would like to add support for other
> > toolchains (MSVC/VisualD, Code::Blocks etc) that would be fantastic.
> 
> I'm very happy seeing the prospect of having D support in premake which looks very clean and being of declarative nature.
> 
> Now I wonder how difficult is to add support for  other toolchains and asked about it on the mailing list where Jason replied with: "I did try to abstract out common functions between the C++ and C# support. The more data points I have to work with, the easier it will be to identify the areas that need more abstraction (and what it should look like)."
> 
> Does adding such support involve only Lua skills?

Mostly, yes.  The internals of premake are completely Lua - on the positive side, Lua is really easy (syntactically, anyway).

The internal abstractions are quite good, and there is a strong decoupling between the internals data structures for project configurations, and the final build artefact generation (ie. the Makefile or VS solution etc).  This means it should be relatively easy to add other toolchain support - you just need to generate a valid project/solution from the various configurations. 'src/actions/make/make_d.lua' creates the D Makefiles as a starting point, and there are other toolchain examples for VS, Code::Blocks etc for C++/C#, so it shouldn't be a big step.

> 
> > I have successfully built my own projects and druntime/phobos with it in the past, so I know it can work.
> 
> I plan to start playing with it as soon as I finish some other non-D related tasks.
> 
> Thank you for working on it.
> 
> 
> Sincerely,
> Gour
> 
> 

-- 
Andrew Gough
M: 0408 596 656
andrew@goughy.org


Top | Discussion index | About this forum | D home