NetBSD Problem Report #53796

From www@NetBSD.org  Mon Dec 17 01:37:49 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 02B677A1DA
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 17 Dec 2018 01:37:49 +0000 (UTC)
Message-Id: <20181217013747.BE5187A1ED@mollari.NetBSD.org>
Date: Mon, 17 Dec 2018 01:37:47 +0000 (UTC)
From: uwe@NetBSD.org
Reply-To: uwe@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: make prints wrong makefile path in an error message
X-Send-Pr-Version: www-1.0

>Number:         53796
>Category:       toolchain
>Synopsis:       make prints wrong makefile path in an error message
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          feedback
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 17 01:40:00 +0000 2018
>Closed-Date:    
>Last-Modified:  Tue Dec 25 14:10:00 +0000 2018
>Originator:     Valery Ushakov
>Release:        NetBSD 8
>Organization:
>Environment:
>Description:
Make seems to mangle the path to an included makefile in an error message 
when that makefile contains an error.

>How-To-Repeat:
$ mkdir -p m/m/m/m
$ echo '.include "../../../../Makefile.inc"' > m/m/m/m/Makefile
$ cat > Makefile.inc
        error
default:
        echo hello world
^D
$ cd m/m/m/m
$ make
make: "../../../../../../../../Makefile.inc" line 1: Unassociated shell command "error"
make: Fatal errors encountered -- cannot continue

Note the the number of ".."s is double.

I've just stumbled into it with a current build, but I can see this bug
also on my -6 system.

>Fix:

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53796 CVS commit: src/usr.bin/make
Date: Sun, 16 Dec 2018 21:06:01 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Mon Dec 17 02:06:00 UTC 2018

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

 Log Message:
 PR/53796: Valery Ushakov: make prints wrong makefile path in an error message
 Use ${.CURDIR} if ${.PARSEDIR} is not absolute.


 To generate a diff of this commit:
 cvs rdiff -u -r1.229 -r1.230 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.

State-Changed-From-To: open->feedback
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 25 Dec 2018 13:26:30 +0000
State-Changed-Why:
Is this solution good?


From: Valery Ushakov <uwe@stderr.spb.ru>
To: gnats-bugs@NetBSD.org
Cc: maya@NetBSD.org
Subject: Re: toolchain/53796 (make prints wrong makefile path in an error
 message)
Date: Tue, 25 Dec 2018 17:07:59 +0300

 On Tue, Dec 25, 2018 at 13:26:31 +0000, maya@NetBSD.org wrote:

 > State-Changed-From-To: open->feedback

 Why?  Am I in possession of unique ability to run make in some
 esoteric setup?

 -uwe

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.