From owner-freebsd-ports@FreeBSD.ORG Mon Feb 2 21:05:12 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA23F16A4CE for ; Mon, 2 Feb 2004 21:05:12 -0800 (PST) Received: from postman.arcor.de (postman4.arcor-online.net [151.189.0.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02A6143D31 for ; Mon, 2 Feb 2004 21:05:11 -0800 (PST) (envelope-from eikemeier@fillmore-labs.com) Received: from fillmore.dyndns.org (port-212-202-51-21.reverse.qsc.de [212.202.51.21]) (authenticated bits=0)i1354pUa013986 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 3 Feb 2004 06:04:52 +0100 (MET) Received: from [172.16.0.2] (helo=fillmore-labs.com) by fillmore.dyndns.org with esmtp (Exim 4.30; FreeBSD) id 1Ansjz-00030Q-L8; Tue, 03 Feb 2004 06:04:51 +0100 Message-ID: <401F2BF4.4080300@fillmore-labs.com> Date: Tue, 03 Feb 2004 06:04:52 +0100 From: Oliver Eikemeier Organization: Fillmore Labs GmbH - http://www.fillmore-labs.com/ MIME-Version: 1.0 To: Sergey Matveychuk References: <401F14D6.4020201@ciam.ru> In-Reply-To: <401F14D6.4020201@ciam.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit User-Agent: KMail/1.5.9 cc: ports@freebsd.org Subject: Re: Makefile: .if inside .for X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2004 05:05:12 -0000 Sergey Matveychuk wrote: > man make says: > For loops are expanded before tests, so a fragment such as: > > .for TMACHINE in ${SHARED_ARCHS} > .if ${TMACHINE} = ${MACHINE} > ... > .endif > .endfor > > won't work, and should be rewritten the other way around. > > But how can I rewrite it if I need to aggregate file names in > PLIST_FILES with a some condition in a loop? Try .for TMACHINE in ${SHARED_ARCHS} .if ${MACHINE} == ${TMACHINE} ... .endif .endfor or use a shell loop.