From owner-cvs-all@FreeBSD.ORG Sun Sep 7 14:28:16 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B6F216A4BF; Sun, 7 Sep 2003 14:28:16 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFFB443FE1; Sun, 7 Sep 2003 14:28:13 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9/8.12.3) with ESMTP id h87LSDTX094010; Sun, 7 Sep 2003 15:28:13 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 07 Sep 2003 15:27:03 -0600 (MDT) Message-Id: <20030907.152703.84145645.imp@bsdimp.com> To: ru@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20030907124533.GA21121@sunbay.com> References: <20030907104614.GC10526@sunbay.com> <20030907.053010.130739333.imp@bsdimp.com> <20030907124533.GA21121@sunbay.com> X-Mailer: Mew version 2.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/make cond.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2003 21:28:16 -0000 In message: <20030907124533.GA21121@sunbay.com> Ruslan Ermilov writes: : On Sun, Sep 07, 2003 at 05:30:10AM -0600, M. Warner Losh wrote: : > In message: <20030907104614.GC10526@sunbay.com> : > Ruslan Ermilov writes: : > : On Sat, Sep 06, 2003 at 07:16:10PM -0700, Warner Losh wrote: : > : > imp 2003/09/06 19:16:10 PDT : > : > : > : > FreeBSD src repository : > : > : > : > Modified files: : > : > usr.bin/make cond.c : > : > Log: : > : > Keep up with minor changes to NetBSD. Consider a variable empty when : > : > not define. : > : > : > : > Obtained From: NetBSD (rev 1.18; sjg) : > : > : > : > Revision Changes Path : > : > 1.27 +1 -1 src/usr.bin/make/cond.c : > : > : > : Does it mean that ``.if empty(FOO)'' will not cause an error : > : now when FOO is not defined? If so, what is the motivation : > : for this change? : > : > The NetBSD folks needed it for something, I'm not sure what. Since it : > was easy, didn't brea anything and cross BSD make divergence has been : > a problem in the past, I went ahead and added it. : > : This change is in NetBSD for only 29 hours, the reasoning is : not well understood, and our make(1)'s are so much different : that I don't really think this particular one makes them : really closer. It keeps them from getting further apart. That NetBSD does it the same way and it doesn't break anything that's working today is sufficient. Who cares why they want to do it that way? It is arbitrary what you do in this case anyway. However, read further. : It also seems counter-intuitive to me -- : undefined variable doesn't have _any_ value, so we cannot : say if it's empty or not. Yes, you can. $(FOO) evaluates to "" when FOO is not defined. Therefore it is empty, just as if it were defined to be "". It looks like about 70 places in the tree would be simpler. There's only five place where empty is used bare, and in all of those cases it is known that the variable is defined... It looks to me like the .mk an Makefile files in our tree could be a lot simpler if we keep it. Finally, the change doesn't make make any larger or longer to compile. It could make the .mk files smaller, but I doubt that anybody could measure a difference > .1%, but given that most of the empty usages are in .mk files, some in loops, I could be wrong. Warner