NetBSD Problem Report #37222

From martin@duskware.de  Fri Oct 26 10:25:35 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 7B20163B935
	for <gnats-bugs@gnats.netbsd.org>; Fri, 26 Oct 2007 10:25:35 +0000 (UTC)
Message-Id: <20071026100522.8BC4763B935@narn.NetBSD.org>
Date: Fri, 26 Oct 2007 10:05:22 +0000 (UTC)
From: rillig@NetBSD.org
Reply-To: rillig@NetBSD.org
To: netbsd-bugs-owner@NetBSD.org
Subject: The bmake parser should be more helpful to the developer
X-Send-Pr-Version: www-1.0

>Number:         37222
>Category:       bin
>Synopsis:       The bmake parser should be more helpful to the developer
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 26 10:30:00 +0000 2007
>Closed-Date:    Fri Nov 06 20:23:20 +0000 2009
>Last-Modified:  Fri Nov 06 20:25:02 +0000 2009
>Originator:     Roland Illig
>Release:        pkgsrc-current
>Organization:
>Environment:
>Description:
The bmake parser should help the developer by issuing warnings for the most common mistakes. Ideally, the examples below shouldn't be accepted at all by the parser.

>How-To-Repeat:
# Nothing should be allowed between the function name and its argument.
.if empty or nonempty or whatever(foo)
.endif

# This isn't documented, so there should be at least a warning.
.if foo
.endif

# The error message should be "unknown preprocessing directive "elseif"".
# Currently it is: Missing dependency operator
.if defined(foo)
.elseif defined(bar)
.endif

When trying to use an undefined variable in an empty(VARNAME:M*) conditional, the error message should reflect that. Currently it is "Malformed conditional", although the _form_ of the conditional is not mal at all.

>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: dsl@NetBSD.org
State-Changed-When: Fri, 06 Nov 2009 20:23:20 +0000
State-Changed-Why:
1) was fixed a while ago
2) has been documented for a while
3) I've changed the error message for line that start .


From: David Laight <dsl@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/37222 CVS commit: src/usr.bin/make
Date: Fri, 6 Nov 2009 20:20:56 +0000

 Module Name:	src
 Committed By:	dsl
 Date:		Fri Nov  6 20:20:56 UTC 2009

 Modified Files:
 	src/usr.bin/make: parse.c

 Log Message:
 Report lines that ought to contain a ':' operator but start with a '.'
 as "Unknown directive" sinze they are more likely to be .elseif (etc).
 Lets me close PR/37222!


 To generate a diff of this commit:
 cvs rdiff -u -r1.158 -r1.159 src/usr.bin/make/parse.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.