On 21.01.2011 13:53, Krzysztof Cieniuch wrote:
But there is caching and debugging mechanism that allows to print generated rules instead of invoking them i.e. you may direct build system so instead rule evaluating it prints them using $(info ).
How this done? Please explain more. '-n' option?
So it easy to verify if generated rules are correct or troubleshoot why something doesn't work as expected. Note this is different from -n switch since that debug output is fully valid makefile with all the generated recipes. It can be used to build project this is how caching works. The size of cached makefile in project root is about 11M and then even on T5440 it takes 20 seconds to parse that makefile instead of 2.5 minute.
This is nice tips!
I think it would be worth to put some good ideas or best practices into make manual instead of chapter "5.7 Recursive Use of make" :-)
GNU Make manual is great but don't teach you how write Makefiles. There are exist some GNU Make HOWTO. I learn GNU Make by well known Russian howto: http://citforum.ru/operating_systems/gnumake/ Also interesting theme can be found at: http://mad-scientist.net/make/ And available for free http://oreilly.com/catalog/make3/book/index.csp "Managing Projects with GNU Make", Third Edition By Robert Mecklenburg. Also I found that this book updated by this person: http://wanderinghorse.net/computing/make/ -- С уважением, Александр Гавенко. _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
