On Sunday 29 October 2006 11:10, Garrett Cooper wrote:
> -How do I go about checking for external variables, as defined by a shell?
> -How do I go about checking for variables as defined in make.conf?
> -What do variable definitions generally look like in each of these
> cases, ie what's the difference between $$VAR, ${VAR}, and VAR?
AFAIK there is no way to differentiate between environmental variables and
ones set in a makefile. (or ones passed in via the command line)
I don't think $$FOO is a valid construct, also there is no difference between
$(FOO) ${FOO}, $FOO means ${F}OO.
> The reason why I'm asking is because I'm trying to make a set of
> FreeBSD makefiles and the following type of declaration doesn't work for
> some odd reason..
>
> .ifdef $$VAR
> @echo define $$VAR please!
> .else
> #do something to build program
> .endif
Try
.if !defined(VAR)
...
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
pgpKCdi49RFNb.pgp
Description: PGP signature

