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

Diff of /eclass/autotools.eclass

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

Revision 1.38 Revision 1.45
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.38 2006/06/28 00:15:32 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.45 2006/09/22 22:25:06 vapier Exp $
4# 4#
5# Author: Diego Pettenò <flameeyes@gentoo.org> 5# Author: Diego Pettenò <flameeyes@gentoo.org>
6# Enhancements: Martin Schlemmer <azarah@gentoo.org> 6# Enhancements: Martin Schlemmer <azarah@gentoo.org>
7# 7#
8# This eclass is for handling autotooled software packages that 8# This eclass is for handling autotooled software packages that
10# 10#
11# NB: If you add anything, please comment it! 11# NB: If you add anything, please comment it!
12 12
13inherit eutils libtool 13inherit eutils libtool
14 14
15DEPEND="sys-devel/automake 15[[ ${WANT_AUTOMAKE} == "latest" ]] && export WANT_AUTOMAKE=1.9
16 sys-devel/autoconf 16[[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.5
17
18_automake_atom="sys-devel/automake"
19_autoconf_atom="sys-devel/autoconf"
20[[ -n ${WANT_AUTOMAKE} ]] && _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*"
21if [[ -n ${WANT_AUTOCONF} ]] ; then
22 case ${WANT_AUTOCONF} in
23 2.1) _autoconf_atom="=sys-devel/autoconf-${WANT_AUTOCONF}*" ;;
24 2.5) _autoconf_atom=">=sys-devel/autoconf-2.59" ;;
25 esac
26fi
27DEPEND="${_automake_atom}
28 ${_autoconf_atom}
17 sys-devel/libtool" 29 sys-devel/libtool"
30unset _automake_atom _autoconf_atom
18 31
19# Variables: 32# Variables:
20# 33#
21# AT_M4DIR - Additional director(y|ies) aclocal should search 34# AT_M4DIR - Additional director(y|ies) aclocal should search
22# AM_OPTS - Additional options to pass to automake during 35# AM_OPTS - Additional options to pass to automake during
45# eauto* functions to run the tools. It doesn't accept parameters, but 58# eauto* functions to run the tools. It doesn't accept parameters, but
46# the directory with include files can be specified with AT_M4DIR variable. 59# the directory with include files can be specified with AT_M4DIR variable.
47eautoreconf() { 60eautoreconf() {
48 local pwd=$(pwd) x auxdir 61 local pwd=$(pwd) x auxdir
49 62
63 if [[ -z ${AT_NO_RECURSIVE} ]]; then
50 # Take care of subdirs 64 # Take care of subdirs
51 for x in $(autotools_get_subdirs); do 65 for x in $(autotools_get_subdirs); do
52 if [[ -d ${x} ]] ; then 66 if [[ -d ${x} ]] ; then
53 cd "${x}" 67 cd "${x}"
54 AT_NOELIBTOOLIZE="yes" eautoreconf 68 AT_NOELIBTOOLIZE="yes" eautoreconf
55 cd "${pwd}" 69 cd "${pwd}"
56 fi 70 fi
57 done 71 done
72 fi
58 73
59 auxdir=$(autotools_get_auxdir) 74 auxdir=$(autotools_get_auxdir)
60 75
61 einfo "Running eautoreconf in '$(pwd)' ..." 76 einfo "Running eautoreconf in '$(pwd)' ..."
62 [[ -n ${auxdir} ]] && mkdir -p ${auxdir} 77 [[ -n ${auxdir} ]] && mkdir -p ${auxdir}
138eautomake() { 153eautomake() {
139 local extra_opts 154 local extra_opts
140 155
141 [[ -f Makefile.am ]] || return 0 156 [[ -f Makefile.am ]] || return 0
142 157
158 if [[ -n ${WANT_AUTOMAKE} ]]; then
159 export WANT_AUTOMAKE # let the automake wrapper pick it up
160 einfo "Required automake ${WANT_AUTOMAKE}. Using $(automake --version | head -n 1)."
161 fi
162
143 if [[ -z ${FROM_EAUTORECONF} && -f Makefile.in ]]; then 163 if [[ -z ${FROM_EAUTORECONF} && -f Makefile.in ]]; then
144 local used_automake 164 local used_automake
145 local installed_automake 165 local installed_automake
146 166
147 installed_automake=$(automake --version | head -n 1 | \ 167 installed_automake=$(automake --version | head -n 1 | \

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.45

  ViewVC Help
Powered by ViewVC 1.1.20