Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 392073 - autotools-utils.eclass: support calling eautoreconf implicitly
Summary: autotools-utils.eclass: support calling eautoreconf implicitly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Maciej Mrozowski
URL:
Whiteboard:
Keywords:
: 395061 (view as bug list)
Depends on: 395649
Blocks:
  Show dependency tree
 
Reported: 2011-11-27 09:25 UTC by Michał Górny
Modified: 2012-01-05 22:45 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-11-27 09:25:21 UTC
Now that elibtoolize verbosely complains about double use of elibtoolize, we should seriously consider supporting calling eautoreconf in our _src_prepare().

What I'd see is:

1) AUTOTOOLS_EAUTORECONF=1 to enable inheriting autotools and calling eautoreconf,
2) otherwise, we could just inherit autotools but without adding dependencies,
3) we may support calling additional tools like gtkdocize, intltoolize and so on,
4) we may support calling partial reconf _somehow_,
5) we may support user-patch triggered autoreconf -- but then user would be responsible for having correct automake/autoconf around.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-11-27 15:49:48 UTC
One serious problem here is dependencies.

If we inherit autotools all the time, we may add unnecessary dep on autoconf+automake. If we inherit it with AUTOTOOLS_AUTO_DEPEND=no, the rare case when user does 'inherit autotools-utils autotools' may fail to generate correct deps.

Supporting additional tools would require grepping through configure.{ac,in}. This means that the tools will be known at build time, and we don't know whether to depend on them or not. Ebuild will need to list them explicitly prolly.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2011-11-28 18:42:29 UTC
(In reply to comment #1)
> One serious problem here is dependencies.
> 
> If we inherit autotools all the time, we may add unnecessary dep on
> autoconf+automake. If we inherit it with AUTOTOOLS_AUTO_DEPEND=no, the rare
> case when user does 'inherit autotools-utils autotools' may fail to generate
> correct deps.

You can use in autotools-utils.eclass:
AUTOTOOLS_AUTO_DEPEND="no" inherit autotools

Remember that when A.eclass and B.eclass inherit C.eclass, then 'inherit A B C' in an ebuild will result in sourcing of C.eclass (at least) 3 times.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-11-30 16:25:06 UTC
Another issue I'm hitting right now is that we need a little different autotool calling order. It is possible that we'll have to reimplement eautoreconf or get some changes into autotools.eclass.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-12-17 14:09:13 UTC
*** Bug 395061 has been marked as a duplicate of this bug. ***
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-01-05 22:45:03 UTC
And done. If an ebuild wishes to use this, it has to:
1) export 'AUTOTOOLS_AUTORECONF=anything' before sourcing the eclass to ensure that autoconf&automake deps are added,
2) add any other necessary autoreconfiguration deps (those not handled by autotools.eclass) like gtk-doc,
3) and well, that's it. The autoreconfiguration will occur in autotools-utils_src_prepare().