mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-02-07 06:47:52 +00:00
Formerly make.texinfo.~123~
This commit is contained in:
parent
c33908dea5
commit
386d0a7ffc
1 changed files with 30 additions and 11 deletions
41
make.texinfo
41
make.texinfo
|
@ -7,10 +7,10 @@
|
||||||
|
|
||||||
@c FSF publishers: format makebook.texi instead of using this file directly.
|
@c FSF publishers: format makebook.texi instead of using this file directly.
|
||||||
|
|
||||||
@set EDITION 0.44
|
@set EDITION 0.45
|
||||||
@set VERSION 3.69 Beta
|
@set VERSION 3.70 Beta
|
||||||
@set UPDATED 3 November 1993
|
@set UPDATED 14 December 1993
|
||||||
@set UPDATE-MONTH November 1993
|
@set UPDATE-MONTH December 1993
|
||||||
|
|
||||||
@c finalout
|
@c finalout
|
||||||
|
|
||||||
|
@ -3764,20 +3764,39 @@ use the expansion functions much more efficiently
|
||||||
(@pxref{Functions, ,Functions for Transforming Text}).
|
(@pxref{Functions, ,Functions for Transforming Text}).
|
||||||
|
|
||||||
@cindex spaces, in variable values
|
@cindex spaces, in variable values
|
||||||
|
@cindex whitespace, in variable values
|
||||||
@cindex variables, spaces in values
|
@cindex variables, spaces in values
|
||||||
You can also use them to introduce controlled leading or trailing spaces
|
You can also use them to introduce controlled leading whitespace into
|
||||||
into variable values. Such spaces are discarded from your input before
|
variable values. Leading whitespace characters are discarded from your
|
||||||
substitution of variable references and function calls; this means you can
|
input before substitution of variable references and function calls;
|
||||||
include leading or trailing spaces in a variable value by protecting them
|
this means you can include leading spaces in a variable value by
|
||||||
with variable references, like this:
|
protecting them with variable references, like this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
nullstring :=
|
nullstring :=
|
||||||
space := $(nullstring) $(nullstring)
|
space := $(nullstring) # end of the line
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
Here the value of the variable @code{space} is precisely one space.
|
Here the value of the variable @code{space} is precisely one space. The
|
||||||
|
comment @w{@samp{# end of the line}} is included here just for clarity.
|
||||||
|
Since trailing space characters are @emph{not} stripped from variable
|
||||||
|
values, just a space at the end of the line would have the same effect
|
||||||
|
(but be rather hard to read). If you put whitespace at the end of a
|
||||||
|
variable value, it is a good idea to put a comment like that at the end
|
||||||
|
of the line to make your intent clear. Conversely, if you do @emph{not}
|
||||||
|
want any whitespace characters at the end of your variable value, you
|
||||||
|
must remember not to put a random comment on the end of the line after
|
||||||
|
some whitespace, such as this:
|
||||||
|
|
||||||
|
@example
|
||||||
|
dir := /foo/bar # directory to put the frobs in
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@noindent
|
||||||
|
Here the value of the variable @code{dir} is @w{@samp{/foo/bar }}
|
||||||
|
(with four trailing spaces), which was probably not the intention.
|
||||||
|
(Imagine something like @w{@samp{$(dir)/file}} with this definition!)
|
||||||
|
|
||||||
@node Advanced, Values, Flavors, Using Variables
|
@node Advanced, Values, Flavors, Using Variables
|
||||||
@section Advanced Features for Reference to Variables
|
@section Advanced Features for Reference to Variables
|
||||||
|
|
Loading…
Reference in a new issue