Common makefile (gasp) stuff

Russel Winder via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 14 01:43:08 PST 2015


On Tue, 2015-01-13 at 15:20 -0800, Andrei Alexandrescu via Digitalmars-d
wrote:
> Hey folks,
> 
> 
> Over the time a number of stuff has become quite duplicated across our 
> makefiles for dmd, druntime, and phobos.

Are these three separate things with separate builds, or are they three
components of the same system? What is the relationship between these
three, LDC and GDC?

> These include fetching OS and model but (newer) general-purpose macros 
> for e.g. rebasing repos, see 
> https://github.com/D-Programming-Language/dlang.org/blob/master/posix.mak#L37.
> 
> I think it's time to reduce clutter and duplication by migrating such 
> common stuff into one common.mak file. Question is, where should that 
> file sit? One candidate is tools/ but it's not really a tool. Another 
> candidate is dmd/src/ because that would be the first thing anyone 
> depends on.
> 
> Ideas?

Are all three things in the same Git repository? Can I clone the three
independently or do I have to have them all? Can any of them be built
without building the other or does a DMD build require a new druntime
and phobos build.

Basically what I am trying to say here is that I suspect the extraction
of commonality is going to create an inappropriate coupling. The
solution is to have the common material as a fourth thing that can be
brought in to any or all of the three. With SCons and Waf this is
achieved by having a tool, easy simple and keeps the coupling low.

I haven't used Make in 12 years, so I have no idea what it can do these
days, But unless you mandate GNU Make, I suspect it is going to be awful
trying to build across Windows, OSX, Debian, Arch, Fedora, FreeBSD,
OpenBSD, etc. without hacking (in the worst sense).

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150114/a969bbc7/attachment.sig>


More information about the Digitalmars-d mailing list