Thread overview
Smart compiling
Feb 12, 2004
Sark7
Feb 13, 2004
Walter
Feb 13, 2004
Sark7
Feb 13, 2004
Brad Anderson
Feb 13, 2004
J C Calvarese
Feb 13, 2004
J Anderson
February 12, 2004
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 ;)
February 13, 2004
"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.


February 13, 2004
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.
>
>
February 13, 2004
> 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

February 13, 2004
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/
February 13, 2004
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/