diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2005-08-31 01:44:02 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2005-08-31 01:44:02 +0000 |
commit | 0f7f5af84e836a52760d17c0dd6d1f40d4a00c54 (patch) | |
tree | 7576155d86a06c9ab16ba3484c6af75c0bb0c4d7 /eclass | |
parent | Built package for ppc to fix #70617 and #98984 (diff) | |
download | gentoo-2-0f7f5af84e836a52760d17c0dd6d1f40d4a00c54.tar.gz gentoo-2-0f7f5af84e836a52760d17c0dd6d1f40d4a00c54.tar.bz2 gentoo-2-0f7f5af84e836a52760d17c0dd6d1f40d4a00c54.zip |
Change M4DIR to AT_M4DIR. Do not always run gnuconfig_update (handled
by econf). Make eaclocal's handling of AT_M4DIR a bit smarter.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/autotools.eclass | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass index 4b3988b06b66..7821538bfa0c 100644 --- a/eclass/autotools.eclass +++ b/eclass/autotools.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.15 2005/08/30 11:29:17 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.16 2005/08/31 01:44:02 azarah Exp $ # # Author: Diego Pettenò <flameeyes@gentoo.org> # Enhancements: Martin Schlemmer <azarah@gentoo.org> @@ -18,6 +18,16 @@ inherit eutils gnuconfig # # Ebuilds should rather depend on the proper version of the tool. +# Variables: +# +# AT_M4DIR - Additional director(y|ies) aclocal should include +# AT_GNUCONF_UPDATE - Should gnuconfig_update() be run (normally handled by +# econf()) [yes|no] + +# XXX: M4DIR should be depreciated +AT_M4DIR=${AT_M4DIR:-${M4DIR}} +AT_GNUCONF_UPDATE="no" + # Internal function to run an autotools' tool autotools_run_tool() { local STDERR_TARGET="${T}/$$.out" @@ -78,7 +88,27 @@ autotools_get_subdirs() { eaclocal() { local aclocal_opts - [[ -n ${M4DIR} ]] && aclocal_opts="-I ${M4DIR}" + # XXX: M4DIR should be depreciated + AT_M4DIR=${AT_M4DIR:-${M4DIR}} + + if [[ -n ${AT_M4DIR} ]] ; then + for x in ${AT_M4DIR} ; do + case "${x}" in + "-I") + # We handle it below + ;; + "-I"*) + # Invalid syntax, but maybe we should help out ... + ewarn "eaclocal: Proper syntax is (note the space after '-I'): aclocal -I <dir>" + aclocal_opts="${aclocal_opts} -I ${x}" + ;; + *) + [[ ! -d ${x} ]] && ewarn "eaclocal: '${x}' does not exist" + aclocal_opts="${aclocal_opts} -I ${x}" + ;; + esac + done + fi [[ -f aclocal.m4 && -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \ autotools_run_tool aclocal "$@" ${aclocal_opts} @@ -119,7 +149,7 @@ eautomake() { # This function mimes the behavior of autoreconf, but uses the different # eauto* functions to run the tools. It doesn't accept parameters, but -# the directory with include files can be specified with M4DIR variable. +# the directory with include files can be specified with AT_M4DIR variable. # # Note: doesn't run autopoint right now, but runs gnuconfig_update. eautoreconf() { @@ -139,5 +169,7 @@ eautoreconf() { eautoconf eautoheader eautomake - gnuconfig_update + + # Normally run by econf() + [[ ${AT_GNUCONF_UPDATE} == "yes" ]] && gnuconfig_update } |