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

Diff of /eclass/autotools.eclass

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

Revision 1.134 Revision 1.135
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.134 2012/05/20 12:31:32 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.135 2012/05/20 12:38:33 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 [[ -n ${auxdir}${macdir} ]] && mkdir -p ${auxdir} ${macdir} 164 [[ -n ${auxdir}${macdir} ]] && mkdir -p ${auxdir} ${macdir}
165 eaclocal 165 eaclocal
166 if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then 166 if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then
167 eautopoint --force 167 eautopoint --force
168 fi 168 fi
169 [[ ${CHOST} == *-darwin* ]] && g=g
170 if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then
171 _elibtoolize --copy --force --install
172 else
173 _elibtoolize --copy --force 169 _elibtoolize --install --copy --force
174 fi
175 eautoconf 170 eautoconf
176 eautoheader 171 eautoheader
177 [[ ${AT_NOEAUTOMAKE} != "yes" ]] && FROM_EAUTORECONF="yes" eautomake ${AM_OPTS} 172 [[ ${AT_NOEAUTOMAKE} != "yes" ]] && FROM_EAUTORECONF="yes" eautomake ${AM_OPTS}
178 173
179 [[ ${AT_NOELIBTOOLIZE} == "yes" ]] && return 0 174 [[ ${AT_NOELIBTOOLIZE} == "yes" ]] && return 0
225 autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags) 220 autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags)
226} 221}
227 222
228# @FUNCTION: _elibtoolize 223# @FUNCTION: _elibtoolize
229# @DESCRIPTION: 224# @DESCRIPTION:
225# Runs libtoolize. If --install is the first arg, automatically drop it if
226# the active libtool version doesn't support it.
227#
230# Runs libtoolize. Note the '_' prefix .. to not collide with elibtoolize() from 228# Note the '_' prefix .. to not collide with elibtoolize() from libtool.eclass.
231# libtool.eclass.
232_elibtoolize() { 229_elibtoolize() {
233 local opts g=
234
235 # Check if we should run libtoolize (AM_PROG_LIBTOOL is an older macro, 230 # Check if we should run libtoolize (AM_PROG_LIBTOOL is an older macro,
236 # check for both it and the current AC_PROG_LIBTOOL) 231 # check for both it and the current AC_PROG_LIBTOOL)
237 [[ -n $(autotools_check_macro AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT) ]] || return 0 232 [[ -n $(autotools_check_macro AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT) ]] || return 0
238 233
234 local LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
235 type -P glibtoolize && LIBTOOLIZE=glibtoolize
236
239 [[ -f GNUmakefile.am || -f Makefile.am ]] && opts="--automake" 237 [[ -f GNUmakefile.am || -f Makefile.am ]] && set -- "$@" --automake
238 if [[ $1 == "--install" ]] ; then
239 ${LIBTOOLIZE} -n --install >& /dev/null || shift
240 fi
240 241
241 [[ ${CHOST} == *-darwin* ]] && g=g
242 autotools_run_tool ${LIBTOOLIZE:-${g}libtoolize} "$@" ${opts} 242 autotools_run_tool ${LIBTOOLIZE} "$@" ${opts}
243 243
244 # Need to rerun aclocal 244 # Need to rerun aclocal
245 eaclocal 245 eaclocal
246} 246}
247 247

Legend:
Removed from v.1.134  
changed lines
  Added in v.1.135

  ViewVC Help
Powered by ViewVC 1.1.20