diff options
author | Michał Górny <mgorny@gentoo.org> | 2012-01-14 14:59:18 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2012-01-14 14:59:18 +0000 |
commit | 7f375f74b983b2214537482596f9d7e98299f7a0 (patch) | |
tree | ec134591b1aa4a37a3b1e61f0cd338dee083dbf9 /eclass | |
parent | Disallow eautomake from calling eautoreconf unnecessarily. (diff) | |
download | gentoo-2-7f375f74b983b2214537482596f9d7e98299f7a0.tar.gz gentoo-2-7f375f74b983b2214537482596f9d7e98299f7a0.tar.bz2 gentoo-2-7f375f74b983b2214537482596f9d7e98299f7a0.zip |
Autoreconfigure packages when user patches need it.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/autotools-utils.eclass | 18 |
2 files changed, 21 insertions, 2 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 3b230359c894..ff19cbf07749 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.81 2012/01/14 14:58:29 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.82 2012/01/14 14:59:18 mgorny Exp $ + + 14 Jan 2012; Michał Górny <mgorny@gentoo.org> autotools-utils.eclass: + Autoreconfigure packages when user patches need it. 14 Jan 2012; Michał Górny <mgorny@gentoo.org> autotools-utils.eclass: Disallow eautomake from calling eautoreconf unnecessarily. diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass index 2728bfec2aa6..84d2b80be18e 100644 --- a/eclass/autotools-utils.eclass +++ b/eclass/autotools-utils.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-utils.eclass,v 1.36 2012/01/14 14:58:29 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.37 2012/01/14 14:59:18 mgorny Exp $ # @ECLASS: autotools-utils.eclass # @MAINTAINER: @@ -99,6 +99,11 @@ esac # Set to a non-empty value in order to enable running autoreconf # in src_prepare() and adding autotools dependencies. # +# This is usually necessary when using live sources or applying patches +# modifying configure.ac or Makefile.am files. Note that in the latter case +# setting this variable is obligatory even though the eclass will work without +# it (to add the necessary dependencies). +# # The eclass will try to determine the correct autotools to run including a few # external tools: gettext, glib-gettext, intltool, gtk-doc, gnome-doc-prepare. # If your tool is not supported, please open a bug and we'll add support for it. @@ -354,8 +359,19 @@ autotools-utils_src_prepare() { local want_autoreconf=${AUTOTOOLS_AUTORECONF} + touch "${T}"/.autotools-utils.timestamp || die [[ ${PATCHES} ]] && epatch "${PATCHES[@]}" epatch_user + if [[ ! ${want_autoreconf} ]]; then + if [[ $(find . -newer "${T}"/.autotools-utils.timestamp \ + -a '(' -name 'Makefile.am' \ + -o -name 'configure.ac' \ + -o -name 'configure.in' ')' \ + -print -quit) ]]; then + einfo 'Will autoreconfigure due to patches applied.' + want_autoreconf=yep + fi + fi [[ ${want_autoreconf} ]] && autotools-utils_autoreconf elibtoolize --patch-only |