(Archive Members): Don't say archive file must exist. Instead, in ar cmds
authorRoland McGrath <roland@redhat.com>
Thu, 21 Apr 1994 00:55:18 +0000 (00:55 +0000)
committerRoland McGrath <roland@redhat.com>
Thu, 21 Apr 1994 00:55:18 +0000 (00:55 +0000)
example, use `c' flag and mention it is needed if archive doesn't exist.
(Archive Update): Fix typo: foo.o -> file.o.

make.texinfo

index 87f660a2439a741bd0f915af0fde40988da00073..cdbf9040ce3ce37ef7c5658d001e7c13dceb87b1 100644 (file)
@@ -7609,8 +7609,7 @@ main use is as subroutine libraries for linking.
 @cindex archive member targets
 
 An individual member of an archive file can be used as a target or
-dependency in @code{make}.  The archive file must already exist, but the
-member need not exist.  You specify the member named @var{member} in
+dependency in @code{make}.  You specify the member named @var{member} in
 archive file @var{archive} as follows:
 
 @example
@@ -7628,11 +7627,13 @@ use @code{ar}.  For example, this rule says to create a member
 
 @example
 foolib(hack.o) : hack.o
-        ar r foolib hack.o
+        ar cr foolib hack.o
 @end example
 
 In fact, nearly all archive member targets are updated in just this way
-and there is an implicit rule to do it for you.
+and there is an implicit rule to do it for you.  @strong{Note:} The
+@samp{c} flag to @code{ar} is required if the archive file does not
+already exist.
 
 To specify several members in the same archive, you can write all the
 member names together between the parentheses.  For example:
@@ -7700,8 +7701,8 @@ ar r foo.a dir/file.o
 @end example
 
 @noindent
-which has the effect of copying the file @file{dir/foo.o} into a member
-named @file{foo.o}.  In connection with such usage, the automatic variables
+which has the effect of copying the file @file{dir/file.o} into a member
+named @file{file.o}.  In connection with such usage, the automatic variables
 @code{%D} and @code{%F} may be useful.
 
 @menu