From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 00:40:51 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 511A816A403 for ; Sun, 29 Oct 2006 00:40:51 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout2.cac.washington.edu (mxout2.cac.washington.edu [140.142.33.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C095043D4C for ; Sun, 29 Oct 2006 00:40:50 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.7]) by mxout2.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id k9T0eoCt003412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 28 Oct 2006 17:40:50 -0700 X-Auth-Received: from [192.168.0.101] (dsl254-013-145.sea1.dsl.speakeasy.net [216.254.13.145]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id k9T0ei8F024902 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 28 Oct 2006 17:40:48 -0700 Message-ID: <4543F878.2020006@u.washington.edu> Date: Sat, 28 Oct 2006 17:40:24 -0700 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.7 (X11/20060929) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.0.266434, Antispam-Engine: 2.4.0.264935, Antispam-Data: 2006.10.28.172933 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __LINES_OF_YELLING 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: How to write a FreeBSD-style makefile : checking for external vars existence? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Oct 2006 00:40:51 -0000 -----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-----