I like it, but the problem is that it might be slower for -j1. This way you
launch one different shell for each module (in fact 2 shells, the () arround
$$(MAKE)... launch another subshell). The old way launched everything
into the same subshell.
We could try 2 different versions, one for no -j or -j1 and one for -jX
(looking at the make command line to decide which one to use).
Andrei
Hello
I have done a strace -f on the make command and for me it looks like a
remove a shell invocation. Because in the original code, the @for launch
another shell, with the @foreach which is a builtin just expands the
text when the Makefile is processed.
[pid 31050] execve("/bin/sh", ["/bin/sh", "-c", "for r
in
modules/avpops modules"...], [/* 119 vars */]) = 0
If you refere to this line ( $$(MAKE) -C $(1) $(2) || [ ${err_fail} != 1
] ) || exit 1; \ This is just a shorthand "if" . I could let the "if"
as in the original script. (works I've tested it)
Have I missed something ?!
BTW This -j 3 problem also occurs with make modules-doc and make
modules-readme.
Cheers
Marius