RPM would probably benefit from a %make macro which runs make but only
that we detect the number of processors with some shell script code and
then pass the number of processer to make -j$NUMPROC.
below is the code that should go in macros.
if [ -z "$NPROCS" ]; then NPROCS=`egrep -c ^cpu[0-9]+ /proc/stat || :`; fi
if [ -z "$NPROCS" -o "$NPROCS" -le "0" ]; then
This is a good idea, but I can't change rpm's default configuration adding
on /proc in this fashion. Please send me a patch to add this in Mandrake
macro configuration files, as I'd like to add this (and other Mandrake specific
configuration to the rpm distribution.)
This is being added as a Mandrake specific per-platform macro configuration,
attempts are in rpm-4.0.1 and later.
Can't you just test if /proc/stat exists first? That way there is no proc