LWN.net Logo

make shmake

make shmake

Posted Feb 22, 2007 19:32 UTC (Thu) by oak (subscriber, #2786)
In reply to: make shmake by ldo
Parent article: The Road to KDE 4: CMake, a New Build System for KDE (KDE.News)

> The only kind of dependency it can express is a build-dependency.
> No provision for expressing other things, like include-dependencies.

As you found out, Make is not supposed to be a/b/c/d/e/f-language pre-processor. You ask that kind of information from the compiler of the corresponding language. With C-language and GCC compiler you could use a rule like this:

 
# automatic include file dependencies 
deps: $(SRCFILES)      
        gcc $(CPPFLAGS) -MM $^ > deps      
-include deps      


(Log in to post comments)

make shmake

Posted Mar 1, 2007 19:54 UTC (Thu) by nix (subscriber, #2304) [Link]

It would be nice if that sort of boilerplate could be generalized out
somehow. Mega-duplication (or the reliance on system-specific stuff like
*BSD makefile fragments) both are nasty...

make shmake

Posted Mar 2, 2007 23:33 UTC (Fri) by ldo (subscriber, #40946) [Link]

Jam already has this sort of thing built-in. So much simpler than trying to add yet another layer of complexity on top of make.

make shmake

Posted Mar 5, 2007 13:42 UTC (Mon) by nix (subscriber, #2304) [Link]

jam strikes me more as a language to build build systems in than a build system.

I remember trying to set the equivalent of CFLAGS and prefix with Boost... it took a couple of dozen lines of patches to the build system just to do that, and a couple of patches to the jam source bundled with Boost.

Sorry, but I prefer Automake's nasty verbose makefiles to *that*.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds