| 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.40 2006/09/16 21:23:32 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 | |
| 13 | inherit eutils libtool |
13 | inherit eutils libtool |
| 14 | |
14 | |
| 15 | DEPEND="sys-devel/automake |
15 | _automake_atom="sys-devel/automake" |
| 16 | sys-devel/autoconf |
16 | _autoconf_atom="sys-devel/autoconf" |
|
|
17 | [[ -n ${WANT_AUTOMAKE} ]] && _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*" |
|
|
18 | [[ -n ${WANT_AUTOCONF} ]] && _autoconf_atom="=sys-devel/autoconf-${WANT_AUTOCONF}*" |
|
|
19 | DEPEND="${_automake_atom} |
|
|
20 | ${_autoconf_atom} |
| 17 | sys-devel/libtool" |
21 | sys-devel/libtool" |
|
|
22 | unset _automake_atom _autoconf_atom |
| 18 | |
23 | |
| 19 | # Variables: |
24 | # Variables: |
| 20 | # |
25 | # |
| 21 | # AT_M4DIR - Additional director(y|ies) aclocal should search |
26 | # AT_M4DIR - Additional director(y|ies) aclocal should search |
| 22 | # AM_OPTS - Additional options to pass to automake during |
27 | # AM_OPTS - Additional options to pass to automake during |
| … | |
… | |
| 45 | # eauto* functions to run the tools. It doesn't accept parameters, but |
50 | # 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. |
51 | # the directory with include files can be specified with AT_M4DIR variable. |
| 47 | eautoreconf() { |
52 | eautoreconf() { |
| 48 | local pwd=$(pwd) x auxdir |
53 | local pwd=$(pwd) x auxdir |
| 49 | |
54 | |
|
|
55 | if [[ -z ${AT_NO_RECURSIVE} ]]; then |
| 50 | # Take care of subdirs |
56 | # Take care of subdirs |
| 51 | for x in $(autotools_get_subdirs); do |
57 | for x in $(autotools_get_subdirs); do |
| 52 | if [[ -d ${x} ]] ; then |
58 | if [[ -d ${x} ]] ; then |
| 53 | cd "${x}" |
59 | cd "${x}" |
| 54 | AT_NOELIBTOOLIZE="yes" eautoreconf |
60 | AT_NOELIBTOOLIZE="yes" eautoreconf |
| 55 | cd "${pwd}" |
61 | cd "${pwd}" |
| 56 | fi |
62 | fi |
| 57 | done |
63 | done |
|
|
64 | fi |
| 58 | |
65 | |
| 59 | auxdir=$(autotools_get_auxdir) |
66 | auxdir=$(autotools_get_auxdir) |
| 60 | |
67 | |
| 61 | einfo "Running eautoreconf in '$(pwd)' ..." |
68 | einfo "Running eautoreconf in '$(pwd)' ..." |
| 62 | [[ -n ${auxdir} ]] && mkdir -p ${auxdir} |
69 | [[ -n ${auxdir} ]] && mkdir -p ${auxdir} |