How to write a FreeBSD-style makefile : checking for external vars existence?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
I was just wondering...

- -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?

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

Make reports errors in the above case if I put anything in other
than VAR, which is confusing given my knowledge of shell scripting and
so on.
TIA,
- -Garrett
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFQ/h36CkrZkzMC68RAv9jAJ4wrk2LKzOYwEoXFmjcCrCh4eEewgCeKTwj
+7BbbZ5ThjGJiOUZARwmoos=
=/FVX
-----END PGP SIGNATURE-----
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: bitcopy in delphi.
    ... > Delphi. ... part of the reason your code looks simpler. ... destination buffers overlap. ...
    (alt.comp.lang.borland-delphi)
  • Re: questions about colon ":" command
    ... The ":" command itself ignores its arguments and returns an exit code ... Read the section in the man page for your favourite bourne-style shell ... If $var is either null ... brianmwaters> it used in so many shell scripts? ...
    (comp.unix.shell)
  • Re: SolidWorks Subscription
    ... likely that if my VAR won't give me a break I simply won't ante up at ... 2006 for that reason, and I probably won't be anytime soon. ... > development in the last six years as a licensed user. ... > customers to continue this practice. ...
    (comp.cad.solidworks)
  • Re: its not the school home work
    ... and the meaning of the different quotes... ... Shell quoting is very confusing. ... to constant strings, in shells they are used to refer to ... $var is taken by the shell as a list of file patterns to expand. ...
    (comp.unix.shell)
  • Re: how does this function work?
    ... others to display. ... Any reason for that? ... Geoff ... > var ig = 0; ...
    (comp.lang.javascript)