manpagez: man pages & more
info make
Home | html | info | man

File: make.info,  Node: Running,  Next: Implicit Rules,  Prev: Functions,  Up: Top

9 How to Run 'make'
*******************

A makefile that says how to recompile a program can be used in more than
one way.  The simplest use is to recompile every file that is out of
date.  Usually, makefiles are written so that if you run 'make' with no
arguments, it does just that.

   But you might want to update only some of the files; you might want
to use a different compiler or different compiler options; you might
want just to find out which files are out of date without changing them.

   By giving arguments when you run 'make', you can do any of these
things and many others.

   The exit status of 'make' is always one of three values:
'0'
     The exit status is zero if 'make' is successful.
'2'
     The exit status is two if 'make' encounters any errors.  It will
     print messages describing the particular errors.
'1'
     The exit status is one if you use the '-q' flag and 'make'
     determines that some target is not already up to date.  *Note
     Instead of Executing Recipes: Instead of Execution.

* Menu:

* Makefile Arguments::          How to specify which makefile to use.
* Goals::                       How to use goal arguments to specify which
                                  parts of the makefile to use.
* Instead of Execution::        How to use mode flags to specify what
                                  kind of thing to do with the recipes
                                  in the makefile other than simply
                                  execute them.
* Avoiding Compilation::        How to avoid recompiling certain files.
* Overriding::                  How to override a variable to specify
                                  an alternate compiler and other things.
* Testing::                     How to proceed past some errors, to
                                  test compilation.
* Temporary Files::             Where 'make' keeps its temporary files.
* Options Summary::             Summary of Options

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.