svn commit: r231780 - head/share/mk

Bruce Evans brde at
Thu Feb 16 05:52:55 UTC 2012

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/
> Modified: head/share/mk/
> ==============================================================================
> --- head/share/mk/	Wed Feb 15 21:03:26 2012	(r231779)
> +++ head/share/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/
> -.error "can't find kernel source tree"
> +.error "can't locate the kernel source tree, set SYSDIR to override."
> .endif
> .include "${SYSDIR}/conf/"

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.


More information about the svn-src-all mailing list