svn commit: r392209 - in head/devel: . p5-Minilla

Alexey Dokuchaev danfe at FreeBSD.org
Thu Jul 16 14:52:01 UTC 2015


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


More information about the svn-ports-all mailing list