Appendix A. Running make
GNU make has an impressive set of command-line options. Most command-line options include a short form and a long form. Short commands are indicated with a single dash followed by a single character, while long options begin with a double dash usually followed by whole words separated by dashes. The syntax of these commands is:
-oargument--option-word=argument
The following are the most commonly used options to make. For a complete listing, see the GNU
make manual or type make
--help.
—always-make-BAssume every target is out of date and update them all.
—directory=directory-CdirectoryChange to the given directory before searching for a makefile or performing any work. This also sets the variable
CURDIRtodirectory.—environment-overrides-ePrefer environment variables to makefile variables when there is a choice. This command-line option can be overridden in the makefile for particular variables with the
overridedirective.—file=makefile-fmakefileRead the given file as the makefile rather than any of the default names (i.e., makefile, Makefile, or GNUMakefile).
—help-hPrint a brief summary of the command-line options.
—include-dir=directory-IdirectoryIf an include file does not exist in the current directory, look in the indicated directories for include files before searching the compiled-in search path. Any number of
—include-diroptions can be given on the command line.—keep-going-kDo not terminate the make process if a command returns an error status. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access