NetBSD Problem Report #1443

From gnats  Thu Sep  7 13:51:40 1995
Received: from sungear.mame.mu.OZ.AU (root@sungear.mame.mu.OZ.AU [128.250.209.2]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id NAA00158 for <gnats-bugs@gnats.netbsd.org>; Thu, 7 Sep 1995 13:51:37 -0400
Message-Id: <199509071434.AAA10469@eterna.com.au>
Date: Fri, 8 Sep 1995 00:34:15 +1000
From: matthew green <mrg@eterna.com.au>
Reply-To: mrg@eterna.com.au
To: gnats-bugs@gnats.netbsd.org
Subject: make(1) fails with subsitution in lhs of rule.
X-Send-Pr-Version: 3.2

>Number:         1443
>Category:       bin
>Synopsis:       make(1) fails with subsitution in lhs of rule.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 07 14:05:04 +0000 1995
>Closed-Date:    Wed Jan 10 05:46:59 +0000 1996
>Last-Modified:  Thu Jan 08 21:15:02 +0000 2009
>Originator:     matthew green
>Release:        24 august.
>Organization:
bozotic softwar foundation
>Environment:
System: NetBSD splode.eterna.com.au 1.0A NetBSD 1.0A (_splode_) #245: Sat Aug 26 02:04:52 EST 1995 mrg@splode.eterna.com.au:/orb/q/build/src/sys/arch/sparc/comp
ile/_splode_ sparc


>Description:

        dependancy rules with `=' in the lhs are parsed as variable
        assignments.

>How-To-Repeat:

makefile like this

---
A=a b c d

all: $(A:%=%b)

$(A:%=%b):
        @echo $@
---

fails with

"Makefile", line 6: Unassociated shell command "@echo $@"
Fatal errors encountered -- cannot continue

Under SunOS make, it gives:

ab
bb
cb
db

but this one succeeds:

---
A=a b c d

all: $(A:%=%b)

B=$(A:%=%b)

$B:
        @echo $@
---

>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: thorpej 
State-Changed-When: Tue Jan 9 21:46:59 PST 1996 
State-Changed-Why:  
This has been fixed. 
From: David Laight <dsl@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/1443 CVS commit: src/usr.bin/make
Date: Thu,  8 Jan 2009 21:12:09 +0000 (UTC)

 Module Name:	src
 Committed By:	dsl
 Date:		Thu Jan  8 21:12:09 UTC 2009

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

 Log Message:
 Fix PR bin/1443 properly!
 Ignore '=' and ' ' inside {} and () when looking for an assignment operator.
 Also require the operator be immediately after any whitespace.
 XXX mismatched (){} in variable modifiers will not DTRT.


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