From owner-svn-ports-head@freebsd.org Thu Jul 16 14:52:01 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C82B9A1C07; Thu, 16 Jul 2015 14:52:01 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 2DA0119F4; Thu, 16 Jul 2015 14:52:01 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2C25D1CAF; Thu, 16 Jul 2015 14:52:01 +0000 (UTC) Date: Thu, 16 Jul 2015 14:52:01 +0000 From: Alexey Dokuchaev To: Baptiste Daroussin Cc: Mathieu Arnold , Dmitry Marakasov , ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r392209 - in head/devel: . p5-Minilla Message-ID: <20150716145201.GA13745@FreeBSD.org> References: <201507152017.t6FKHElA056017@svnmir.geo.freebsd.org> <20150716014306.GA68880@FreeBSD.org> <20150716091021.GW37597@ivaldir.etoilebsd.net> <20150716092053.GX37597@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150716092053.GX37597@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2015 14:52:01 -0000 On Thu, Jul 16, 2015 at 11:20:53AM +0200, Baptiste Daroussin wrote: > On Thu, Jul 16, 2015 at 11:10:22AM +0200, Baptiste Daroussin wrote: > > On Thu, Jul 16, 2015 at 01:43:06AM +0000, Alexey Dokuchaev wrote: > > > Can you clarify on what is wrong with := ? I've added IMHO quite clear > > > and elaborate explanation in the PH on the matter, and I don't see the > > > merit of using MY_DEPENDS at all: it's ugly, it's hard to read, it > > > pollutes namespace for no sound reason. > > > > := enforce the expansion to happen right away > > > > Let's say you have: > > > > RUN_DEPENDS= ${BLOODYSCRIPTLANGUAGEPREFIX}bal>0:${PORTSDIR}/somewhere/bla > > BULID_DEPENDS:= ${RUN_DEPENDS} > > > > .include > > > > BULID_DEPENDS will magically have ${BLOODYSCRIPTLANGUAGEPREFIX} expanded > > to "" because it is not yet defined at the moment the expansion is > > requested. > > Well my example is bad here because undefined variable will be expanded > later, but I think you got the point about inconsistency of the expansion > with := and look at the svn history I have fixed a couple of weird issues > we hard in the ports tree due do weirdness of how := do the expansion. > > I prefer a sane (yet ugly) constuction that consistently works the same > over the portstree than I constuction which can bite contributors and get > quite complex to debug. I see your point. I'm not saying that := is *always* a better way; even though I must say debugging Makefiles is pretty easy with -V FOO and @echo in recipes. What I'm not happy with is blunt ":= is wrong, don't ever use it!" statement: it does come handy often in many cases and checking if it does the right thing is easy once you compare "make -V RUN_DEPENDS | md5" vs. "make -V BULID_DEPENDS | md5" (in addition to visual examination). ./danfe