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

Diff of /eclass/autotools.eclass

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

Revision 1.84 Revision 1.85
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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/autotools.eclass,v 1.84 2009/04/12 07:38:33 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.85 2009/05/04 22:27:05 vapier Exp $
4 4
5# @ECLASS: autotools.eclass 5# @ECLASS: autotools.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: Regenerates auto* build scripts 8# @BLURB: Regenerates auto* build scripts
239autotools_run_tool() { 239autotools_run_tool() {
240 if [[ ${EBUILD_PHASE} != "unpack" && ${EBUILD_PHASE} != "prepare" ]]; then 240 if [[ ${EBUILD_PHASE} != "unpack" && ${EBUILD_PHASE} != "prepare" ]]; then
241 ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase" 241 ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase"
242 fi 242 fi
243 243
244 local STDERR_TARGET="${T}/$$.out" 244 local STDERR_TARGET="${T}/$1.out"
245 local ris 245 # most of the time, there will only be one run, but if there are
246 # more, make sure we get unique log filenames
247 if [[ -e ${STDERR_TARGET} ]] ; then
248 STDERR_TARGET="${T}/$1-$$.out"
249 fi
246 250
247 printf "***** $1 *****\n***** $*\n\n" > "${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}" 251 printf "***** $1 *****\n***** PWD: ${PWD}\n***** $*\n\n" > "${STDERR_TARGET}"
248 252
249 ebegin "Running $@" 253 ebegin "Running $@"
250 "$@" >> "${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}" 2>&1 254 "$@" >> "${STDERR_TARGET}" 2>&1
251 ris=$? 255 eend $?
252 eend ${ris}
253 256
254 if [[ ${ris} != 0 && ${NO_FAIL} != 1 ]]; then 257 if [[ $? != 0 && ${NO_FAIL} != 1 ]] ; then
255 echo 258 echo
256 eerror "Failed Running $1 !" 259 eerror "Failed Running $1 !"
257 eerror 260 eerror
258 eerror "Include in your bugreport the contents of:" 261 eerror "Include in your bugreport the contents of:"
259 eerror 262 eerror
260 eerror " ${STDERR_TARGET%/*}/$1-${STDERR_TARGET##*/}" 263 eerror " ${STDERR_TARGET}"
261 echo 264 echo
262 die "Failed Running $1 !" 265 die "Failed Running $1 !"
263 fi 266 fi
264} 267}
265 268

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85

  ViewVC Help
Powered by ViewVC 1.1.20