Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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. See section Instead of Executing the Commands.

9.1 Arguments to Specify the Makefile  How to specify which makefile to use.
9.2 Arguments to Specify the Goals  How to use goal arguments to specify which parts of the makefile to use.
9.3 Instead of Executing the Commands  How to use mode flags to specify what kind of thing to do with the commands in the makefile other than simply execute them.
9.4 Avoiding Recompilation of Some Files  How to avoid recompiling certain files.
9.5 Overriding Variables  How to override a variable to specify an alternate compiler and other things.
9.6 Testing the Compilation of a Program  How to proceed past some errors, to test compilation.
9.7 Summary of Options  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

 
 
  Published under the terms of the GNU General Public License Design by Interspire