Transcription of CHAPTER 12 Debugging Makefiles - O'Reilly Media
{{id}} {{{paragraph}}}
This is the Title of the Book, eMatter EditionCopyright 2005 O Reilly & Associates, Inc. All rights 12 CHAPTER 12 Debugging MakefilesDebuggingmakefiles is somewhat of a black art. Unfortunately, there is no suchthing as amakefiledebugger to examine how a particular rule is being evaluated or avariable expanded. Instead, most Debugging is performed with simple print state-ments and by inspection of themakefile. GNUmakeprovides some help with variousbuilt-in functions and command-line of the best ways to debug amakefileis to add Debugging hooks and use defen-sive programming techniques that you can fall back on when things go awry. I llpresent a few basic Debugging techniques and defensive coding practices I ve foundmost Features of makeThewarningfunction is very useful for Debugging waywardmakefiles. Because thewarningfunction expands to the empty string, it can be placed anywhere in amakefile: at the top-level, in target or prerequisite lists, and in command scripts.
If the debugging option is specified as--debug, basic debugging is used. If the debug-ging option is given as-d, allis used. To select other combinations of options, use a comma separated list--debug=option1,option2 where the option can be one of the following words (actually, make looks only at the first letter): basic Basic debugging is the ...
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}