Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Oct 2005 09:34:53 +0200 (CEST)
From:      Harti Brandt <hartmut.brandt@dlr.de>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        ports@FreeBSD.org, re@FreeBSD.org
Subject:   Re: Make broken in 6.0 ([ports-i386@pointyhat.freebsd.org: empire-1.7 failed on i386 6])
Message-ID:  <20051012092826.F63649@beagle.kn.op.dlr.de>
In-Reply-To: <20051012071958.GA80671@xor.obsecurity.org>
References:  <20051012020023.GB40204@xor.obsecurity.org> <20051012021112.GA48078@xor.obsecurity.org> <20051012090453.N63649@beagle.kn.op.dlr.de> <20051012071958.GA80671@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 12 Oct 2005, Kris Kennaway wrote:

KK>On Wed, Oct 12, 2005 at 09:12:58AM +0200, Harti Brandt wrote:
KK>> On Tue, 11 Oct 2005, Kris Kennaway wrote:
KK>> 
KK>> KK>On Tue, Oct 11, 2005 at 10:00:24PM -0400, Kris Kennaway wrote:
KK>> KK>> For some reason a number of ports are failing with this error on the
KK>> KK>> latest build.  I suspect that a change may have been merged to some
KK>> KK>> part of the base system that broke them.  Can someone please take a
KK>> KK>> look?
KK>> 
KK>> I actually doubt that the $(shell ...) construct was ever supported in our 
KK>> make. The canonical way to assign the output of a shell command to a 
KK>> variable is
KK>> 
KK>> VERSION != sed <bs.spec -n -e '/Version: \(.*\)/s//\1/p'
KK>> 
KK>> we also support the SysV syntax:
KK>> 
KK>> VERSION :sh= ...
KK>> 
KK>> although that's not documented and should be avoided.
KK>
KK>Do you know when the handling of this was changed?  These ports
KK>apparently build fine on 5.x and older, although it's possible that
KK>the shell command is just silently not being executed or something.

During december - march I incorporated a lot of fixes to the variable 
parsing code from DragonFly BSD. I just checked that a RELENG_5_0 make
would interpret in

VERSION = $(shell sed <bs.spec -n -e '/Version: \(.*\)/s//\1/p')

"shell sed <bs.spec -n -e '/Version" (everything up to the colon) as the 
name of a variable and would then try to interprete the space after the 
colon as a modifier. There is no space modifier so it prints an error, but 
muddles along. So it ends up putting the rest until the ) into the 
variable. The current make does basically the same, but ends up with some 
random string in the variable. This is obviously an error. Make should 
probably just stop when finding this syntax error or at least set the 
variable to be empty.

So to make it short: it never worked, the only difference is that the 
string in the variable is different now (in both cases not making any 
sense).

harti



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051012092826.F63649>