From 76a099997bf9df9c21c01b8e9611d30fb5f3268e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 25 Mar 2021 01:18:30 -0400 Subject: [PATCH] * doc/make.texi (Automatic Variables): Relocate the $? example Copyright-paperwork-exempt: yes --- doc/make.texi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/make.texi b/doc/make.texi index 60c75d60..45d3cec7 100644 --- a/doc/make.texi +++ b/doc/make.texi @@ -10243,6 +10243,18 @@ The names of all the prerequisites that are newer than the target, with spaces between them. If the target does not exist, all prerequisites will be included. For prerequisites which are archive members, only the named member is used (@pxref{Archives}). + +@samp{$?} is useful even in explicit rules when you wish to operate on only +the prerequisites that have changed. For example, suppose that an archive +named @file{lib} is supposed to contain copies of several object files. +This rule copies just the changed object files into the archive: + +@example +@group +lib: foo.o bar.o lose.o win.o + ar r lib $? +@end group +@end example @cindex prerequisites, list of changed @cindex list of changed prerequisites @@ -10299,18 +10311,6 @@ If the target name in an explicit rule does not end with a recognized suffix, @samp{$*} is set to the empty string for that rule. @end table -@samp{$?} is useful even in explicit rules when you wish to operate on only -the prerequisites that have changed. For example, suppose that an archive -named @file{lib} is supposed to contain copies of several object files. -This rule copies just the changed object files into the archive: - -@example -@group -lib: foo.o bar.o lose.o win.o - ar r lib $? -@end group -@end example - Of the variables listed above, four have values that are single file names, and three have values that are lists of file names. These seven have variants that get just the file's directory name or just