www.digitalmars.com         C & C++   DMDScript  

D - Smart compiling

reply Sark7 <sark7 mail333.com> writes:
Why D compiler always recompile .d files that have corresponding 
up-to-date .obj ? I think it seems good to add compiler option to don't do 
that ;)
Feb 12 2004
parent reply "Walter" <walter digitalmars.com> writes:
"Sark7" <sark7 mail333.com> wrote in message
news:opr296vqvfut8jae news.digitalmars.com...
 Why D compiler always recompile .d files that have corresponding
 up-to-date .obj ? I think it seems good to add compiler option to don't do
 that ;)
DMD does not check the dates, that is assumed to be the province of make.
Feb 12 2004
parent reply Sark7 <sark7 mail333.com> writes:
Yes, i'm aware of power of make :), but there are one little problem with 
linking .obj files with templates.
For example, if I instantiate same template in two files, compile into a 
.obj, and try to link these .objs, I got an error "Previous Definition 
Different".

But when I pass sources of these modules, all compiles successfully. 
However, in that case D recompiles all... :(

On Thu, 12 Feb 2004 16:07:19 -0800, Walter <walter digitalmars.com> wrote:
 "Sark7" <sark7 mail333.com> wrote in message
 news:opr296vqvfut8jae news.digitalmars.com...
 Why D compiler always recompile .d files that have corresponding
 up-to-date .obj ? I think it seems good to add compiler option to don't 
 do
 that ;)
DMD does not check the dates, that is assumed to be the province of make.
Feb 12 2004
parent reply Brad Anderson <brad sankaty.dot.com> writes:
 But when I pass sources of these modules, all compiles successfully. 
 However, in that case D recompiles all... :(
 
Try the updated version of dig - it contains a compiler utility for DMD called digc. digc will not recompile if it doesn't need to. You can find it here: http://jcc_7.tripod.com/d/dig.html Cheers, Brad
Feb 12 2004
parent reply J C Calvarese <jcc7 cox.net> writes:
Brad Anderson wrote:
 But when I pass sources of these modules, all compiles successfully. 
 However, in that case D recompiles all... :(
Try the updated version of dig - it contains a compiler utility for DMD called digc. digc will not recompile if it doesn't need to.
Yes, digc does check the date. And it's open source, so you can even see how it works.
 
 You can find it here:
 http://jcc_7.tripod.com/d/dig.html
Actually, he probably ought to start with J Anderson's latest version of dig: http://badmama.com.au/~anderson/JA's_D_Page.html (I haven't uploaded a new dig package recently. J is more reliable. :) )
 
 Cheers,
 Brad
-- Justin http://jcc_7.tripod.com/d/
Feb 12 2004
parent J Anderson <REMOVEanderson badmama.com.au> writes:
J C Calvarese wrote:

 (I haven't uploaded a new dig package recently. J is more reliable. :) )
Actually I don't think my dig is any different from yours, although that may change in the future <g>. I added the date so you can be sure. Also I will accept any modifications (within reason) people wish to make on it. So if dig is missing something you think it should have, add it and send the mods to me. -- -Anderson: http://badmama.com.au/~anderson/
Feb 12 2004