/usr/share/doc/make-doc/make_1.html is in make-doc 3.81-5.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- This file documents the GNU make utility, which determines
automatically which pieces of a large program need to be recompiled,
and issues the commands to recompile them.
This is Edition 0.70, last updated 1 April 2006,
of The GNU Make Manual, for GNU make version 3.81.
Copyright C 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover Texts being "A GNU Manual,"
and with the Back-Cover Texts as in (a) below. A copy of the
license is included in the section entitled "GNU Free Documentation
License."
(a) The FSF's Back-Cover Text is: "You have freedom to copy and modify
this GNU Manual, like GNU software. Copies published by the Free
Software Foundation raise funds for GNU development."
-->
<!-- Created on August, 17 2009 by texi2html 1.78 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>GNU make: 1. Overview of make</title>
<meta name="description" content="GNU make: 1. Overview of make">
<meta name="keywords" content="GNU make: 1. Overview of make">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.78">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Overview"></a>
<a name="SEC1"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="make.html#SEC_Top" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC3" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[ << ]</td>
<td valign="middle" align="left">[<a href="make.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="make_2.html#SEC5" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="make.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="make_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="make_19.html#SEC148" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="make_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 1. Overview of <code>make</code> </h1>
<p>The <code>make</code> utility automatically determines which pieces of a large
program need to be recompiled, and issues commands to recompile them.
This manual describes GNU <code>make</code>, which was implemented by Richard
Stallman and Roland McGrath. Development since Version 3.76 has been
handled by Paul D. Smith.
</p>
<p>GNU <code>make</code> conforms to section 6.2 of <cite>IEEE Standard
1003.2-1992</cite> (POSIX.2).
<a name="IDX1"></a>
<a name="IDX2"></a>
<a name="IDX3"></a>
</p>
<p>Our examples show C programs, since they are most common, but you can use
<code>make</code> with any programming language whose compiler can be run with a
shell command. Indeed, <code>make</code> is not limited to programs. You can
use it to describe any task where some files must be updated automatically
from others whenever the others change.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Preparing">• Preparing</a></td><td> </td><td align="left" valign="top"> Preparing and Running Make
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC3">1.1 How to Read This Manual</a></td><td> </td><td align="left" valign="top"> On Reading this Text
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC4">1.2 Problems and Bugs</a></td><td> </td><td align="left" valign="top"></td></tr>
</table>
<a name="Preparing"></a>
<a name="SEC2"></a>
<h2 class="heading"> Preparing and Running Make </h2>
<p>To prepare to use <code>make</code>, you must write a file called
the <em>makefile</em> that describes the relationships among files
in your program and provides commands for updating each file.
In a program, typically, the executable file is updated from object
files, which are in turn made by compiling source files.
</p>
<p>Once a suitable makefile exists, each time you change some source files,
this simple shell command:
</p>
<table><tr><td> </td><td><pre class="example">make
</pre></td></tr></table>
<p>suffices to perform all necessary recompilations. The <code>make</code> program
uses the makefile data base and the last-modification times of the files to
decide which of the files need to be updated. For each of those files, it
issues the commands recorded in the data base.
</p>
<p>You can provide command line arguments to <code>make</code> to control which
files should be recompiled, or how. See section <a href="make_9.html#SEC105">How to Run <code>make</code></a>.
</p>
<hr size="6">
<a name="Reading"></a>
<a name="SEC3"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC1" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC4" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC1" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="make_2.html#SEC5" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="make.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="make_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="make_19.html#SEC148" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="make_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 1.1 How to Read This Manual </h2>
<p>If you are new to <code>make</code>, or are looking for a general
introduction, read the first few sections of each chapter, skipping the
later sections. In each chapter, the first few sections contain
introductory or general information and the later sections contain
specialized or technical information.
The exception is the second chapter, <a href="make_2.html#SEC5">An Introduction to Makefiles</a>, all of which is introductory.
</p>
<p>If you are familiar with other <code>make</code> programs, see <a href="make_12.html#SEC134">Features of GNU <code>make</code></a>, which lists the enhancements GNU
<code>make</code> has, and <a href="make_13.html#SEC135">Incompatibilities and Missing Features</a>, which explains the few things GNU <code>make</code> lacks that
others have.
</p>
<p>For a quick summary, see <a href="make_9.html#SEC112">Summary of Options</a>, <a href="make_15.html#SEC143">Quick Reference</a>,
and <a href="make_4.html#SEC48">Special Built-in Target Names</a>.
</p>
<hr size="6">
<a name="Bugs"></a>
<a name="SEC4"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC3" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="make_2.html#SEC5" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC1" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="make_2.html#SEC5" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="make.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="make_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="make_19.html#SEC148" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="make_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 1.2 Problems and Bugs </h2>
<p>If you have problems with GNU <code>make</code> or think you've found a bug,
please report it to the developers; we cannot promise to do anything but
we might well want to fix it.
</p>
<p>Before reporting a bug, make sure you've actually found a real bug.
Carefully reread the documentation and see if it really says you can do
what you're trying to do. If it's not clear whether you should be able
to do something or not, report that too; it's a bug in the
documentation!
</p>
<p>Before reporting a bug or trying to fix it yourself, try to isolate it
to the smallest possible makefile that reproduces the problem. Then
send us the makefile and the exact results <code>make</code> gave you,
including any error or warning messages. Please don't paraphrase
these messages: it's best to cut and paste them into your report.
When generating this small makefile, be sure to not use any non-free
or unusual tools in your commands: you can almost always emulate what
such a tool would do with simple shell commands. Finally, be sure to
explain what you expected to occur; this will help us decide whether
the problem was really in the documentation.
</p>
<p>Once you have a precise problem you can report it in one of two ways.
Either send electronic mail to:
</p>
<table><tr><td> </td><td><pre class="example"> bug-make@gnu.org
</pre></td></tr></table>
<p>or use our Web-based project management tool, at:
</p>
<table><tr><td> </td><td><pre class="example"> http://savannah.gnu.org/projects/make/
</pre></td></tr></table>
<p>In addition to the information above, please be careful to include the
version number of <code>make</code> you are using. You can get this
information with the command ‘<samp>make --version</samp>’. Be sure also to
include the type of machine and operating system you are using. One
way to obtain this information is by looking at the final lines of
output from the command ‘<samp>make --help</samp>’.
</p>
<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC1" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="make_2.html#SEC5" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="make.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="make_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="make_19.html#SEC148" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="make_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
<font size="-1">
This document was generated by <em>Manoj Srivastava</em> on <em>August, 17 2009</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.78</em></a>.
</font>
<br>
</p>
</body>
</html>
|