Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2012 16:26:10 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Warner Losh <imp@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r231780 - head/share/mk
Message-ID:  <20120216160800.P1018@besplex.bde.org>
In-Reply-To: <201202152120.q1FLKww4081902@svn.freebsd.org>
References:  <201202152120.q1FLKww4081902@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 15 Feb 2012, Warner Losh wrote:

> Log:
>  Wordsmith the can't find kernel error message, and suggest which
>  variable to set to override.
>
> Modified:
>  head/share/mk/bsd.kmod.mk
>
> Modified: head/share/mk/bsd.kmod.mk
> ==============================================================================
> --- head/share/mk/bsd.kmod.mk	Wed Feb 15 21:03:26 2012	(r231779)
> +++ head/share/mk/bsd.kmod.mk	Wed Feb 15 21:20:58 2012	(r231780)
> @@ -9,7 +9,7 @@ SYSDIR=	${_dir}
> .endfor
> .if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \
>     !exists(${SYSDIR}/conf/kmod.mk)
> -.error "can't find kernel source tree"
> +.error "can't locate the kernel source tree, set SYSDIR to override."
> .endif
>
> .include "${SYSDIR}/conf/kmod.mk"

This adds 2 punctuation errors:
- comma (comma splice)
- period.  Error messages are not terminated in KNF.  However, most of the
   others in *.mk are terminated.

This one also differs from the style of most of the others in quoting the
string.  The only other one that uses quotes is the only other one that
doesn't use a period.  It is unclear what tokens can go after .error.
In C, the tokens after #error should always be quoted, since some tokens
are special.

About 1/3 of the others don't contrace "cannot" to "can't".

None of the others has the comma splice error.  This might be because
none of the others has multiple clauses.  When clauses are spliced using
a comma, the comma must be followed by a conjunctive adverb, but a
semicolon usually works and helps keep error messages short.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120216160800.P1018>