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

Diff of /eclass/eutils.eclass

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

Revision 1.389 Revision 1.390
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
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.389 2012/04/15 20:02:43 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.390 2012/04/16 14:40:16 vapier Exp $
4 4
5# @ECLASS: eutils.eclass 5# @ECLASS: eutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: many extra (but common) functions that are used in ebuilds 8# @BLURB: many extra (but common) functions that are used in ebuilds
1286# @USAGE: [${MAKEOPTS}] 1286# @USAGE: [${MAKEOPTS}]
1287# @DESCRIPTION: 1287# @DESCRIPTION:
1288# Searches the arguments (defaults to ${MAKEOPTS}) and extracts the jobs number 1288# Searches the arguments (defaults to ${MAKEOPTS}) and extracts the jobs number
1289# specified therein. i.e. if the user has MAKEOPTS=-j9, this will show "9". 1289# specified therein. i.e. if the user has MAKEOPTS=-j9, this will show "9".
1290# We can't return the number as bash normalizes it to [0, 255]. If the flags 1290# We can't return the number as bash normalizes it to [0, 255]. If the flags
1291# havn't specified a -j flag, then "1" is shown as that is the default `make` 1291# haven't specified a -j flag, then "1" is shown as that is the default `make`
1292# uses. Useful for running non-make tools in parallel too. 1292# uses. Useful for running non-make tools in parallel too.
1293makeopts_jobs() { 1293makeopts_jobs() {
1294 [[ $# -eq 0 ]] && set -- ${MAKEOPTS} 1294 [[ $# -eq 0 ]] && set -- ${MAKEOPTS}
1295 local x jobs 1295 local x jobs
1296 for x ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done 1296 for x ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done

Legend:
Removed from v.1.389  
changed lines
  Added in v.1.390

  ViewVC Help
Powered by ViewVC 1.1.20