Subject: bin/1443: make(1) fails with subsitution in lhs of rule.
To: None <gnats-bugs@gnats.netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: netbsd-bugs
Date: 09/08/1995 00:34:15
>Number:         1443
>Category:       bin
>Synopsis:       make(1) fails with subsitution in lhs of rule.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep  7 14:05:04 1995
>Last-Modified:
>Originator:     matthew green
>Organization:
bozotic softwar foundation
>Release:        24 august.
>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:
>Audit-Trail:
>Unformatted: