diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-05-20 12:38:33 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-05-20 12:38:33 +0000 |
commit | a4a53ef1f725ea3cd5aa9713b6f1fee98b85bc4d (patch) | |
tree | 6824a22e9ca880e662ce6b1c69f6a497f8214b8d /eclass/autotools.eclass | |
parent | Stable for ppc/ppc64; bug #399997 (diff) | |
download | historical-a4a53ef1f725ea3cd5aa9713b6f1fee98b85bc4d.tar.gz historical-a4a53ef1f725ea3cd5aa9713b6f1fee98b85bc4d.tar.bz2 historical-a4a53ef1f725ea3cd5aa9713b6f1fee98b85bc4d.zip |
make eliding of --install transparent to the caller so that we can drop duplicated variable expansion and simplify higher code flows
Diffstat (limited to 'eclass/autotools.eclass')
-rw-r--r-- | eclass/autotools.eclass | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass index 001ed05360cb..6fc603a00ed9 100644 --- a/eclass/autotools.eclass +++ b/eclass/autotools.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.134 2012/05/20 12:31:32 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.135 2012/05/20 12:38:33 vapier Exp $ # @ECLASS: autotools.eclass # @MAINTAINER: @@ -166,12 +166,7 @@ eautoreconf() { if grep -q '^AM_GNU_GETTEXT_VERSION' configure.?? ; then eautopoint --force fi - [[ ${CHOST} == *-darwin* ]] && g=g - if ${LIBTOOLIZE:-${g}libtoolize} -n --install >& /dev/null ; then - _elibtoolize --copy --force --install - else - _elibtoolize --copy --force - fi + _elibtoolize --install --copy --force eautoconf eautoheader [[ ${AT_NOEAUTOMAKE} != "yes" ]] && FROM_EAUTORECONF="yes" eautomake ${AM_OPTS} @@ -227,19 +222,24 @@ eaclocal() { # @FUNCTION: _elibtoolize # @DESCRIPTION: -# Runs libtoolize. Note the '_' prefix .. to not collide with elibtoolize() from -# libtool.eclass. +# Runs libtoolize. If --install is the first arg, automatically drop it if +# the active libtool version doesn't support it. +# +# Note the '_' prefix .. to not collide with elibtoolize() from libtool.eclass. _elibtoolize() { - local opts g= - # Check if we should run libtoolize (AM_PROG_LIBTOOL is an older macro, # check for both it and the current AC_PROG_LIBTOOL) [[ -n $(autotools_check_macro AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT) ]] || return 0 - [[ -f GNUmakefile.am || -f Makefile.am ]] && opts="--automake" + local LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} + type -P glibtoolize && LIBTOOLIZE=glibtoolize + + [[ -f GNUmakefile.am || -f Makefile.am ]] && set -- "$@" --automake + if [[ $1 == "--install" ]] ; then + ${LIBTOOLIZE} -n --install >& /dev/null || shift + fi - [[ ${CHOST} == *-darwin* ]] && g=g - autotools_run_tool ${LIBTOOLIZE:-${g}libtoolize} "$@" ${opts} + autotools_run_tool ${LIBTOOLIZE} "$@" ${opts} # Need to rerun aclocal eaclocal |