www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dmd makefile dependencies

reply Trass3r <un known.com> writes:
Is there any makefile guru who could (maybe use some fancy tool to) fix  
the dependencies?
Having to recompile everything for each small change is annoying.
Jan 24 2012
parent reply "Daniel Murphy" <yebblies nospamgmail.com> writes:
I assume you mean the windows one?  dmc is fast enough that recompiling 
takes very little time, especially compared to running the test suites.  So 
long as you don't modify any header files you shouldn't need to recompile 
everything anyway...

iirc Walter's complaint is that the makefiles quickly get out of sync 
anyway, so it's a better habit to use make clean constantly regardless...

"Trass3r" <un known.com> wrote in message news:op.v8l3w5s83ncmek enigma...
 Is there any makefile guru who could (maybe use some fancy tool to) fix 
 the dependencies?
 Having to recompile everything for each small change is annoying. 

Jan 24 2012
next sibling parent reply Trass3r <un known.com> writes:
 I assume you mean the windows one?  dmc is fast enough that recompiling
 takes very little time, especially compared to running the test suites.

Nope, Linux.
 iirc Walter's complaint is that the makefiles quickly get out of sync
 anyway, so it's a better habit to use make clean constantly regardless...

Automating it on one machine should be enough.
Jan 24 2012
next sibling parent "Daniel Murphy" <yebblies nospamgmail.com> writes:
"Trass3r" <un known.com> wrote in message news:op.v8mbp6li3ncmek enigma...
 I assume you mean the windows one?  dmc is fast enough that recompiling
 takes very little time, especially compared to running the test suites.

Nope, Linux.

Jan 24 2012
prev sibling parent Rainer Schuetze <r.sagitario gmx.de> writes:
A simple and effective way to do it with gcc is to generate dependency 
files (*.dep) during compilation with -MD/-MF and include these into the 
makefile with

-include *.dep

On 25.01.2012 03:26, Trass3r wrote:
 I assume you mean the windows one? dmc is fast enough that recompiling
 takes very little time, especially compared to running the test suites.

Nope, Linux.
 iirc Walter's complaint is that the makefiles quickly get out of sync
 anyway, so it's a better habit to use make clean constantly regardless...

Automating it on one machine should be enough.

Jan 24 2012
prev sibling next sibling parent bcs <bcs example.com> writes:
On 01/24/2012 05:50 PM, Daniel Murphy wrote:
 I assume you mean the windows one?  dmc is fast enough that recompiling
 takes very little time, especially compared to running the test suites.  So
 long as you don't modify any header files you shouldn't need to recompile
 everything anyway...

 iirc Walter's complaint is that the makefiles quickly get out of sync
 anyway, so it's a better habit to use make clean constantly regardless...

 "Trass3r"<un known.com>  wrote in message news:op.v8l3w5s83ncmek enigma...
 Is there any makefile guru who could (maybe use some fancy tool to) fix
 the dependencies?
 Having to recompile everything for each small change is annoying.


Automate checking it and add that as one of the tests. I don't know about other people but something better than 80% (might even be north of 95%) of builds I run give errors (I tend to use compiler errors as a static analyses tool) and even when things build, I avoid running more than a few seconds worth of test until I think the codes correct. Run a clean build and test every so often (several times per hour) but MOST builds should be incremental so as to be as fast as can be managed.
Jan 24 2012
prev sibling next sibling parent Trass3r <un known.com> writes:
Am 25.01.2012, 08:36 Uhr, schrieb Rainer Schuetze <r.sagitario gmx.de>:

 A simple and effective way to do it with gcc is to generate dependency  
 files (*.dep) during compilation with -MD/-MF and include these into the  
 makefile with

 -include *.dep

That sounds sound :)
Jan 25 2012
prev sibling parent Trass3r <un known.com> writes:
 Run a clean build and test every so often (several times per hour) but  
 MOST builds should be incremental so as to be as fast as can be managed.

Yep, even Clang needs half a minute to do a full build for me.
Jan 25 2012