Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2014 12:09:48 +0200
From:      John Marino <freebsd.contact@marino.st>
To:        Tijl Coosemans <tijl@FreeBSD.org>
Cc:        svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, Hiroki Sato <hrs@FreeBSD.org>, ports-committers@freebsd.org
Subject:   Re: svn commit: r365531 - in head/cad/spice: . files
Message-ID:  <53F5C56C.4040300@marino.st>
In-Reply-To: <20140821120232.40055a67@kalimero.tijl.coosemans.org>
References:  <201408210603.s7L63U34069028@svn.freebsd.org>	<53F5AE7A.7070706@marino.st> <20140821120232.40055a67@kalimero.tijl.coosemans.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/21/2014 12:02, Tijl Coosemans wrote:
> On Thu, 21 Aug 2014 10:31:54 +0200 John Marino wrote:
>> On 8/21/2014 08:03, Hiroki Sato wrote:
>>> -	(cd ${CONFIG}/obj/bin && ${BSD_INSTALL_PROGRAM} \
>>> -		spice3 nutmeg sconvert help proc2mod multidec \
>>> -		${DESTDIR}${PREFIX}/bin)
>>> +	cd FreeBSD/obj/bin && \
>>> +		${BSD_INSTALL_PROGRAM} \
>>> +		    spice3 nutmeg sconvert help proc2mod multidec \
>>> +		    ${DESTDIR}${PREFIX}/bin
>>
>> I am so confused.
>> Half the people say we have to wrap compound commands in parenthesis and
>> the other half remove them.
>>
>> Does anyone have a definite answer?
>> Personally I've never seen the need but I was told not having them can
>> break -j multijob support.
> 
> With -j bmake runs the entire target as one script, which means cd
> changes the directory for all commands that follow.  Without -j each
> command runs as a separate script and cd has no effect on the next
> command.  To make sure there is no difference in behaviour between the
> two modes it is best to wrap cd && prog in parenthesis, such that it
> always runs in its own subshell.  It is also best to use && instead of ;
> because normally you don't want to run the second command if the first
> one fails.

Okay thanks.  So I had this right and hrs shouldn't have removed the
parenthesis.

Is this documented in PHB anywhere?  If it were simply made a rule then
there is no confusion at all.

John



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