From owner-freebsd-bugs Mon Oct 5 06:50:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA08099 for freebsd-bugs-outgoing; Mon, 5 Oct 1998 06:50:15 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA08085 for ; Mon, 5 Oct 1998 06:50:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id GAA06355; Mon, 5 Oct 1998 06:50:01 -0700 (PDT) Date: Mon, 5 Oct 1998 06:50:01 -0700 (PDT) Message-Id: <199810051350.GAA06355@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: dag-erli@ifi.uio.no (Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?= ) Subject: Re: bin/8155: current make fails with "Error expanding embedded variable" Reply-To: dag-erli@ifi.uio.no (Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?= ) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/8155; it has been noted by GNATS. 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 Smørgrav - dag-erli@ifi.uio.no To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message