On Tuesday 21 June 2011, Ralf Wildenhues wrote: > * Stefano Lattarini wrote on Mon, Jun 20, 2011 at 10:58:05PM CEST: > > On Monday 20 June 2011, Ralf Wildenhues wrote: > > > For example the parallel BSD makes tend to reuse shells for running > > > the recipe commands; > > > > > But only for the commands in the same recipe, right? > > I think not. > This example seems to show otherwise, luckily:
$ cat Makefile all: a b c d a b c d: @exec echo seen-$@ @echo unseen-$@ $ make -j4 --- a --- --- b --- --- c --- --- d --- --- a --- seen-a --- b --- seen-b --- c --- seen-c --- d --- seen-d Tested on NetBSD 5.1 with system make, and on Debian with netbsd-make and freebsd-make. And in fact, quoting the Autoconf manual: `` Support for parallel execution in make implementation varies. Generally, using GNU make is your best bet. When NetBSD make is invoked with -jN, it will reuse the same shell for multiple commands *within one recipe*. '' (emphasis added by me above) > > > I'm not so sure they like if their shells go away with exec. > > > > > In this case, not a problem I think, since the invocation of the > > testsuite driver is the last command in the recipe. > > Well, they should cope with it anyway, and use a new shell if the old > one is gone. > Agreed. Still, as shown above, in this case that bug-like feature shouldn't come to bite us. Regards, Stefano