What are the worst parts of D?
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Thu Sep 25 11:13:42 PDT 2014
On 9/25/14, 10:47 AM, Cliff wrote:
> On Thursday, 25 September 2014 at 17:42:09 UTC, Jacob Carlborg
> wrote:
>> On 2014-09-25 16:23, H. S. Teoh via Digitalmars-d wrote:
>>
>>> That's the hallmark of make-based projects.
>>
>> This was Ninja actually. But how would the build system know I've
>> updated the compiler?
>
> The compiler is an input to the build rule. Consider the rule:
>
> build: $(CC) my.c -o my.o
>
> what are the dependencies for the rule "build"?
>
> my.c obviously. Anything the compiler accesses during the
> compilation of my.c. And *the compiler itself*, referenced here
> as $(CC). From a dependency management standpoint, executables
> are not special except as running them leads to the discovery of
> more dependencies than may be statically specified.
Yah, it only gets odder from there. E.g. all stuff being build must also
list the rule file itself as a dependency.
FWIW I've seen implications that a better build tool would improve the
lot of dlang contributors. My response to that would be: I agree that
Phobos' posix.mak
(https://github.com/D-Programming-Language/phobos/blob/master/posix.mak)
is a tad baroque and uses a couple of the more obscure features of make.
I also consider a few changes to it could have been effected simpler and
better. However, as far as I can tell it's not a large issue for dlang
contributors, and to the extent it is, it's not because of make's faults.
Andrei
More information about the Digitalmars-d
mailing list