mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-10-24 05:09:57 +00:00
Formerly make.texinfo.~109~
This commit is contained in:
parent
cace096aba
commit
d24f1f2330
1 changed files with 14 additions and 9 deletions
23
make.texinfo
23
make.texinfo
|
@ -4174,16 +4174,20 @@ it is this unexpanded text to which @code{make} appends the new text you
|
||||||
specify.
|
specify.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
@group
|
||||||
variable = value
|
variable = value
|
||||||
variable += more
|
variable += more
|
||||||
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
is roughly equivalent to:
|
is roughly equivalent to:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
@group
|
||||||
temp = value
|
temp = value
|
||||||
variable = $(temp) more
|
variable = $(temp) more
|
||||||
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
|
@ -4213,15 +4217,16 @@ CFLAGS := $(CFLAGS) -pg # enable profiling
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
This is close, but not quite what we want. Using @samp{:=} redefines
|
This is pretty close, but not quite what we want. Using @samp{:=}
|
||||||
@code{CFLAGS} as a simply-expanded variable; this means @code{make} expands
|
redefines @code{CFLAGS} as a simply-expanded variable; this means
|
||||||
the text @w{@samp{$(CFLAGS) -pg}} before setting the variable. If
|
@code{make} expands the text @w{@samp{$(CFLAGS) -pg}} before setting the
|
||||||
@code{includes} is not yet defined, we get @w{@samp{ -O -pg}}, and a later
|
variable. If @code{includes} is not yet defined, we get @w{@samp{ -O
|
||||||
definition of @code{includes} will have no effect. Conversely, by using
|
-pg}}, and a later definition of @code{includes} will have no effect.
|
||||||
@samp{+=} we set @code{CFLAGS} to the @emph{unexpanded} value
|
Conversely, by using @samp{+=} we set @code{CFLAGS} to the
|
||||||
@w{@samp{$(includes) -O -pg}}. Thus we preserve the reference to
|
@emph{unexpanded} value @w{@samp{$(includes) -O -pg}}. Thus we preserve
|
||||||
@code{includes}, so if that variable gets defined at any later point, a
|
the reference to @code{includes}, so if that variable gets defined at
|
||||||
reference like @samp{$(CFLAGS)} still uses its value.
|
any later point, a reference like @samp{$(CFLAGS)} still uses its
|
||||||
|
value.
|
||||||
|
|
||||||
@node Override Directive, Defining, Appending, Using Variables
|
@node Override Directive, Defining, Appending, Using Variables
|
||||||
@section The @code{override} Directive
|
@section The @code{override} Directive
|
||||||
|
|
Loading…
Reference in a new issue