Date: Sun, 29 Oct 2006 11:20:21 +0930 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: freebsd-hackers@freebsd.org Cc: Garrett Cooper <youshi10@u.washington.edu> Subject: Re: How to write a FreeBSD-style makefile : checking for external vars existence? Message-ID: <200610291220.35363.doconnor@gsoft.com.au> In-Reply-To: <4543F878.2020006@u.washington.edu> References: <4543F878.2020006@u.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1926769.yE4iDYJp9d Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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= =20 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 betwe= en=20 $(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 =2Eif !defined(VAR) =2E.. =2D-=20 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 --nextPart1926769.yE4iDYJp9d Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFRAjr5ZPcIHs/zowRArE6AJ0avQHpO7GAHf96MEjSdIwt7FH9LwCfcY7q t+jxWtqCxRn3RMNF980XecM= =rs2t -----END PGP SIGNATURE----- --nextPart1926769.yE4iDYJp9d--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610291220.35363.doconnor>