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

Diff of /eclass/autotools.eclass

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

Revision 1.144 Revision 1.145
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/autotools.eclass,v 1.144 2012/06/06 17:15:08 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.145 2012/06/07 04:50:04 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
164 164
165 # Run all the tools before aclocal so we can gather the .m4 files. 165 # Run all the tools before aclocal so we can gather the .m4 files.
166 local i tools=( 166 local i tools=(
167 # <tool> <was run> <command> 167 # <tool> <was run> <command>
168 glibgettext false "autotools_run_tool glib-gettextize --copy --force" 168 glibgettext false "autotools_run_tool glib-gettextize --copy --force"
169 gettext false "eautopoint --force" 169 gettext false "autotools_run_tool --at-missing autopoint --force"
170 # intltool must come after autopoint. 170 # intltool must come after autopoint.
171 intltool false "autotools_run_tool intltoolize --automake --copy --force" 171 intltool false "autotools_run_tool intltoolize --automake --copy --force"
172 gtkdoc false "autotools_run_tool gtkdocize --copy" 172 gtkdoc false "autotools_run_tool --at-missing gtkdocize --copy"
173 gnomedoc false "autotools_run_tool gnome-doc-prepare --copy --force" 173 gnomedoc false "autotools_run_tool --at-missing gnome-doc-prepare --copy --force"
174 libtool false "_elibtoolize --install --copy --force" 174 libtool false "_elibtoolize --install --copy --force"
175 ) 175 )
176 for (( i = 0; i < ${#tools[@]}; i += 3 )) ; do 176 for (( i = 0; i < ${#tools[@]}; i += 3 )) ; do
177 if _at_uses_${tools[i]} ; then 177 if _at_uses_${tools[i]} ; then
178 tools[i+1]=true 178 tools[i+1]=true
400 fi 400 fi
401 [[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.5 401 [[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.5
402} 402}
403 403
404# @FUNCTION: autotools_run_tool 404# @FUNCTION: autotools_run_tool
405# @USAGE: [--at-no-fail] [--at-m4flags] <autotool> [tool-specific flags] 405# @USAGE: [--at-no-fail] [--at-m4flags] [--at-missing] <autotool> [tool-specific flags]
406# @INTERNAL 406# @INTERNAL
407# @DESCRIPTION: 407# @DESCRIPTION:
408# Run the specified autotool helper, but do logging and error checking 408# Run the specified autotool helper, but do logging and error checking
409# around it in the process. 409# around it in the process.
410autotools_run_tool() { 410autotools_run_tool() {
411 # Process our own internal flags first 411 # Process our own internal flags first
412 local autofail=true m4flags=false 412 local autofail=true m4flags=false missing_ok=false
413 while [[ -n $1 ]] ; do 413 while [[ -n $1 ]] ; do
414 case $1 in 414 case $1 in
415 --at-no-fail) autofail=false;; 415 --at-no-fail) autofail=false;;
416 --at-m4flags) m4flags=true;; 416 --at-m4flags) m4flags=true;;
417 --at-missing) missing_ok=true;;
417 # whatever is left goes to the actual tool 418 # whatever is left goes to the actual tool
418 *) break;; 419 *) break;;
419 esac 420 esac
420 shift 421 shift
421 done 422 done
422 423
423 if [[ ${EBUILD_PHASE} != "unpack" && ${EBUILD_PHASE} != "prepare" ]]; then 424 if [[ ${EBUILD_PHASE} != "unpack" && ${EBUILD_PHASE} != "prepare" ]]; then
424 ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase" 425 ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase"
426 fi
427
428 if ${missing_ok} && ! type -P ${1} >/dev/null ; then
429 einfo "Skipping '$*' due $1 not installed"
430 return 0
425 fi 431 fi
426 432
427 autotools_env_setup 433 autotools_env_setup
428 434
429 local STDERR_TARGET="${T}/$1.out" 435 local STDERR_TARGET="${T}/$1.out"

Legend:
Removed from v.1.144  
changed lines
  Added in v.1.145

  ViewVC Help
Powered by ViewVC 1.1.20