Ignore:
Timestamp:
Sep 8, 2004, 4:43:30 AM (21 years ago)
Author:
bird
Message:

GNU Make 3.81beta1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gmake/doc/make.texi

    r53 r153  
    88@c FSF publishers: format makebook.texi instead of using this file directly.
    99
    10 @set RCSID $Id: make.texi,v 1.16 2003/11/03 22:04:12 psmith Exp $
     10@set RCSID $Id: make.texi,v 1.18 2004/02/23 06:25:54 psmith Exp $
    1111@set EDITION 0.61
    1212@set VERSION 3.81
     
    3939of @cite{The GNU Make Manual}, for @code{make}, Version @value{VERSION}.
    4040
    41 Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
     41Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
     421998, 1999, 2000, 2002, 2003, 2004
    4243Free Software Foundation, Inc.
    4344
     
    5859@subtitle GNU @code{make} Version @value{VERSION}
    5960@subtitle @value{UPDATE-MONTH}
    60 @author Richard M. Stallman, Roland McGrath, Paul Smith
     61@author Richard M. Stallman, Roland McGrath, Paul D. Smith
    6162@page
    6263@vskip 0pt plus 1filll
    6364Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
    64 1996, 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
     651996, 1997, 1998, 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
    6566@sp 2
    6667Published by the Free Software Foundation @*
     
    351352This manual describes GNU @code{make}, which was implemented by Richard
    352353Stallman and Roland McGrath.  Development since Version 3.76 has been
    353 handled by Paul Smith.
     354handled by Paul D. Smith.
    354355
    355356GNU @code{make} conforms to section 6.2 of @cite{IEEE Standard
     
    19491950directories that @code{make} should search.  Most often, the
    19501951directories are expected to contain prerequisite files that are not in the
    1951 current directory; however, @code{VPATH} specifies a search list that
    1952 @code{make} applies for all files, including files which are targets of
    1953 rules.
     1952current directory; however, @code{make} uses @code{VPATH} as a search
     1953list for both prerequisites and targets of rules.
    19541954
    19551955Thus, if a file that is listed as a target or prerequisite does not exist
     
    36763676Using the @code{MAKE} variable has the same effect as using a @samp{+}
    36773677character at the beginning of the command line.  @xref{Instead of
    3678 Execution, ,Instead of Executing the Commands}.@refill
     3678Execution, ,Instead of Executing the Commands}.  This special feature
     3679is only enabled if the @code{MAKE} variable appears directly in the
     3680command script: it does not apply if the @code{MAKE} variable is
     3681referenced through expansion of another variable.  In the latter case
     3682you must use the @samp{+} token to get these special effects.@refill
    36793683
    36803684Consider the command @samp{make -t} in the above example.  (The
     
    52265230variable value to be preferred.
    52275231
    5228 There is one more special feature of target-specific variables: when you
    5229 define a target-specific variable, that variable value is also in effect
    5230 for all prerequisites of this target (unless those prerequisites override
    5231 it with their own target-specific variable value).  So, for example, a
     5232There is one more special feature of target-specific variables: when
     5233you define a target-specific variable that variable value is also in
     5234effect for all prerequisites of this target, and all their
     5235prerequisites, etc. (unless those prerequisites override that variable
     5236with their own target-specific variable value).  So, for example, a
    52325237statement like this:
    52335238
     
    52415246@file{prog}, but it will also set @code{CFLAGS} to @samp{-g} in the
    52425247command scripts that create @file{prog.o}, @file{foo.o}, and
    5243 @file{bar.o}, and any command scripts which create their prerequisites.
     5248@file{bar.o}, and any command scripts which create their
     5249prerequisites.
     5250
     5251Be aware that a given prerequisite will only be built once per
     5252invocation of make, at most.  If the same file is a prerequisite of
     5253multiple targets, and each of those targets has a different value for
     5254the same target-specific variable, then the first target to be built
     5255will cause that prerequisite to be built and the prerequisite will
     5256inherit the target-specific value from the first target.  It will
     5257ignore the target-specific values from any other targets.
    52445258
    52455259@node Pattern-specific,  , Target-specific, Using Variables
     
    64566470
    64576471define PROGRAM_template
    6458  $(1): $$($(1)_OBJ) $$($(1)_LIBS:%=-l%)
     6472 $(1): $$($(1)_OBJS) $$($(1)_LIBS:%=-l%)
    64596473 ALL_OBJS   += $$($(1)_OBJS)
    64606474endef
     
    65866600@cindex shell command, function for
    65876601
    6588 The @code{shell} function is unlike any other function except the
     6602The @code{shell} function is unlike any other function other than the
    65896603@code{wildcard} function
    65906604(@pxref{Wildcard Function, ,The Function @code{wildcard}}) in that it
     
    65926606
    65936607The @code{shell} function performs the same function that backquotes
    6594 (@samp{`}) perform in most shells: it does @dfn{command expansion}.  This
    6595 means that it takes an argument that is a shell command and returns the
    6596 output of the command.  The only processing @code{make} does on the result,
    6597 before substituting it into the surrounding text, is to convert each
    6598 newline or carriage-return / newline pair to a single space.  It also
    6599 removes the trailing (carriage-return and) newline, if it's the last
    6600 thing in the result.@refill
     6608(@samp{`}) perform in most shells: it does @dfn{command expansion}.
     6609This means that it takes as an argument a shell command and evaluates
     6610to the output of the command.  The only processing @code{make} does on
     6611the result is to convert each newline (or carriage-return / newline
     6612pair) to a single space.  If there is a trailing (carriage-return
     6613and) newline it will simply be removed.@refill
    66016614
    66026615The commands run by calls to the @code{shell} function are run when the
Note: See TracChangeset for help on using the changeset viewer.