Date: Thu, 16 Jul 2015 14:52:01 +0000 From: Alexey Dokuchaev <danfe@FreeBSD.org> To: Baptiste Daroussin <bapt@FreeBSD.org> Cc: Mathieu Arnold <mat@FreeBSD.org>, Dmitry Marakasov <amdmi3@FreeBSD.org>, 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> In-Reply-To: <20150716092053.GX37597@ivaldir.etoilebsd.net> References: <201507152017.t6FKHElA056017@svnmir.geo.freebsd.org> <F55E1B42FC419AF2D5795884@atuin.in.mat.cc> <20150716014306.GA68880@FreeBSD.org> <20150716091021.GW37597@ivaldir.etoilebsd.net> <20150716092053.GX37597@ivaldir.etoilebsd.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <bsd.port.mk> > > > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150716145201.GA13745>