From owner-svn-src-head@FreeBSD.ORG Fri Feb 17 06:12:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06CB8106566B; Fri, 17 Feb 2012 06:12:36 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 961908FC08; Fri, 17 Feb 2012 06:12:35 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q1H6CVEh010148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Feb 2012 17:12:33 +1100 Date: Fri, 17 Feb 2012 17:12:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh In-Reply-To: <201202162104.q1GL4lLm034261@svn.freebsd.org> Message-ID: <20120217163759.J1187@besplex.bde.org> References: <201202162104.q1GL4lLm034261@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r231834 - head/share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2012 06:12:36 -0000 On Thu, 16 Feb 2012, Warner Losh wrote: > Log: > Fix comma splice, can't ambiguity and quoting. > > Submitted by: bde@ > MFC after: 2 weeks Thanks, but this introduces 3 of 4 new style bugs: > Modified: head/share/mk/bsd.kmod.mk > ============================================================================== > --- head/share/mk/bsd.kmod.mk Thu Feb 16 19:40:17 2012 (r231833) > +++ head/share/mk/bsd.kmod.mk Thu Feb 16 21:04:47 2012 (r231834) > @@ -9,7 +9,7 @@ SYSDIR= ${_dir} > .endfor > .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ > !exists(${SYSDIR}/conf/kmod.mk) > -.error "can't locate the kernel source tree, set SYSDIR to override." > +.error Unable to locate the kernel source tree. Set SYSDIR to override. > .endif 1. I think I asked for more quoting, not less. 2. Error messages are not capitalized in KNF. The existing error messages in *.mk don't provide good examples of following this rule, since they mostly begin with a proper name with its normal case. 3. Sentence breaks are 2 spaces in KNF. This is also the rule in gnu sources. It is a good rule. More than 95% of sentence breaks in gcc/*.c follow it. gnu even requires 2 spaces after '.' before '*/', which made it unnecessary for me to write complicated regexps to check for comformance to the rule in gcc. In the 1996 version of gnu standards.text, it is explained that this is so that the Emacs sentence commands will work. Apparently, Emacs is too small for unsimple regexps :-). gnu standards.text the rules in much more detail than style(9) (or this mail). Even in 1996, it was about 5 times larger than style(9) is now. 4. The rule in (2) is not so good for multiple sentences, but error messages should be single sentences unless they are very long or complicated, but they shouldn't be very long or complicated either. The rule in (3) is null for single sentences in error messages and comments, so code that would otherwise break it is saved by only using single sentences. 5. I think I asked for following the rule for not terminating error messages, but it is consistently not followed in *.mk. gnu style requires complete sentences, (and thus normal capitalization and punctuation) more forcefully than KNF. Bruce