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

Diff of /eclass/autotools.eclass

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

Revision 1.82 Revision 1.83
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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.82 2009/01/04 16:54:10 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.83 2009/04/04 17:45:42 grobian 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
78# the directory with include files can be specified with AT_M4DIR variable. 78# the directory with include files can be specified with AT_M4DIR variable.
79# 79#
80# Should do a full autoreconf - normally what most people will be interested in. 80# Should do a full autoreconf - normally what most people will be interested in.
81# Also should handle additional directories specified by AC_CONFIG_SUBDIRS. 81# Also should handle additional directories specified by AC_CONFIG_SUBDIRS.
82eautoreconf() { 82eautoreconf() {
83 local pwd=$(pwd) x auxdir 83 local pwd=$(pwd) x auxdir g=
84 84
85 if [[ -z ${AT_NO_RECURSIVE} ]]; then 85 if [[ -z ${AT_NO_RECURSIVE} ]]; then
86 # Take care of subdirs 86 # Take care of subdirs
87 for x in $(autotools_get_subdirs); do 87 for x in $(autotools_get_subdirs); do
88 if [[ -d ${x} ]] ; then 88 if [[ -d ${x} ]] ; then
96 auxdir=$(autotools_get_auxdir) 96 auxdir=$(autotools_get_auxdir)
97 97
98 einfo "Running eautoreconf in '$(pwd)' ..." 98 einfo "Running eautoreconf in '$(pwd)' ..."
99 [[ -n ${auxdir} ]] && mkdir -p ${auxdir} 99 [[ -n ${auxdir} ]] && mkdir -p ${auxdir}
100 eaclocal 100 eaclocal
101 [[ ${CHOST} == *-darwin* ]] && g=g
101 if ${LIBTOOLIZE:-libtoolize} -n --install >& /dev/null ; then 102 if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then
102 _elibtoolize --copy --force --install 103 _elibtoolize --copy --force --install
103 else 104 else
104 _elibtoolize --copy --force 105 _elibtoolize --copy --force
105 fi 106 fi
106 eautoconf 107 eautoconf
155# @FUNCTION: _elibtoolize 156# @FUNCTION: _elibtoolize
156# @DESCRIPTION: 157# @DESCRIPTION:
157# Runs libtoolize. Note the '_' prefix .. to not collide with elibtoolize() from 158# Runs libtoolize. Note the '_' prefix .. to not collide with elibtoolize() from
158# libtool.eclass. 159# libtool.eclass.
159_elibtoolize() { 160_elibtoolize() {
160 local opts 161 local opts g=
161 162
162 # Check if we should run libtoolize (AM_PROG_LIBTOOL is an older macro, 163 # Check if we should run libtoolize (AM_PROG_LIBTOOL is an older macro,
163 # check for both it and the current AC_PROG_LIBTOOL) 164 # check for both it and the current AC_PROG_LIBTOOL)
164 [[ -n $(autotools_check_macro AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT) ]] || return 0 165 [[ -n $(autotools_check_macro AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT) ]] || return 0
165 166
166 [[ -f GNUmakefile.am || -f Makefile.am ]] && opts="--automake" 167 [[ -f GNUmakefile.am || -f Makefile.am ]] && opts="--automake"
167 168
168 [[ "${USERLAND}" == "Darwin" ]] && LIBTOOLIZE="glibtoolize" 169 [[ ${CHOST} == *-darwin* ]] && g=g
169 autotools_run_tool ${LIBTOOLIZE:-libtoolize} "$@" ${opts} 170 autotools_run_tool ${LIBTOOLIZE:-${g}libtoolize} "$@" ${opts}
170 171
171 # Need to rerun aclocal 172 # Need to rerun aclocal
172 eaclocal 173 eaclocal
173} 174}
174 175

Legend:
Removed from v.1.82  
changed lines
  Added in v.1.83

  ViewVC Help
Powered by ViewVC 1.1.20