diff options
author | 2012-01-14 14:59:18 +0000 | |
---|---|---|
committer | 2012-01-14 14:59:18 +0000 | |
commit | e6eafb3a01d2e2d70bf603dd8b032e2e84d622a2 (patch) | |
tree | 553c261fb1058a38d06c20f418dea96fd6603b7a /eclass | |
parent | Disallow eautomake from calling eautoreconf unnecessarily. (diff) | |
download | historical-e6eafb3a01d2e2d70bf603dd8b032e2e84d622a2.tar.gz historical-e6eafb3a01d2e2d70bf603dd8b032e2e84d622a2.tar.bz2 historical-e6eafb3a01d2e2d70bf603dd8b032e2e84d622a2.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 |