[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Specifying make flags in rpmrc
- From: Bo Forslund <bo forslund abc se>
- To: rpm-list redhat com
- Subject: Re: Specifying make flags in rpmrc
- Date: Fri, 06 Jul 2001 11:21:34 +0200
Jay Maynard wrote:
> I've got a dual-processor machine that I use to build RPMs on. When building
> the package manually, I give make the -j 4 flag to tell it to run 4 compiles
> at once; this makes things go a lot faster. I'd like to have rpm use that
> flag as well when calling make, but haven't figured out from any of the docs
> I've seen online how to do it. Is there a way? I don't want to have the flag
> in the specfile for obvious reasons...
>
Things will go even faster if You do "make -j 2". Then make will run two
processes, one on each cpu.
I don't thinkt there is a flag. You use the macro %make in the spec. The macro
will run in as many processes as there is CPUs on the building machine.
The macro looks like this
# make
%_make_bin make
%make if [ -z "$NPROCS" -a -f /proc/stat ]; then NPROCS=`egrep -c ^cpu[0-9]+
/proc/stat || :`; fi \
if [ -z "$NPROCS" -o "$NPROCS" -le "0" ]; then \
NPROCS=1 \
fi \
%{_make_bin} -j$NPROCS
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]