From owner-freebsd-ports@FreeBSD.ORG Fri Jan 27 18:09:17 2012 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 67DB81065673 for ; Fri, 27 Jan 2012 18:09:17 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 242968FC08 for ; Fri, 27 Jan 2012 18:09:16 +0000 (UTC) Received: by ggnk5 with SMTP id k5so224336ggn.13 for ; Fri, 27 Jan 2012 10:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=b63sSgT0PsfASzrVlsHfSCvDWYfHzPq7RFgSaJSTqVE=; b=FE1cqrwRnYAVSDI7K9DZ6WwtcqISo9TYpnR9S7TQk64S6Hdu6TW8Y/DmpZJ5fe1uTx XJt0xsgOyE2CiCdf+aYg0KQVo/u16TKAN72Q1N5+hL2Yf2QkbRJDk8jvffljikBQXYlt Dr/mPG5rkK/z5rBd0a+n/BbZwf6a03mpQ2irQ= Received: by 10.50.10.226 with SMTP id l2mr7519159igb.20.1327687756266; Fri, 27 Jan 2012 10:09:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.183.21 with HTTP; Fri, 27 Jan 2012 10:08:46 -0800 (PST) In-Reply-To: <4F22E29F.8080602@infracaninophile.co.uk> References: <4F22CB51.6070507@infracaninophile.co.uk> <4F22E29F.8080602@infracaninophile.co.uk> From: Chris Rees Date: Fri, 27 Jan 2012 18:08:46 +0000 Message-ID: To: Matthew Seaman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-ports Subject: Re: BSD make -- Malformed conditional X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2012 18:09:17 -0000 On 27 January 2012 17:45, Matthew Seaman wrote: > On 27/01/2012 16:51, Chris Rees wrote: >>> .for item in ${LIST} >>> > .if ${item} =3D=3D "this" =A0# Ooops > >> You shouldn't use quotes either. > > I think that not quoting might be better style, but it's not the typical > usage in make(1). =A0There are quite a few contrary examples in the ports= : > > % < /tmp/ports-makefiles xargs grep '} =3D=3D "' | wc -l > =A0 =A01674 > % < /tmp/ports-makefiles xargs grep '} =3D=3D [^"]' | wc -l > =A0 =A0 531 These counterexamples are wrong. Just because it works doesn't make it rig= ht. Quotes are way overused in Makefiles, just because in other languages they're necessary doesn't mean we should use them when unneccessary. Thought is required about which language you're writing in. Equally, no-one should be advocating things like: .if (${FOO} =3D=3D "bar") just because it works-- we're not writing in C :) We have the same problem with GNU test accepting "=3D=3D", for example. Chris