I have a makefile that calls several other makefiles.
I would like to pass the -j option along with other calls to the makefile.
Something like (make -j8):
all: make -f libpng_linux.mk -j$(J)
Where $ (J) is the value 8 of -j8. I absolutely swear that I did this before, but I can not find my example.
$ (MAKEFLAGS) seems to contain -jobserver-fds = 3,4 -j no matter what -j2 or -j8
Edit: Possible solution:
Copy this as an answer soon.
It seems one solution is not to worry about it. Turn on -j8 when you invoke the main makefile. Sub-calls should look like this:
all: +make -f libpng_linux.mk -j$(J)
Note the "+" before make. I noticed that I was throwing a warning when trying to build in parallel: make [1]: warning: jobserver not available: using -j1. Add `+ 'to the parent make rule.
source share