www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - gdc and Make

reply "nedbrek" <nedbrek yahoo.com> writes:
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
Apr 10 2010
next sibling parent reply Daniel Keep <daniel.keep.lists gmail.com> writes:
bud, rebuild and xfbuild were designed so we wouldn't NEED Makefiles in
the first place.

Unless you've got a good reason, just use a recent dmd and xfbuild.
Apr 10 2010
parent reply "nedbrek" <nedbrek yahoo.com> writes:
Hello,

"Daniel Keep" <daniel.keep.lists gmail.com> wrote in message 
news:hpra3o$2pp6$1 digitalmars.com...
 bud, rebuild and xfbuild were designed so we wouldn't NEED Makefiles in
 the first place.

 Unless you've got a good reason, just use a recent dmd and xfbuild.

Yea, I looked at gdc vs. dmd and Phobos vs. Tango. I really get hit on all sides... I'd like to use dmd, because it's got better support. Also, I'm interested in the fuller library in Tango. But, I'm constrained by what I'd like to do. At some point, I'd like to make plugins for Tcl, and that means building a .dll. From my experience that can work through gdc, but not in dmd. Maybe that has changed? Thanks, Ned
Apr 11 2010
parent reply Jacob Carlborg <doob me.com> writes:
On 4/11/10 13:12, nedbrek wrote:
 Hello,

 "Daniel Keep"<daniel.keep.lists gmail.com>  wrote in message
 news:hpra3o$2pp6$1 digitalmars.com...
 bud, rebuild and xfbuild were designed so we wouldn't NEED Makefiles in
 the first place.

 Unless you've got a good reason, just use a recent dmd and xfbuild.

Yea, I looked at gdc vs. dmd and Phobos vs. Tango. I really get hit on all sides... I'd like to use dmd, because it's got better support. Also, I'm interested in the fuller library in Tango. But, I'm constrained by what I'd like to do. At some point, I'd like to make plugins for Tcl, and that means building a .dll. From my experience that can work through gdc, but not in dmd. Maybe that has changed?

I think these patches change things: http://d.puremagic.com/issues/show_bug.cgi?id=4071
 Thanks,
 Ned

Apr 11 2010
parent reply "nedbrek" <nedbrek yahoo.com> writes:
Hello,

"Jacob Carlborg" <doob me.com> wrote in message 
news:hps9bf$1q9o$1 digitalmars.com...
 On 4/11/10 13:12, nedbrek wrote:
 Hello,

 "Daniel Keep"<daniel.keep.lists gmail.com>  wrote in message
 news:hpra3o$2pp6$1 digitalmars.com...

At some point, I'd like to make plugins for Tcl, and that means building a .dll. From my experience that can work through gdc, but not in dmd. Maybe that has changed?

I think these patches change things: http://d.puremagic.com/issues/show_bug.cgi?id=4071

Interesting, thanks. I will have to re-evaluate things... the other problem I had was that the Tcl lib is in COFF format, and dmd needed OPT. I don't think that has changed... Ned
Apr 11 2010
parent reply Jacob Carlborg <doob me.com> writes:
On 4/11/10 21:38, nedbrek wrote:
 Hello,

 "Jacob Carlborg"<doob me.com>  wrote in message
 news:hps9bf$1q9o$1 digitalmars.com...
 On 4/11/10 13:12, nedbrek wrote:
 Hello,

 "Daniel Keep"<daniel.keep.lists gmail.com>   wrote in message
 news:hpra3o$2pp6$1 digitalmars.com...

At some point, I'd like to make plugins for Tcl, and that means building a .dll. From my experience that can work through gdc, but not in dmd. Maybe that has changed?

I think these patches change things: http://d.puremagic.com/issues/show_bug.cgi?id=4071

Interesting, thanks. I will have to re-evaluate things... the other problem I had was that the Tcl lib is in COFF format, and dmd needed OPT. I don't think that has changed... Ned

There is a tool that can convert COFF to OMF: http://www.digitalmars.com/ctg/coff2omf.html
Apr 12 2010
parent "nedbrek" <nedbrek yahoo.com> writes:
Hello all,

"Jacob Carlborg" <doob me.com> wrote in message 
news:hpus5n$8ni$1 digitalmars.com...
 On 4/11/10 21:38, nedbrek wrote:
 Interesting, thanks.  I will have to re-evaluate things... the other 
 problem
 I had was that the Tcl lib is in COFF format, and dmd needed OPT.  I 
 don't
 think that has changed...

There is a tool that can convert COFF to OMF: http://www.digitalmars.com/ctg/coff2omf.html

Is coff2omf still non-free? I guess the other option is to build Tcl using dmc... Thanks, Ned
Apr 13 2010
prev sibling parent reply Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
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.
Apr 10 2010
parent "nedbrek" <nedbrek yahoo.com> writes:
Hello,

"Ellery Newcomer" <ellery-newcomer utulsa.edu> wrote in message 
news:hprahm$310n$1 digitalmars.com...
 On 04/10/2010 08:27 PM, nedbrek wrote:
 Hello all,

 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?

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

Yea, I think the order is ok.
 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.

Ok, I have dmd installed, maybe I can use it to generate the dependencies...
 But I really think you shouldn't do that anyways.

Hehe, yea. I'd prefer not to, but I think I am constrained (need a dll). Thanks, Ned
Apr 11 2010