From rch@rch.ip.lt  Mon Oct  5 01:47:13 1998
Received: from rch.ip.lt (rch.ip.lt [194.176.42.2])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA03786
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 5 Oct 1998 01:47:07 -0700 (PDT)
          (envelope-from rch@rch.ip.lt)
Received: (from rch@localhost)
	by rch.ip.lt (8.9.1/8.9.1) id KAA29424;
	Mon, 5 Oct 1998 10:45:08 +0200 (CEST)
	(envelope-from rch)
Message-Id: <199810050845.KAA29424@rch.ip.lt>
Date: Mon, 5 Oct 1998 10:45:08 +0200 (CEST)
From: rch@richard.eu.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: current make fails with "Error expanding embedded variable"
X-Send-Pr-Version: 3.2

>Number:         8155
>Category:       bin
>Synopsis:       current make fails with "Error expanding embedded variable"
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct  5 01:50:01 PDT 1998
>Closed-Date:    Wed Dec 9 19:25:32 PST 1998
>Last-Modified:  Wed Dec  9 19:26:07 PST 1998
>Originator:     Ricardas Cepas
>Release:        FreeBSD 3.0-19980923-BETA i386
>Organization:
>Environment:


>Description:

	Current make fails with "Error expanding embedded variable" if founds $ in variable name, for example
ARCHITECTURE=$(shell arch="`if test -x /usr/bin/dpkg; \
        then dpkg --print-architecture; else uname -m; fi`" \
        && if [ "$${arch%%i?86}"y = y ]; then arch=i386; fi \
        && echo "$$arch")

	Earlier versions does not have this this problem, i.e. can ignore such statements.


>How-To-Repeat:

	A=$(shell echo $b; )

>Fix:
	

>Release-Note:
>Audit-Trail:

From: Eivind Eklund <eivind@yes.no>
To: rch@richard.eu.org, FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  Subject: Re: bin/8155: current make fails with "Error expanding embedded variable"
Date: Mon, 5 Oct 1998 13:48:38 +0200

 The snippets submitted are, as far as I can tell, not for FreeBSD
 make.  Could you be thinking of the GNU Make port?  If so, you have to
 report the bug to GNU, not FreeBSD.  If not, I'd appreciate a complete
 makefile that reproduce the problem.  Thanks!

From: Ricardas Cepas <rch@ip.lt>
To: Eivind Eklund <eivind@yes.no>, rch@richard.eu.org,
        FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  Subject: Re: bin/8155: current make fails with "Error expanding embedded variable"
Date: Mon, 5 Oct 1998 15:23:00 +0200

 On Mon Oct  5 13:48:38 1998 +0200
            (Pirmadienis, 1998 m. spalio  5 d. 13:48:38 CEST),
   Eivind Eklund wrote:
 
 > The snippets submitted are, as far as I can tell, not for FreeBSD
 > make.  Could you be thinking of the GNU Make port?  If so, you have to
 > report the bug to GNU, not FreeBSD.  If not, I'd appreciate a complete
 > makefile that reproduce the problem.  Thanks!
 
         Sure it is not for FreeBSD only. It is from Makefile intended to run
 with any `make'. This snippet isn't used on FreeBSD but is necessary
 somewhere else. Just till now FreeBSD `make' didn't give error for
 it.
 
                         Regards,
 -- 
 
                                       Ričardas Čepas
 ~~
 ~

From: dag-erli@ifi.uio.no (Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?= )
To: rch@richard.eu.org
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/8155: current make fails with "Error expanding embedded variable"
Date: 05 Oct 1998 15:47:53 +0200

 rch@richard.eu.org writes:
 > 	Current make fails with "Error expanding embedded variable" if founds $ in variable name, for example
 > ARCHITECTURE=$(shell arch="`if test -x /usr/bin/dpkg; \
 >         then dpkg --print-architecture; else uname -m; fi`" \
 >         && if [ "$${arch%%i?86}"y = y ]; then arch=i386; fi \
 >         && echo "$$arch")
 
 This looks very SysVish. The Right Way to do this in BSD make is:
 
 ARCHITECTURE != \
 	arch="`if test -x /usr/bin/dpkg; \
 	then dpkg --print-architecture; else uname -m; fi`" \
 	&& if [ "$${arch%%i?86}"y = y ]; then arch=i386; fi \
 	&& echo "$$arch"
 
 Anyway, that piece of code is a horrible kludge IMHO (and totally
 unnecessary in FreeBSD)
 
 DES
 -- 
 Dag-Erling Smrgrav - dag-erli@ifi.uio.no
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Wed Dec 9 19:25:32 PST 1998 
State-Changed-Why:  
See the audit trail for how this should (and can) be done with BSD make(1). 
>Unformatted:
