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

Diff of /eclass/eutils.eclass

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

Revision 1.13 Revision 1.14
1# Copyright 1999-2002 Gentoo Technologies, Inc. 1# Copyright 1999-2002 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# Author: Martin Schlemmer <azarah@gentoo.org> 3# Author: Martin Schlemmer <azarah@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.13 2003/01/17 08:08:48 azarah Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.14 2003/01/19 20:23:28 azarah Exp $
5# This eclass is for general purpose functions that most ebuilds 5# This eclass is for general purpose functions that most ebuilds
6# have to implement themselves. 6# have to implement themselves.
7# 7#
8# NB: If you add anything, please comment it! 8# NB: If you add anything, please comment it!
9 9
324 if [ ! -r /proc/cpuinfo ] 324 if [ ! -r /proc/cpuinfo ]
325 then 325 then
326 return 1 326 return 1
327 fi 327 fi
328 328
329 # 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 ]
331 then
332 ADMINOPTS="`egrep "^[[:space:]]*MAKEOPTS=" /etc/make.conf | cut -d= -f2 | sed 's/\"//g'`"
333 ADMINPARAM="${ADMINOPTS##*-j}"
334 ADMINPARAM="${ADMINPARAM%% -*}"
335 fi
336
329 export MAKEOPTS="`echo ${MAKEOPTS} | sed -e 's:-j[0-9]*::g'`" 337 export MAKEOPTS="`echo ${MAKEOPTS} | sed -e 's:-j[0-9]*::g'`"
330 338
331 if [ "${ARCH}" = "x86" ] 339 if [ "${ARCH}" = "x86" ]
332 then 340 then
333 # x86 always has "processor" 341 # x86 always has "processor"
370 # Make sure the number is valid ... 378 # Make sure the number is valid ...
371 if [ "${jobs}" -lt 1 ] 379 if [ "${jobs}" -lt 1 ]
372 then 380 then
373 jobs=1 381 jobs=1
374 fi 382 fi
375 383
384 if [ -n "${ADMINPARAM}" -a "${jobs}" -gt "${ADMINPARAM}" ]
385 then
386 einfo "Setting make jobs to \"-j${ADMINPARAM}\" to ensure successful merge..."
387 export MAKEOPTS="${MAKEOPTS} -j${ADMINPARAM}"
388 else
389 einfo "Setting make jobs to \"-j${jobs}\" to ensure successful merge..."
376 export MAKEOPTS="${MAKEOPTS} -j${jobs}" 390 export MAKEOPTS="${MAKEOPTS} -j${jobs}"
391 fi
377} 392}
378 393

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20