Date: Mon, 11 Apr 2005 21:20:13 -1000 From: juli mallett <jmallett@FreeBSD.org> To: Harti Brandt <harti@freebsd.org> Cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: cvs commit: src/usr.bin/make cond.c cond.h for.c for.h parse.c parse.h Message-ID: <20050412072013.GA22303@toxic.magnesium.net> In-Reply-To: <20050412090431.B75274@beagle.kn.op.dlr.de> References: <200504110720.j3B7KAIx034955@repoman.freebsd.org> <20050411074021.GA85675@xor.obsecurity.org> <20050411101216.N97775@beagle.kn.op.dlr.de> <20050411091126.GA6125@xor.obsecurity.org> <20050411230613.GL84649@wantadilla.lemis.com> <20050412090431.B75274@beagle.kn.op.dlr.de>
next in thread | previous in thread | raw e-mail | index | archive | help
* Harti Brandt <hartmut.brandt@dlr.de> [ Date: 2005-04-11 ] [ w.r.t. Re: cvs commit: src/usr.bin/make cond.c cond.h for.c for.h parse.c parse.h ] > On Tue, 12 Apr 2005, Greg 'groggy' Lehey wrote: > > GgL>On Monday, 11 April 2005 at 2:11:26 -0700, Kris Kennaway wrote: > GgL>> On Mon, Apr 11, 2005 at 11:07:28AM +0200, Harti Brandt wrote: > GgL>> > GgL>>> KK>I assume you've tested that this doesn't cause problems for anything > GgL>>> KK>in the ports collection? > GgL>>> > GgL>>> I didn't test all of the ports collection - just a number of ports. But I > GgL>>> grepped the ports infrastructure and the ports Makefile* for problematic > GgL>>> constructs and found one problem that now shows up (under certain > GgL>>> conditions) instead of beeing hidden: > GgL>>> > GgL>>> mail/dspam > GgL>>> mail/dspam-devel > GgL>>> > GgL>>> both of them use > GgL>>> > GgL>>> . elseif ... > GgL>>> > GgL>>> This has been intepreted by make as a plain .else without any warning up > GgL>>> to now. Now it is just ignored when the .if defined (WITH_MYSQL40) ... is > GgL>>> false and give an error if it is true. I'll inform the maintainer about > GgL>>> this. > GgL>>> > GgL>>> There may be of course ports that use our make to build. In any case the > GgL>>> change to the .else and .endif clauses just give a warning so the ports > GgL>>> maintainer have time to fix this. What could break is the use of > GgL>>> .undefFOO but I don't expect many of them. > GgL>> > GgL>> I really hope this doesn't cause problems, but based on historical > GgL>> precedent I expect that it will. In future, please coordinate > GgL>> troublesome make changes with us (portmgr) so we can test them first > GgL>> and avoid destabilizing the ports collection for the users. > GgL> > GgL>It would be interesting to understand the necessity of this change. > GgL>We have so many different flavours of make already. > > This make Makefiles more debuggable. For an example see the dspam > Makefile. It has a .elseif that silently is interpreted as .else. Now it > gives a notice at least in some cases. > > This has nothing to do with different flavours of make. It is just a > matter of writing > > .undef FOO > > instead of > > .undefFOO > > (which, I suppose, no one would have done on purpose anyway). Or > > .if defined(FOO) > .else # defined(FOO) > .endif # defined(FOO) > > instead of > > .if defined(FOO) > .else defined(FOO) > .endif defined(FOO) > > For the reader of the makefile > > .else defined(FOO) > > suggests that the expression is somehow used. In fact it isn't. If one > reads: > > .else # defined(FOO) > > it is obvious that the expression is just a comment. Which is awesome and great and you are the best ever and my hero for putting up with this code and making it so much better (you and Max both.) As someone who's spent time with Make, let me say you deserve all of our unbridled thanks and worship and payment of your weight in gold or some such. Maybe I'm exaggerating a bit, but it doesn't feel like it! Keep up the good work! :) Thanx, juli.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050412072013.GA22303>