From owner-cvs-src@FreeBSD.ORG Mon Apr 11 09:06:16 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6EB0716A4CE; Mon, 11 Apr 2005 09:06:16 +0000 (GMT) Received: from smtp-1.dlr.de (smtp-1.dlr.de [195.37.61.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D04143D2F; Mon, 11 Apr 2005 09:06:15 +0000 (GMT) (envelope-from Hartmut.Brandt@dlr.de) Received: from beagle.kn.op.dlr.de ([129.247.173.6]) by smtp-1.dlr.de over TLS secured channel with Microsoft SMTPSVC(5.0.2195.6713); Mon, 11 Apr 2005 11:06:14 +0200 Date: Mon, 11 Apr 2005 11:07:28 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt_h@beagle.kn.op.dlr.de To: Kris Kennaway In-Reply-To: <20050411074021.GA85675@xor.obsecurity.org> Message-ID: <20050411101216.N97775@beagle.kn.op.dlr.de> References: <200504110720.j3B7KAIx034955@repoman.freebsd.org> <20050411074021.GA85675@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 11 Apr 2005 09:06:14.0383 (UTC) FILETIME=[B67F77F0:01C53E75] 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 cond.h for.c for.h parse.c parse.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Harti Brandt List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 09:06:16 -0000 On Mon, 11 Apr 2005, Kris Kennaway wrote: KK>On Mon, Apr 11, 2005 at 07:20:10AM +0000, Hartmut Brandt wrote: KK>> harti 2005-04-11 07:20:10 UTC KK>> KK>> FreeBSD src repository KK>> KK>> Modified files: KK>> usr.bin/make cond.c cond.h for.c for.h parse.c parse.h KK>> Log: KK>> Rework the directive parsing code. Instead of using a lot of strcmp()s KK>> on every line that starts with a dot use a minimal perfect hash KK>> function and a single strcmp() on the first word after the dot KK>> to find out whether it is really a directive call and, if yes, which KK>> one. Then directly dispatch to a handler function for that directive KK>> (or fall through to the dependency handling code). This makes the KK>> directive parse a little bit more strict about the syntax: the directive KK>> word must be followed by a character that is not alphanumerical and not KK>> an underline (making .undefFOO illegal); .endif and .else can only be KK>> followed by comments. KK> KK>I assume you've tested that this doesn't cause problems for anything KK>in the ports collection? I didn't test all of the ports collection - just a number of ports. But I grepped the ports infrastructure and the ports Makefile* for problematic constructs and found one problem that now shows up (under certain conditions) instead of beeing hidden: mail/dspam mail/dspam-devel both of them use . elseif ... This has been intepreted by make as a plain .else without any warning up to now. Now it is just ignored when the .if defined (WITH_MYSQL40) ... is false and give an error if it is true. I'll inform the maintainer about this. There may be of course ports that use our make to build. In any case the change to the .else and .endif clauses just give a warning so the ports maintainer have time to fix this. What could break is the use of .undefFOO but I don't expect many of them. harti