From owner-freebsd-ports@FreeBSD.ORG Tue Dec 29 11:17:31 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 293A61065670 for ; Tue, 29 Dec 2009 11:17:31 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id C9AE48FC1B for ; Tue, 29 Dec 2009 11:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codelabs.ru; s=two; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=nHdEmIf7awBDWQDXvTIEMbsvjzUeIjtB6yn71RSv8ow=; b=qEN0zSVjrNaBVRHLRcYocthxp31TBt67+SWQehAmq3TY1e4hBKikt0mMM2ntsjBapIMWykC1EgpF8uJlqxJzqMbnaWnwCULYsDBfV2j3yxwHmVy/8GC6afXRbGSSQjsBaEWAynHsEkb3QZX0COHD3mA8+ufS3qISx7/aRJSvqkWnf69Ng9S0qu+S7aaTq6dkoK8v1xOPVj0NBN5DA9//o24cqjbTRueF8lZkPRwsnlsA7g440Zx7gk6vtTzyyic/000HxBDKnYytM2yLihDw1pC7hONnyE6p1rk2hAbZ9LtQAHrNWDtmCpf9PE+qgXU21rhgYoi9UUpNgqke4kSXIQ==; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1NPa4l-000KTS-Bw; Tue, 29 Dec 2009 14:17:19 +0300 Date: Tue, 29 Dec 2009 14:17:17 +0300 From: Eygene Ryabinkin To: Yuri Pankov Message-ID: References: <790a9fff0912282328o35ba5abfg580c01ec851e6c95@mail.gmail.com> <20091229074002.GA3117@darklight.org.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091229074002.GA3117@darklight.org.ru> Sender: rea-fbsd@codelabs.ru Cc: Scot Hetzel , Yevgen Krapiva , freebsd-ports@freebsd.org Subject: Re: (no subject) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2009 11:17:31 -0000 Tue, Dec 29, 2009 at 10:40:02AM +0300, Yuri Pankov wrote: > On Tue, Dec 29, 2009 at 01:28:46AM -0600, Scot Hetzel wrote: > > dv8t01# make do-check > > File /usr/local/etc/rc.d/motd exists > > File /usr/local/etc/rc.d/hald doesnt exist > > > > This Makefile fails due to LOCALBASE is not defined at the time that > > the exists check is run. > > How come that ${DATADIR} (and ${LOCALBASE}) are correctly expanded in > ${ECHO_MSG} then? .if and .for are unrolled and evaluated while parsing the makefile and make transforms it to bare "@${ECHO_MSG} ..." lines with the content that depends on the if-else-endif evaluation. LOCALBASE isn't defined at that time And targets are executed after the whole Makefile was read, so LOCALBASE is here. Actually, the found "/usr/local/etc/rc.d/motd" is really an "/etc/rc.d/motd". -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #