MAKEOPTS u sbopkg, sbotools, slackpkg+...

Ovaj deo je namenjen diskusiji koja nije vezana ni za jednu prethodnu kategoriju, a tiče se Slackware linuxa

Moderator: Urednik

Post Reply

Administrator
Administrator
offline
User avatar

Posts: 2681
Joined: 01 Apr 2012, 13:50
Location: Mlečni put

Post Napisano: 08 Oct 2014, 13:35


Danas je na G+ Rajan Mekkvin postavio pitanje oko korišćenja 'make' funkcije u /etc/profile, da li je pravilno napisana i da li je uopšte dobra ideja.

Code: Select all

if [ "$( grep -c ^processor /proc/cpuinfo )" != 1 ]; then
  export MAKEOPTS="-j$( expr $( grep -c ^processor /proc/cpuinfo ) / 2 )"
fi
Jedan od odgovora u komentarima je bio od Matea Bernandinija koji je rekao da redovno koristi 'make' pri izgradnji paketa putem sbopkg. Kaže da jedan red uvek ubacuje u /etc/sbopkg/sbopkg.conf

Code: Select all

export MAKEFLAGS=${MAKEFLAGS:--j8}
Man stranice za sboinstall kažu da se može koristiti 'make' pri izgradnji paketa i da to treba navesti u /etc/sbotools/sbotools.conf (iako ja nemam taj dir i fajl :) ).

Kakva su vaša iskustva, koristi li neko 'make' sa SBo skriptama?

Dodatak, ceo odgovor Matea Bernandinija:
on my work machine, as I use multiple jobs when I build packages, I've got this line in /etc/sbopkg/sbopkg.conf

export MAKEFLAGS=${MAKEFLAGS:--j8}

or you can pass it also when invoking it

sbopkg -i whatever:MAKEFLAGS=-j8

if not using sbopkg and doing a manual build

MAKEFLAGS=-j8 ./whatever.SlackBuild

if re/building official Slackware stuff the default number of jobs is already 7 in most cases (so I don't feel like changing it to 8), but if I wish to change it

NUMJOBS=-j8 ./whateverelse.SlackBuild

to find the available processors you can use nproc

MAKEFLAGS=-j$(nproc)

I never used it in /etc/profile or ~/.bashrc
Use the source, Luke
SSZ irc kanal
Spread the Word, “CHOOSE SLACK! and Don’t look back.”


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest