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

Diff of /eclass/autotools.eclass

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

Revision 1.130 Revision 1.133
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.130 2012/03/22 19:16:22 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.133 2012/05/20 10:39:45 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
47 47
48_automake_atom="sys-devel/automake" 48_automake_atom="sys-devel/automake"
49_autoconf_atom="sys-devel/autoconf" 49_autoconf_atom="sys-devel/autoconf"
50if [[ -n ${WANT_AUTOMAKE} ]]; then 50if [[ -n ${WANT_AUTOMAKE} ]]; then
51 case ${WANT_AUTOMAKE} in 51 case ${WANT_AUTOMAKE} in
52 none) _automake_atom="" ;; # some packages don't require automake at all 52 # Even if the package doesn't use automake, we still need to depend
53 # if you change the "latest" version here, change also autotools_run_tool 53 # on it because we run aclocal to process m4 macros. This matches
54 # this MUST reflect the latest stable major version for each arch! 54 # the autoreconf tool, so this requirement is correct. #401605
55 none) ;;
55 latest) 56 latest)
56 # Use SLOT deps if we can. For EAPI=0, we get pretty close. 57 # Use SLOT deps if we can. For EAPI=0, we get pretty close.
57 if [[ ${EAPI:-0} != 0 ]] ; then 58 if [[ ${EAPI:-0} != 0 ]] ; then
58 _automake_atom="|| ( `printf '>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }` )" 59 _automake_atom="|| ( `printf '>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }` )"
59 else 60 else
141# the directory with include files can be specified with AT_M4DIR variable. 142# the directory with include files can be specified with AT_M4DIR variable.
142# 143#
143# Should do a full autoreconf - normally what most people will be interested in. 144# Should do a full autoreconf - normally what most people will be interested in.
144# Also should handle additional directories specified by AC_CONFIG_SUBDIRS. 145# Also should handle additional directories specified by AC_CONFIG_SUBDIRS.
145eautoreconf() { 146eautoreconf() {
146 local x auxdir g 147 local x g
147 148
148 if [[ -z ${AT_NO_RECURSIVE} ]]; then 149 if [[ -z ${AT_NO_RECURSIVE} ]]; then
149 # Take care of subdirs 150 # Take care of subdirs
150 for x in $(autotools_get_subdirs); do 151 for x in $(autotools_get_subdirs); do
151 if [[ -d ${x} ]] ; then 152 if [[ -d ${x} ]] ; then
154 popd >/dev/null 155 popd >/dev/null
155 fi 156 fi
156 done 157 done
157 fi 158 fi
158 159
159 auxdir=$(autotools_get_auxdir) 160 local auxdir=$(autotools_get_auxdir)
161 local macdir=$(autotools_get_macrodir)
160 162
161 einfo "Running eautoreconf in '${PWD}' ..." 163 einfo "Running eautoreconf in '${PWD}' ..."
162 [[ -n ${auxdir} ]] && mkdir -p ${auxdir} 164 [[ -n ${auxdir}${macdir} ]] && mkdir -p ${auxdir} ${macdir}
163 eaclocal 165 eaclocal
166 if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then
167 eautopoint --force
168 fi
164 [[ ${CHOST} == *-darwin* ]] && g=g 169 [[ ${CHOST} == *-darwin* ]] && g=g
165 if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then 170 if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then
166 _elibtoolize --copy --force --install 171 _elibtoolize --copy --force --install
167 else 172 else
168 _elibtoolize --copy --force 173 _elibtoolize --copy --force
426} 431}
427 432
428# Internal function to get additional subdirs to configure 433# Internal function to get additional subdirs to configure
429autotools_get_subdirs() { autotools_check_macro_val AC_CONFIG_SUBDIRS ; } 434autotools_get_subdirs() { autotools_check_macro_val AC_CONFIG_SUBDIRS ; }
430autotools_get_auxdir() { autotools_check_macro_val AC_CONFIG_AUX_DIR ; } 435autotools_get_auxdir() { autotools_check_macro_val AC_CONFIG_AUX_DIR ; }
436autotools_get_macrodir() { autotools_check_macro_val AC_CONFIG_MACRO_DIR ; }
431 437
432_autotools_m4dir_include() { 438_autotools_m4dir_include() {
433 local x include_opts 439 local x include_opts
434 440
435 for x in "$@" ; do 441 for x in "$@" ; do

Legend:
Removed from v.1.130  
changed lines
  Added in v.1.133

  ViewVC Help
Powered by ViewVC 1.1.20