Date: Thu, 21 Aug 2014 12:02:32 +0200 From: Tijl Coosemans <tijl@FreeBSD.org> To: John Marino <freebsd.contact@marino.st> 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: <20140821120232.40055a67@kalimero.tijl.coosemans.org> In-Reply-To: <53F5AE7A.7070706@marino.st> References: <201408210603.s7L63U34069028@svn.freebsd.org> <53F5AE7A.7070706@marino.st>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140821120232.40055a67>