\chapentry {Overview of \code {make}}{1}{1} \secentry {How to Read This Manual}{1}{1}{1} \secentry {Problems and Bugs}{1}{2}{2} \chapentry {An Introduction to Makefiles}{2}{5} \secentry {What a Rule Looks Like}{2}{1}{5} \secentry {A Simple Makefile}{2}{2}{6} \secentry {How \code {make} Processes a Makefile}{2}{3}{8} \secentry {Variables Make Makefiles Simpler}{2}{4}{9} \secentry {Letting \code {make} Deduce the Commands}{2}{5}{10} \secentry {Another Style of Makefile}{2}{6}{11} \secentry {Rules for Cleaning the Directory}{2}{7}{12} \chapentry {Writing Makefiles}{3}{13} \secentry {What Makefiles Contain}{3}{1}{13} \secentry {What Name to Give Your Makefile}{3}{2}{14} \secentry {Including Other Makefiles}{3}{3}{14} \secentry {The Variable \code {MAKEFILES}}{3}{4}{16} \secentry {How Makefiles Are Remade}{3}{5}{16} \secentry {Overriding Part of Another Makefile}{3}{6}{18} \chapentry {Writing Rules}{4}{19} \secentry {Rule Syntax}{4}{1}{19} \secentry {Using Wildcard Characters in File Names}{4}{2}{20} \subsecentry {Wildcard Examples}{4}{2}{1}{21} \subsecentry {Pitfalls of Using Wildcards}{4}{2}{2}{22} \subsecentry {The Function \code {wildcard}}{4}{2}{3}{22} \secentry {Searching Directories for Dependencies}{4}{3}{23} \subsecentry {\code {VPATH}: Search Path for All Dependencies}{4}{3}{1}{23} \subsecentry {The \code {vpath} Directive}{4}{3}{2}{24} \subsecentry {Writing Shell Commands with Directory Search}{4}{3}{3}{26} \subsecentry {Directory Search and Implicit Rules}{4}{3}{4}{27} \subsecentry {Directory Search for Link Libraries}{4}{3}{5}{27} \secentry {Phony Targets}{4}{4}{28} \secentry {Rules without Commands or Dependencies}{4}{5}{30} \secentry {Empty Target Files to Record Events}{4}{6}{30} \secentry {Special Built-in Target Names}{4}{7}{31} \secentry {Multiple Targets in a Rule}{4}{8}{32} \secentry {Multiple Rules for One Target}{4}{9}{33} \secentry {Static Pattern Rules}{4}{10}{34} \subsecentry {Syntax of Static Pattern Rules}{4}{10}{1}{34} \subsecentry {Static Pattern Rules versus Implicit Rules}{4}{10}{2}{36} \secentry {Double-Colon Rules}{4}{11}{37} \secentry {Generating Dependencies Automatically}{4}{12}{37} \chapentry {Writing the Commands in Rules}{5}{41} \secentry {Command Echoing}{5}{1}{41} \secentry {Command Execution}{5}{2}{42} \secentry {Parallel Execution}{5}{3}{42} \secentry {Errors in Commands}{5}{4}{44} \secentry {Interrupting or Killing \code {make}}{5}{5}{45} \secentry {Recursive Use of \code {make}}{5}{6}{46} \subsecentry {How the \code {MAKE} Variable Works}{5}{6}{1}{46} \subsecentry {Communicating Variables to a Sub-\code {make}}{5}{6}{2}{47} \subsecentry {Communicating Options to a Sub-\code {make}}{5}{6}{3}{50} \subsecentry {The \samp {--print-directory} Option}{5}{6}{4}{52} \secentry {Defining Canned Command Sequences}{5}{7}{52} \secentry {Using Empty Commands}{5}{8}{54} \chapentry {How to Use Variables}{6}{55} \secentry {Basics of Variable References}{6}{1}{55} \secentry {The Two Flavors of Variables}{6}{2}{56} \secentry {Advanced Features for Reference to Variables}{6}{3}{59} \subsecentry {Substitution References}{6}{3}{1}{59} \subsecentry {Computed Variable Names}{6}{3}{2}{60} \secentry {How Variables Get Their Values}{6}{4}{63} \secentry {Setting Variables}{6}{5}{63} \secentry {Appending More Text to Variables}{6}{6}{64} \secentry {The \code {override} Directive}{6}{7}{66} \secentry {Defining Variables Verbatim}{6}{8}{67} \secentry {Variables from the Environment}{6}{9}{68} \chapentry {Conditional Parts of Makefiles}{7}{71} \secentry {Example of a Conditional}{7}{1}{71} \secentry {Syntax of Conditionals}{7}{2}{72} \secentry {Conditionals that Test Flags}{7}{3}{75} \chapentry {Functions for Transforming Text}{8}{77} \secentry {Function Call Syntax}{8}{1}{77} \secentry {Functions for String Substitution and Analysis}{8}{2}{78} \secentry {Functions for File Names}{8}{3}{81} \secentry {The \code {foreach} Function}{8}{4}{83} \secentry {The \code {origin} Function}{8}{5}{85} \secentry {The \code {shell} Function}{8}{6}{87} \chapentry {How to Run \code {make}}{9}{89} \secentry {Arguments to Specify the Makefile}{9}{1}{89} \secentry {Arguments to Specify the Goals}{9}{2}{90} \secentry {Instead of Executing the Commands}{9}{3}{91} \secentry {Avoiding Recompilation of Some Files}{9}{4}{93} \secentry {Overriding Variables}{9}{5}{94} \secentry {Testing the Compilation of a Program}{9}{6}{95} \secentry {Summary of Options}{9}{7}{95} \chapentry {Using Implicit Rules}{10}{101} \secentry {Using Implicit Rules}{10}{1}{101} \secentry {Catalogue of Implicit Rules}{10}{2}{103} \secentry {Variables Used by Implicit Rules}{10}{3}{106} \secentry {Chains of Implicit Rules}{10}{4}{108} \secentry {Defining and Redefining Pattern Rules}{10}{5}{109} \subsecentry {Introduction to Pattern Rules}{10}{5}{1}{110} \subsecentry {Pattern Rule Examples}{10}{5}{2}{111} \subsecentry {Automatic Variables}{10}{5}{3}{112} \subsecentry {How Patterns Match}{10}{5}{4}{114} \subsecentry {Match-Anything Pattern Rules}{10}{5}{5}{115} \subsecentry {Canceling Implicit Rules}{10}{5}{6}{116} \secentry {Defining Last-Resort Default Rules}{10}{6}{116} \secentry {Old-Fashioned Suffix Rules}{10}{7}{117} \secentry {Implicit Rule Search Algorithm}{10}{8}{119} \chapentry {Using \code {make} to Update Archive Files}{11}{121} \secentry {Archive Members as Targets}{11}{1}{121} \secentry {Implicit Rule for Archive Member Targets}{11}{2}{122} \subsecentry {Updating Archive Symbol Directories}{11}{2}{1}{123} \secentry {Dangers When Using Archives}{11}{3}{123} \secentry {Suffix Rules for Archive Files}{11}{4}{124} \chapentry {Features of GNU \code {make}}{12}{125} \chapentry {Incompatibilities and Missing Features}{13}{129} \chapentry {Makefile Conventions}{14}{131} \secentry {General Conventions for Makefiles}{14}{1}{131} \secentry {Utilities in Makefiles}{14}{2}{132} \secentry {Standard Targets for Users}{14}{3}{133} \secentry {Variables for Specifying Commands}{14}{4}{136} \secentry {Variables for Installation Directories}{14}{5}{138} \chapentry {Quick Reference}{Appendix{} \char65}{143} \chapentry {Complex Makefile Example}{Appendix{} \char66}{149} \unnumbchapentry {Index of Concepts}{155} \unnumbchapentry {Index of Functions, Variables, & Directives}{165}