Premake support for D

Andrew Gough andrew at goughy.org
Wed Mar 21 03:57:30 PDT 2012


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

> On Tue, 20 Mar 2012 13:57:50 +1100
> Andrew Gough <andrew at 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 at goughy.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120321/60878f57/attachment.pgp>


More information about the Digitalmars-d mailing list