/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.15 Revision 1.18
1# Copyright 1999-2002 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.18 2003/02/16 04:26:21 vapier Exp $
4#
3# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.15 2003/02/02 19:43:33 azarah Exp $ 6#
5# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
6# have to implement themselves. 8# have to implement themselves.
7# 9#
8# NB: If you add anything, please comment it! 10# NB: If you add anything, please comment it!
9 11
328 330
329 # This bit is from H?kan Wessberg <nacka-gentoo@refug.org>, bug #13565. 331 # This bit is from H?kan Wessberg <nacka-gentoo@refug.org>, bug #13565.
330 if [ "`egrep "^[[:space:]]*MAKEOPTS=" /etc/make.conf | wc -l`" -gt 0 ] 332 if [ "`egrep "^[[:space:]]*MAKEOPTS=" /etc/make.conf | wc -l`" -gt 0 ]
331 then 333 then
332 ADMINOPTS="`egrep "^[[:space:]]*MAKEOPTS=" /etc/make.conf | cut -d= -f2 | sed 's/\"//g'`" 334 ADMINOPTS="`egrep "^[[:space:]]*MAKEOPTS=" /etc/make.conf | cut -d= -f2 | sed 's/\"//g'`"
333 ADMINPARAM="${ADMINOPTS##*-j}" 335 ADMINPARAM="`echo ${ADMINOPTS} | gawk '{match($0, /-j *[0-9]*/, opt); print opt[0]}'`"
334 ADMINPARAM="${ADMINPARAM%% -*}" 336 ADMINPARAM="${ADMINPARAM/-j}"
335 fi 337 fi
336 338
337 export MAKEOPTS="`echo ${MAKEOPTS} | sed -e 's:-j[0-9]*::g'`" 339 export MAKEOPTS="`echo ${MAKEOPTS} | sed -e 's:-j *[0-9]*::g'`"
338 340
339 if [ "${ARCH}" = "x86" ] 341 if [ "${ARCH}" = "x86" -o "${ARCH}" = "hppa" ]
340 then 342 then
341 # x86 always has "processor" 343 # x86 and hppa always has "processor"
342 jobs="$((`grep -c ^processor /proc/cpuinfo` * 2))" 344 jobs="$((`grep -c ^processor /proc/cpuinfo` * 2))"
343 345
344 elif [ "${ARCH}" = "sparc" -o "${ARCH}" = "sparc64" ] 346 elif [ "${ARCH}" = "sparc" -o "${ARCH}" = "sparc64" ]
345 then 347 then
346 # sparc always has "ncpus active" 348 # sparc always has "ncpus active"

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20