From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 00:49:05 2010 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 3AB99106568B; Mon, 4 Jan 2010 00:49:05 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29AFA8FC1D; Mon, 4 Jan 2010 00:49:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o040n5lN000184; Mon, 4 Jan 2010 00:49:05 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o040n5XC000182; Mon, 4 Jan 2010 00:49:05 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201001040049.o040n5XC000182@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 4 Jan 2010 00:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201456 - head/usr.bin/make 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: Mon, 04 Jan 2010 00:49:05 -0000 Author: obrien Date: Mon Jan 4 00:49:04 2010 New Revision: 201456 URL: http://svn.freebsd.org/changeset/base/201456 Log: Report lines that ought to contain a ':' operator but start with a '.' as "Unknown directive" sinze they are more likely to be .elseif (etc). (NetBSD PR 37222). Obtained from: NetBSD Modified: head/usr.bin/make/parse.c Modified: head/usr.bin/make/parse.c ============================================================================== --- head/usr.bin/make/parse.c Mon Jan 4 00:32:22 2010 (r201455) +++ head/usr.bin/make/parse.c Mon Jan 4 00:49:04 2010 (r201456) @@ -699,6 +699,7 @@ static void ParseDoDependency(char *line) { char *cp; /* our current position */ + char *lstart = line; /* original input line */ GNode *gn; /* a general purpose temporary node */ int op; /* the operator on the line */ char savec; /* a place to save a character */ @@ -809,7 +810,8 @@ ParseDoDependency(char *line) "contain unresolved cvs/rcs/??? merge " "conflicts"); } else - Parse_Error(PARSE_FATAL, "Need an operator"); + Parse_Error(PARSE_FATAL, lstart[0] == '.' ? + "Unknown directive" : "Need an operator"); return; } *cp = '\0'; @@ -1029,7 +1031,8 @@ ParseDoDependency(char *line) op = OP_DEPENDS; } } else { - Parse_Error(PARSE_FATAL, "Missing dependency operator"); + Parse_Error(PARSE_FATAL, lstart[0] == '.' ? + "Unknown directive" : "Missing dependency operator"); return; }