Bug 15638 - new %make macro for RPM.
new %make macro for RPM.
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2000-08-07 10:11 EDT by Geoffrey Lee
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-01-18 12:24:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Geoffrey Lee 2000-08-07 10:11:31 EDT
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
make -j$NPROCS
Comment 1 Jeff Johnson 2001-01-08 12:36:31 EST
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
macro configuration files, as I'd like to add this (and other Mandrake specific
configuration to the rpm distribution.)
Comment 2 Jeff Johnson 2001-01-18 12:25:07 EST
This is being added as a Mandrake specific per-platform macro configuration,
attempts are in rpm-4.0.1 and later.
Comment 3 Andrew Bartlett 2001-01-19 22:43:03 EST
Can't you just test if /proc/stat exists first?  That way there is no proc

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