I configured "make -j5" at my stable Gentoo, but the process lists shows, that each of 2 perl jobs runs 5 make jobs : Mem: 7983 7232 750 0 436 4672 -/+ buffers/cache: 2123 5859 Swap: 9538 0 9538 emerge(18282)───sandbox(23553)───ebuild.sh(23555)───ebuild.sh(23578)───make(23588)───sh(23589)───make(23597)───sh(26406)───perl(26407)─┬─perl(4892)───dmake(4893)───sh(4898)───make(4899)─┬─sh(6938)───i686-pc-linux-g(6940)─┬─as(6942) │ │ └─cc1plus(6941) │ ├─sh(6959)───i686-pc-linux-g(6961)─┬─as(6963) │ │ └─cc1plus(6962) │ ├─sh(6969)───i686-pc-linux-g(6971)─┬─as(6973) │ │ └─cc1plus(6972) │ ├─sh(7052)───i686-pc-linux-g(7054)─┬─as(7056) │ │ └─cc1plus(7055) │ └─sh(7078)───i686-pc-linux-g(7080)─┬─as(7082) │ └─cc1plus(7081) └─perl(5329)───dmake(5330)───sh(5340)───make(5341)─┬─sh(7034)───i686-pc-linux-g(7038)─┬─as(7040) │ └─cc1plus(7039) ├─sh(7073)───i686-pc-linux-g(7075)─┬─as(7077) │ └─cc1plus(7076) ├─sh(7083)───i686-pc-linux-g(7085)─┬─as(7087) │ └─cc1plus(7086) ├─sh(7088)───i686-pc-linux-g(7090)─┬─as(7092) │ └─cc1plus(7091) └─sh(7093)───i686-pc-linux-g(7095)─┬─as(7097) └─cc1plus(7096)
Our old (recursive) build system uses two configure options to determine how many jobs can be run: * --with-num-cpus tells how many directories can be build at once (one dmake process for each of them) * --with-max-jobs tells how many jobs each dmake can run It is the ebuild's task to supply appropriate values for the options based on system-specific settings (e.g., MAKEFLAGS=-j5).