After looking closer, I must amend my first statement.
It seems not to be the subdirs, but the first gcc commands after 'make
clean && make':
Here I have only 1 core utilization:
gcc -DHAVE_CONFIG_H -DNO_XMALLOC -I. -I.. -I. -I. -I.. -I..
-DIN_LIBUNISTRING -DDEPENDS_ON_LIBICONV=1 -g -c amemxfrm.c
gcc -DHAVE_CONFIG_H -DNO_XMALLOC -I. -I.. -I. -I. -I.. -I..
-DIN_LIBUNISTRING -DDEPENDS_ON_LIBICONV=1 -g -c c-ctype.c
gcc -DHAVE_CONFIG_H -DNO_XMALLOC -I. -I.. -I. -I. -I.. -I..
-DIN_LIBUNISTRING -DDEPENDS_ON_LIBICONV=1 -g -c c-strcasecmp.c
...
gcc -DHAVE_CONFIG_H -DNO_XMALLOC -I. -I.. -I. -I. -I.. -I..
-DIN_LIBUNISTRING -DDEPENDS_ON_LIBICONV=1 -g -c version.c
gcc -DHAVE_CONFIG_H -DNO_XMALLOC -I. -I.. -I. -I. -I.. -I..
-DIN_LIBUNISTRING -DDEPENDS_ON_LIBICONV=1 -g -c fseterr.c
gcc -DHAVE_CONFIG_H -DNO_XMALLOC -I. -I.. -I. -I. -I.. -I..
-DIN_LIBUNISTRING -DDEPENDS_ON_LIBICONV=1 -g -c mbrtowc.c
It seems to be a simple for loop (for f in amemxfrm.c c-ctype.h ...).
After this we have a parallel build:
/usr/bin/make all-am
make[3]: Entering directory '/home/oms/src/libunistring/lib'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-DNO_XMALLOC -I. -I.. -I. -I. -I.. -I.. -DIN_LIBUNISTRING
-DDEPENDS_ON_LIBICONV=1 -g -c -o amemxfrm.lo amemxfrm.c
...
I am not an expert here, but using a shell with job control couldn't the
the loop be parallelized (e.g. when using bash -> parallel run ) ?
Regards, Tim