mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-01-31 00:53:23 +00:00
Disallow whitespace in variable names.
This commit is contained in:
parent
3f6bb04e75
commit
4e2e5eb199
1 changed files with 11 additions and 9 deletions
|
@ -4834,13 +4834,15 @@ Variables can represent lists of file names, options to pass to compilers,
|
||||||
programs to run, directories to look in for source files, directories to
|
programs to run, directories to look in for source files, directories to
|
||||||
write output in, or anything else you can imagine.
|
write output in, or anything else you can imagine.
|
||||||
|
|
||||||
A variable name may be any sequence of characters not containing @samp{:},
|
A variable name may be any sequence of characters not containing
|
||||||
@samp{#}, @samp{=}, or leading or trailing whitespace. However,
|
@samp{:}, @samp{#}, @samp{=}, or whitespace. However, variable names
|
||||||
variable names containing characters other than letters, numbers, and
|
containing characters other than letters, numbers, and underscores
|
||||||
underscores should be avoided, as they may be given special meanings in the
|
should be considered carefully, as in some shells they cannot be
|
||||||
future, and with some shells they cannot be passed through the environment to a
|
passed through the environment to a sub-@code{make}
|
||||||
sub-@code{make}
|
(@pxref{Variables/Recursion, ,Communicating Variables to a
|
||||||
(@pxref{Variables/Recursion, ,Communicating Variables to a Sub-@code{make}}).
|
Sub-@code{make}}). Variable names beginning with @samp{.} and an
|
||||||
|
uppercase letter may be given special meaning in future versions of
|
||||||
|
@code{make}.
|
||||||
|
|
||||||
Variable names are case-sensitive. The names @samp{foo}, @samp{FOO},
|
Variable names are case-sensitive. The names @samp{foo}, @samp{FOO},
|
||||||
and @samp{Foo} all refer to different variables.
|
and @samp{Foo} all refer to different variables.
|
||||||
|
@ -7292,12 +7294,12 @@ variable names because many strange things are valid variable names, but
|
||||||
are probably not what you intended. For example,
|
are probably not what you intended. For example,
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
files := $(foreach Esta escrito en espanol!,b c ch,$(find_files))
|
files := $(foreach Esta-escrito-en-espanol!,b c ch,$(find_files))
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
might be useful if the value of @code{find_files} references the variable
|
might be useful if the value of @code{find_files} references the variable
|
||||||
whose name is @samp{Esta escrito en espanol!} (es un nombre bastante largo,
|
whose name is @samp{Esta-escrito-en-espanol!} (es un nombre bastante largo,
|
||||||
no?), but it is more likely to be a mistake.
|
no?), but it is more likely to be a mistake.
|
||||||
|
|
||||||
@node Call Function, Value Function, Foreach Function, Functions
|
@node Call Function, Value Function, Foreach Function, Functions
|
||||||
|
|
Loading…
Reference in a new issue