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

Diff of /eclass/autotools.eclass

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

Revision 1.102 Revision 1.103
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/autotools.eclass,v 1.102 2011/04/06 03:52:08 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.103 2011/05/16 03:44:26 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
150 local aclocal_opts 150 local aclocal_opts
151 151
152 local amflags_file 152 local amflags_file
153 for amflags_file in GNUmakefile.am Makefile.am GNUmakefile.in Makefile.in ; do 153 for amflags_file in GNUmakefile.am Makefile.am GNUmakefile.in Makefile.in ; do
154 [[ -e ${amflags_file} ]] || continue 154 [[ -e ${amflags_file} ]] || continue
155 # setup the env in case the pkg does something crazy
156 # in their ACLOCAL_AMFLAGS. like run a shell script
157 # which turns around and runs autotools #365401
158 autotools_env_setup
155 aclocal_opts=$(sed -n '/^ACLOCAL_AMFLAGS[[:space:]]*=/s:[^=]*=::p' ${amflags_file}) 159 aclocal_opts=$(sed -n '/^ACLOCAL_AMFLAGS[[:space:]]*=/s:[^=]*=::p' ${amflags_file})
156 eval aclocal_opts=\"${aclocal_opts}\" 160 eval aclocal_opts=\"${aclocal_opts}\"
157 break 161 break
158 done 162 done
159 163
255eautopoint() { 259eautopoint() {
256 autotools_run_tool autopoint "$@" 260 autotools_run_tool autopoint "$@"
257} 261}
258 262
259# Internal function to run an autotools' tool 263# Internal function to run an autotools' tool
260autotools_run_tool() { 264autotools_env_setup() {
261 if [[ ${EBUILD_PHASE} != "unpack" && ${EBUILD_PHASE} != "prepare" ]]; then
262 ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase"
263 fi
264
265 # We do the “latest” → version switch here because it solves 265 # We do the “latest” → version switch here because it solves
266 # possible order problems, see bug #270010 as an example. 266 # possible order problems, see bug #270010 as an example.
267 if [[ ${WANT_AUTOMAKE} == "latest" ]]; then 267 if [[ ${WANT_AUTOMAKE} == "latest" ]]; then
268 local pv 268 local pv
269 for pv in ${_LATEST_AUTOMAKE} ; do 269 for pv in ${_LATEST_AUTOMAKE} ; do
273 done 273 done
274 [[ ${WANT_AUTOMAKE} == "latest" ]] && \ 274 [[ ${WANT_AUTOMAKE} == "latest" ]] && \
275 die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE}" 275 die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE}"
276 fi 276 fi
277 [[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.5 277 [[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.5
278}
279autotools_run_tool() {
280 if [[ ${EBUILD_PHASE} != "unpack" && ${EBUILD_PHASE} != "prepare" ]]; then
281 ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase"
282 fi
283
284 autotools_env_setup
278 285
279 local STDERR_TARGET="${T}/$1.out" 286 local STDERR_TARGET="${T}/$1.out"
280 # most of the time, there will only be one run, but if there are 287 # most of the time, there will only be one run, but if there are
281 # more, make sure we get unique log filenames 288 # more, make sure we get unique log filenames
282 if [[ -e ${STDERR_TARGET} ]] ; then 289 if [[ -e ${STDERR_TARGET} ]] ; then

Legend:
Removed from v.1.102  
changed lines
  Added in v.1.103

  ViewVC Help
Powered by ViewVC 1.1.20