build a project

grauzone none at example.net
Thu Mar 26 08:30:08 PDT 2009


Vladimir Panteleev wrote:
> On Thu, 26 Mar 2009 16:54:27 +0200, Denis Koroskin <2korden at gmail.com> 
> wrote:
> 
>> On Thu, 26 Mar 2009 17:44:33 +0300, Qian Xu 
>> <quian.xu at stud.tu-ilmenau.de> wrote:
>>
>>> Hi All,
>>>
>>> I have a project with 300 d-files. I use WAF-tool to build my project.
>>>
>>> If I add one line comment in a d-file from the bottom of the dependency
>>> tree, almost the whole project will be recompiled again. This is very 
>>> time
>>> consuming.
>>>
>>> Is there any way to detect, whether the modification of a d-file does 
>>> not
>>> have affect to its dependency?
>>>
>>> Best regards and have a good day
>>> --Qian Xu
>>>
>>
>> You can try comparing DMD-generated .di files from that modified file.
>> There is no need to recompile dependencies if two headers match.
> 
> Unless you compile with inlining enabled, AFAIK.

A method, that would guarantee correctness, is to let the compiler only 
read .di files of other modules. But then the build process would be 
more complicated. You had to generate all .di files of all depended 
modules (which would take a while) and deal with circular module 
dependencies.

To Qian Xu (the OP): welcome to the funny world of the D tool chain. If 
you're using dsss/rebuild, you can speed up compilation a bit by putting 
oneatatime=no into the rebuild configuration file. Because of dmd bugs, 
you might need to use the -full switch to avoid linker errors.



More information about the Digitalmars-d mailing list