bar = true example
Dan Jacobson <[email protected]> Fri, 27 Feb 2026 18:24:29 +0800
| Newsgroups | gmane.comp.gnu.make.bugs |
|---|---|
| Message-ID | <[email protected]> |
On (info "(make) Conditional Syntax")
bar = true
foo = bar
ifdef $(foo)
frobozz = yes
endif
The variable reference ‘$(foo)’ is expanded, yielding ‘bar’, which
is considered to be the name of a variable. The variable ‘bar’ is
not expanded, but its value is examined to determine if it is
non-empty.
OK, pound it home by adding: "The above example would work exactly the
same if bar = false or bar = bla."