On Thu, Aug 23, 2012 at 7:29 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Eran Ifrah <eran.ifrah@gmail.com>
> Date: Thu, 23 Aug 2012 17:42:13 +0300
>
> It seems that mingw32-make only partially supports the $(MAKE) variable

No, this is documented behavior for any Make that doesn't support the
"job server" parallelism.


 I wasn't aware that the official make does not support "job server", now that I know this, it makes sense
 
> For example, if I want to run make with multiple jobs (-jN) from within a
> makefile, I usually write something like this:
>
> subdir:
>     cd subdir && $(MAKE) -f Makefile.mk
>
> Now if I execute the makefile from the command line under Linux like this:
>
> make -j4 -f Makefile.mk
>
> $(MAKE) will contain "make -j4"
>
> While under Windows / CMD.EXE - *no* MSYS,
>
> it seems that $(MAKE) is forcing "-j 1"

Get the CVS code of Make, build it, and you will see no such problem,
because the CVS code already supports job server.

In a Make that doesn't support job server, the parent Make cannot
control how many jobs will be launched by a sub-Make, so it resets the
number to 1.

I was trying to avoid building make myself. Luckily for me, niXman provided me with a link to a make binary that supports it
 
> I tried overriding this behavior using MAKEFLAGS and also setting MAKEOVERRIDES
> =
> as described here:
> http://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html
>
> with no luck...

With Make 3.82, you need to set "-jN" in the sub-Make by explicitly
mentioning it on the sub-Make command line.

 
I know this, I was trying to avoid it. I didn't want to hard code the number of jobs into the Makefile
 
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe



--
Eran Ifrah
Author of codelite, a cross platform open source C/C++ IDE: http://www.codelite.org