gdc and Make

Ellery Newcomer ellery-newcomer at utulsa.edu
Sat Apr 10 19:01:10 PDT 2010


On 04/10/2010 08:27 PM, nedbrek wrote:
> Hello all,
>     I have been following D for over a year now, and have just started my
> first big project.  I am really enjoying it so far!
>
>     I am using Cygwin, with the patched in gdc 0.24 for D 1.0 (old, I know).
>
>     I am also using Make as my build system.  I tried to get bud and dsss to
> work, but failed :(
>
>     Things are working fairly well, but I sometimes have to do a "make
> clean".  The only dependencies I have in my Makefile are "%.o: %.d" (objects
> depend on source).
>
> I think there are circumstances where one .d depends on another, but I'm not
> sure...  is it every import?
>
> I tried "gdc -MM", but it said that option is not supported for D.
>
> Any recommendations?  Do I need to break out sed and awk?
>
> Thanks,
> Ned
>
> I am documenting my experiences:
> http://mudge-a209.blogspot.com/2010/04/delight.html
>
>

I think if you pass your source directories via -I the order that *.d 
get compiled doesn't matter (beyond efficiency ..).

Haven't used gdc in a long time though.

As far as dependencies, yeah, a d file will be dependent on anything it 
imports. In DMD there's a -deps flag that outputs that information, and 
in verbose mode, it will print out any import that it processes. I don't 
know how much of that gdc has.

But I really think you shouldn't do that anyways.


More information about the Digitalmars-d-learn mailing list