From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 19 06:42:52 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0807F16A4A0 for ; Tue, 19 Dec 2006 06:42:52 +0000 (UTC) (envelope-from zombyfork@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DE7243CA0 for ; Tue, 19 Dec 2006 06:42:51 +0000 (GMT) (envelope-from zombyfork@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so1499927uge for ; Mon, 18 Dec 2006 22:42:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=ohXO3mQWWdcoPKLCMekrprFZbBNO8hJGTSpnfaGKkKlWX23yn3SXYSsNm3sNjY48KpKDYei2fvjXQyABcOGQinOxg9hZzyxGhW8Ec7PTdclERNBq0aj21GLOKEioT0iwljuKv9nBrufCh1fd3KtV4kuXMjXgVXkqYRcxooD1RAg= Received: by 10.78.193.19 with SMTP id q19mr3876147huf.1166509081563; Mon, 18 Dec 2006 22:18:01 -0800 (PST) Received: by 10.78.168.20 with HTTP; Mon, 18 Dec 2006 22:18:01 -0800 (PST) Message-ID: <346a80220612182218m1d2586cbhe0679fdbbb3cec08@mail.gmail.com> Date: Mon, 18 Dec 2006 23:18:01 -0700 From: "Coleman Kane" To: freebsd@alaskaparadise.com In-Reply-To: <200612182030.42795.freebsd@alaskaparadise.com> MIME-Version: 1.0 References: <200612182030.42795.freebsd@alaskaparadise.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: if exists statement X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: cokane@cokane.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2006 06:42:52 -0000 On 12/18/06, Beech Rintoul wrote: > > I'm trying to write an if exists for a port makefile. > > I tried: > > .if exists= ${PREFIX}/etc/rc.d > exit > else > ${MKDIR} ${PREFIX}/etc/rc.d > .endif > > but it doesn't work. > > Can someone give me the right syntax? > > TIA > > Beech > -- I think you want something like: .if exists($(PREFIX)/etc/rc.d) ... -- Coleman Kane