make -k not working

Brad King brad.king at kitware.com
Thu Mar 30 16:32:21 CEST 2006


Thiago Macieira wrote:
> Alexander Neundorf wrote:
> 
>>So if I understood correctly, just use make -i ?
>>
>>cmake generates makefiles which do more dependency checking than we had
>>with autotools AFAICT, and that's actually a good thing.
> 
> 
> This is not a showstopper, but the dependencies generated in the top-level 
> Makefile are not correct.
> 
> KHTML can compile just fine if KDEUI didn't build. It just can't link.
> 
> And as David said, for the future, it would be nice to have a flat 
> build -- i.e., not launching a separate make process for each 
> subdirectory.

There is not a separate make for each subdirectory.  There is a separate 
make per target (executable, library, etc.).  The inter-target 
dependencies are necessary, and a recursive make per target is necessary 
to be completely safe.  I've spent alot of time studying this problem, 
and my conclusion is that the paper "Recursive Make Considered Harmful" 
is totally bogus when it comes to automatically scanning dependencies 
and generated headers/sources.

Most make implementations will not re-read dependencies from makefiles 
once building has started (GNU make does in some cases, but other UNIX 
makes, NMake, Borland Make, etc. do not).  If a source file in target B 
is generated by the executable target A then B cannot build even up to 
the link step before A is completed.  Once the file is generated then it 
needs to be included in a dependency scan step.  A flat make would not 
read the resulting dependencies.

I agree that some object files could be built and the link step skipped, 
but encoding this into make would require ANOTHER recursive make per 
target (one to build object files and one to link).  We may eventually 
do this anyway to avoid parallel linking but that is a separate problem.

As Stephan said, achieving these more advanced analyses of what can 
really build requires a better make implementation.  An unsermake 
generator is not too far fetched, but it will have to wait at least 
until after the 2.4 CMake release.

-Brad


More information about the Kde-buildsystem mailing list