Yes.

The documentation for this in the GNU make manual is really sketchy.

On Tue, Feb 09, 2016 at 10:03:30AM -0800, William Tu wrote:
> Thank you. Now I understand.
> 
> A simple example is below:
> [root@vm-dev tmp]# cat Makefile
> test:
>     echo ${MAKEFLAGS};cd subdir; ${MAKE}
> 
> test2:
>     echo ${MAKEFLAGS};cd subdir; make
> 
> [root@vm-dev tmp]# cat subdir/Makefile
> sub-make:
>     echo "this is sub-make"; echo ${MAKEFLAGS}
> 
> === if we use make ===
> # make -j2 test2
> echo  -j --jobserver-fds=3,4;cd subdir; make
> -j --jobserver-fds=3,4
> make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make
> rule.
> make[1]: Entering directory '/tmp/subdir'
> echo "this is sub-make"; echo w
> this is sub-make
> w
> 
> === if we use ${MAKE} ===
> # make -j2 test
> echo  -j --jobserver-fds=3,4;cd subdir; make
> -j --jobserver-fds=3,4
> make[1]: Entering directory '/tmp/subdir'
> echo "this is sub-make"; echo w -j --jobserver-fds=3,4
> this is sub-make
> w -j --jobserver-fds=3,4
> 
> 
> On Tue, Feb 9, 2016 at 9:40 AM, Ben Pfaff <b...@ovn.org> wrote:
> 
> > Make automatically passes the flags through the environment in the
> > MAKEFLAGS variable.
> >
> > On Tue, Feb 09, 2016 at 09:37:34AM -0800, William Tu wrote:
> > > I'm also running "make -j2 dist-docs" but could find -j2 optioned passed
> > > in. Is the correct way of using this is like this:
> > >
> > > # MAKE="make -j2" make dist-docs
> > >
> > > Thank you
> > > William
> > >
> > > On Tue, Feb 9, 2016 at 8:59 AM, Russell Bryant <russ...@ovn.org> wrote:
> > >
> > > > On 02/09/2016 11:16 AM, Ben Pfaff wrote:
> > > > > When GNU make sees that a command to be executed contains the string
> > > > > $(MAKE), it makes the jobserver that limits parallelism available to
> > > > > the command.  Otherwise, any sub-make that executes sees that
> > > > > parallelism is enabled but does not have access to the jobserver, so
> > > > > it prints a warning and turns off parallel job execution.
> > > > >
> > > > > This also makes the dist-docs process run the same "make" that is
> > > > > executed at the top level, in case that's different from the default
> > > > > "make" found in $PATH.
> > > > >
> > > > > Signed-off-by: Ben Pfaff <b...@ovn.org>
> > > > > ---
> > > > > v1->v2: Rewrite commit message.
> > > >
> > > > magic, indeed...
> > > >
> > > > Acked-by: Russell Bryant <russ...@ovn.org>
> > > >
> > > > --
> > > > Russell Bryant
> > > > _______________________________________________
> > > > dev mailing list
> > > > dev@openvswitch.org
> > > > http://openvswitch.org/mailman/listinfo/dev
> > > >
> >
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to