Help: short/long variable reference in if command

Explain that the short form of variable references
in the if command does not apply to ENV and CACHE vars.
This commit is contained in:
Joachim Wuttke (l)
2018-11-01 11:13:03 +01:00
committed by Joachim Wuttke (h)
parent 85498fccd8
commit 8ba2a8d4a4
2 changed files with 14 additions and 4 deletions

View File

@@ -231,7 +231,7 @@ which is true because ``var2`` is defined to "var1" which is not a false
constant.
Automatic evaluation applies in the other cases whenever the
above-documented signature accepts ``<variable|string>``:
above-documented condition syntax accepts ``<variable|string>``:
* The left hand argument to ``MATCHES`` is first checked to see if it is
a defined variable, if so the variable's value is used, otherwise the
@@ -269,3 +269,7 @@ specified in a :ref:`Quoted Argument` or a :ref:`Bracket Argument`.
A quoted or bracketed variable or keyword will be interpreted as a
string and not dereferenced or interpreted.
See policy :policy:`CMP0054`.
There is no short form for environment or cache :ref:`Variable References`.
They can be referenced as ``$ENV{<name>}`` or ``$CACHE{<name>}``
wherever the above-documented condition syntax accepts <variable|string>.