1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
3
<!-- This file documents the GNU make utility, which determines
4
automatically which pieces of a large program need to be recompiled,
5
and issues the commands to recompile them.
7
This is Edition 0.70, last updated 1 April 2006,
8
of The GNU Make Manual, for GNU make version 3.81.
10
Copyright C 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
11
1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006
12
Free Software Foundation, Inc.
14
Permission is granted to copy, distribute and/or modify this document
15
under the terms of the GNU Free Documentation License, Version 1.2 or
16
any later version published by the Free Software Foundation; with no
17
Invariant Sections, with the Front-Cover Texts being "A GNU Manual,"
18
and with the Back-Cover Texts as in (a) below. A copy of the
19
license is included in the section entitled "GNU Free Documentation
22
(a) The FSF's Back-Cover Text is: "You have freedom to copy and modify
23
this GNU Manual, like GNU software. Copies published by the Free
24
Software Foundation raise funds for GNU development."
27
<!-- Created on August, 17 2009 by texi2html 1.78 -->
29
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
30
Karl Berry <karl@freefriends.org>
31
Olaf Bachmann <obachman@mathematik.uni-kl.de>
33
Maintained by: Many creative people.
34
Send bugs and suggestions to <texi2html-bug@nongnu.org>
38
<title>GNU make: 13. Incompatibilities and Missing Features</title>
40
<meta name="description" content="GNU make: 13. Incompatibilities and Missing Features">
41
<meta name="keywords" content="GNU make: 13. Incompatibilities and Missing Features">
42
<meta name="resource-type" content="document">
43
<meta name="distribution" content="global">
44
<meta name="Generator" content="texi2html 1.78">
45
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
46
<style type="text/css">
48
a.summary-letter {text-decoration: none}
49
pre.display {font-family: serif}
50
pre.format {font-family: serif}
51
pre.menu-comment {font-family: serif}
52
pre.menu-preformatted {font-family: serif}
53
pre.smalldisplay {font-family: serif; font-size: smaller}
54
pre.smallexample {font-size: smaller}
55
pre.smallformat {font-family: serif; font-size: smaller}
56
pre.smalllisp {font-size: smaller}
57
span.roman {font-family:serif; font-weight:normal;}
58
span.sansserif {font-family:sans-serif; font-weight:normal;}
59
ul.toc {list-style: none}
66
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
68
<a name="Missing"></a>
70
<table cellpadding="1" cellspacing="1" border="0">
71
<tr><td valign="middle" align="left">[<a href="make_12.html#SEC134" title="Previous section in reading order"> < </a>]</td>
72
<td valign="middle" align="left">[<a href="make_14.html#SEC136" title="Next section in reading order"> > </a>]</td>
73
<td valign="middle" align="left"> </td>
74
<td valign="middle" align="left">[<a href="make_12.html#SEC134" title="Beginning of this chapter or previous chapter"> << </a>]</td>
75
<td valign="middle" align="left">[<a href="make.html#SEC_Top" title="Up section"> Up </a>]</td>
76
<td valign="middle" align="left">[<a href="make_14.html#SEC136" title="Next chapter"> >> </a>]</td>
77
<td valign="middle" align="left"> </td>
78
<td valign="middle" align="left"> </td>
79
<td valign="middle" align="left"> </td>
80
<td valign="middle" align="left"> </td>
81
<td valign="middle" align="left">[<a href="make.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
82
<td valign="middle" align="left">[<a href="make_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
83
<td valign="middle" align="left">[<a href="make_19.html#SEC148" title="Index">Index</a>]</td>
84
<td valign="middle" align="left">[<a href="make_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
86
<h1 class="chapter"> 13. Incompatibilities and Missing Features </h1>
88
<p>The <code>make</code> programs in various other systems support a few features
89
that are not implemented in GNU <code>make</code>. The POSIX.2 standard
90
(<cite>IEEE Standard 1003.2-1992</cite>) which specifies <code>make</code> does not
91
require any of these features.
95
A target of the form ‘<samp><var>file</var>((<var>entry</var>))</samp>’ stands for a member
96
of archive file <var>file</var>. The member is chosen, not by name, but by
97
being an object file which defines the linker symbol <var>entry</var>.
99
<p>This feature was not put into GNU <code>make</code> because of the
100
nonmodularity of putting knowledge into <code>make</code> of the internal
101
format of archive file symbol tables.
102
See section <a href="make_11.html#SEC131">Updating Archive Symbol Directories</a>.
105
Suffixes (used in suffix rules) that end with the character ‘<samp>~</samp>’
106
have a special meaning to System V <code>make</code>;
107
they refer to the SCCS file that corresponds
108
to the file one would get without the ‘<samp>~</samp>’. For example, the
109
suffix rule ‘<samp>.c~.o</samp>’ would make the file ‘<tt><var>n</var>.o</tt>’ from
110
the SCCS file ‘<tt>s.<var>n</var>.c</tt>’. For complete coverage, a whole
111
series of such suffix rules is required.
112
See section <a href="make_10.html#SEC126">Old-Fashioned Suffix Rules</a>.
114
<p>In GNU <code>make</code>, this entire series of cases is handled by two
115
pattern rules for extraction from SCCS, in combination with the
116
general feature of rule chaining.
117
See section <a href="make_10.html#SEC117">Chains of Implicit Rules</a>.
120
In System V and 4.3 BSD <code>make</code>, files found by <code>VPATH</code> search
121
(see section <a href="make_4.html#SEC38">Searching Directories for Prerequisites</a>) have their names changed inside command
122
strings. We feel it is much cleaner to always use automatic variables
123
and thus make this feature obsolete.
126
In some Unix <code>make</code>s, the automatic variable <code>$*</code> appearing in
127
the prerequisites of a rule has the amazingly strange “feature” of
128
expanding to the full name of the <em>target of that rule</em>. We cannot
129
imagine what went on in the minds of Unix <code>make</code> developers to do
130
this; it is utterly inconsistent with the normal definition of <code>$*</code>.
131
<a name="IDX631"></a>
134
In some Unix <code>make</code>s, implicit rule search
135
(see section <a href="make_10.html#SEC113">Using Implicit Rules</a>) is apparently done for
136
<em>all</em> targets, not just those without commands. This means you can
139
<table><tr><td> </td><td><pre class="example">foo.o:
141
</pre></td></tr></table>
143
<p>and Unix <code>make</code> will intuit that ‘<tt>foo.o</tt>’ depends on
144
‘<tt>foo.c</tt>’.
146
<p>We feel that such usage is broken. The prerequisite properties of
147
<code>make</code> are well-defined (for GNU <code>make</code>, at least),
148
and doing such a thing simply does not fit the model.
151
GNU <code>make</code> does not include any built-in implicit rules for
152
compiling or preprocessing EFL programs. If we hear of anyone who is
153
using EFL, we will gladly add them.
156
It appears that in SVR4 <code>make</code>, a suffix rule can be specified with
157
no commands, and it is treated as if it had empty commands
158
(see section <a href="make_5.html#SEC73">Using Empty Commands</a>). For example:
160
<table><tr><td> </td><td><pre class="example">.c.a:
161
</pre></td></tr></table>
163
<p>will override the built-in ‘<tt>.c.a</tt>’ suffix rule.
165
<p>We feel that it is cleaner for a rule without commands to always simply
166
add to the prerequisite list for the target. The above example can be
167
easily rewritten to get the desired behavior in GNU <code>make</code>:
169
<table><tr><td> </td><td><pre class="example">.c.a: ;
170
</pre></td></tr></table>
173
Some versions of <code>make</code> invoke the shell with the ‘<samp>-e</samp>’ flag,
174
except under ‘<samp>-k</samp>’ (see section <a href="make_9.html#SEC111">Testing the Compilation of a Program</a>). The ‘<samp>-e</samp>’ flag tells the shell to exit as soon as any
175
program it runs returns a nonzero status. We feel it is cleaner to
176
write each shell command line to stand on its own and not require this
182
<table cellpadding="1" cellspacing="1" border="0">
183
<tr><td valign="middle" align="left">[<a href="make_12.html#SEC134" title="Beginning of this chapter or previous chapter"> << </a>]</td>
184
<td valign="middle" align="left">[<a href="make_14.html#SEC136" title="Next chapter"> >> </a>]</td>
185
<td valign="middle" align="left"> </td>
186
<td valign="middle" align="left"> </td>
187
<td valign="middle" align="left"> </td>
188
<td valign="middle" align="left"> </td>
189
<td valign="middle" align="left"> </td>
190
<td valign="middle" align="left">[<a href="make.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
191
<td valign="middle" align="left">[<a href="make_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
192
<td valign="middle" align="left">[<a href="make_19.html#SEC148" title="Index">Index</a>]</td>
193
<td valign="middle" align="left">[<a href="make_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
197
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>.