/[gentoo-x86]/eclass/scons-utils.eclass
Gentoo

Diff of /eclass/scons-utils.eclass

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

Revision 1.6 Revision 1.7
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 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/scons-utils.eclass,v 1.6 2011/08/29 01:28:10 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/scons-utils.eclass,v 1.7 2011/10/30 14:29:54 mgorny Exp $
4 4
5# @ECLASS: scons-utils.eclass 5# @ECLASS: scons-utils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# mgorny@gentoo.org 7# mgorny@gentoo.org
8# @BLURB: helper functions to deal with SCons buildsystem 8# @BLURB: helper functions to deal with SCons buildsystem
127 --jobs=*|--keep-going) 127 --jobs=*|--keep-going)
128 new_makeopts=${new_makeopts+${new_makeopts} }${1} 128 new_makeopts=${new_makeopts+${new_makeopts} }${1}
129 ;; 129 ;;
130 # need to take a look at the next arg and guess 130 # need to take a look at the next arg and guess
131 --jobs) 131 --jobs)
132 if [[ ${#} -gt 1 && ${2} =~ [0-9]+ ]]; then 132 if [[ ${#} -gt 1 && ${2} =~ ^[0-9]+$ ]]; then
133 new_makeopts="${new_makeopts+${new_makeopts} }${1} ${2}" 133 new_makeopts="${new_makeopts+${new_makeopts} }${1} ${2}"
134 shift 134 shift
135 else 135 else
136 # no value means no limit, let's pass a random int 136 # no value means no limit, let's pass a random int
137 new_makeopts=${new_makeopts+${new_makeopts} }${1}=5 137 new_makeopts=${new_makeopts+${new_makeopts} }${1}=5
151 k*) 151 k*)
152 new_optstr=${new_optstr}k 152 new_optstr=${new_optstr}k
153 ;; 153 ;;
154 # -j needs to come last 154 # -j needs to come last
155 j) 155 j)
156 if [[ ${#} -gt 1 && ${2} =~ [0-9]+ ]]; then 156 if [[ ${#} -gt 1 && ${2} =~ ^[0-9]+$ ]]; then
157 new_optstr="${new_optstr}j ${2}" 157 new_optstr="${new_optstr}j ${2}"
158 shift 158 shift
159 else 159 else
160 new_optstr="${new_optstr}j 5" 160 new_optstr="${new_optstr}j 5"
161 fi 161 fi

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20