Bug 15638 - new %make macro for RPM.
Summary: new %make macro for RPM.
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm-build
Version: 6.2EE
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-08-07 14:11 UTC by Geoffrey Lee
Modified: 2008-05-01 15:37 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2001-01-18 17:24:04 UTC


Attachments (Terms of Use)

Description Geoffrey Lee 2000-08-07 14:11:31 UTC
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
  NPROCS=1
fi
make -j$NPROCS

Comment 1 Jeff Johnson 2001-01-08 17:36:31 UTC
This is a good idea, but I can't change rpm's default configuration adding
implicit dependencies
on /proc in this fashion. Please send me a patch to add this in Mandrake
per-platform
macro configuration files, as I'd like to add this (and other Mandrake specific
rpm
configuration to the rpm distribution.)

Comment 2 Jeff Johnson 2001-01-18 17:25:07 UTC
This is being added as a Mandrake specific per-platform macro configuration,
initial
attempts are in rpm-4.0.1 and later.

Comment 3 Andrew Bartlett 2001-01-20 03:43:03 UTC
Can't you just test if /proc/stat exists first?  That way there is no proc
dependency.


Note You need to log in before you can comment on or make changes to this bug.