aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2014-01-21 18:07:00 +0100
committerJustin Lecher <jlec@gentoo.org>2014-01-21 18:07:00 +0100
commitde224473100c442774072427618a9718fa29df12 (patch)
tree72b4267c5dcd364db4cb15409bd5e067fab0acd7 /general-concepts/autotools/text.xml
parentappendices/contributors: Add Markus Meier <maekke@gentoo.org> (diff)
downloaddevmanual-de224473100c442774072427618a9718fa29df12.tar.gz
devmanual-de224473100c442774072427618a9718fa29df12.tar.bz2
devmanual-de224473100c442774072427618a9718fa29df12.zip
Use eauto* functions instead of plain tools in example
Bump to EAPI=5 and reference to autotools.eclass. Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'general-concepts/autotools/text.xml')
-rw-r--r--general-concepts/autotools/text.xml17
1 files changed, 10 insertions, 7 deletions
diff --git a/general-concepts/autotools/text.xml b/general-concepts/autotools/text.xml
index 6fb7bd8..7ae2024 100644
--- a/general-concepts/autotools/text.xml
+++ b/general-concepts/autotools/text.xml
@@ -97,6 +97,8 @@ The <c>autoreconf</c> tool supposedly runs <c>autoconf</c> (and <c>automake</c>,
<c>autoheader</c>, <c>aclocal</c>, <c>autopoint</c> and <c>libtoolize</c>) as necessary.
Sometimes it works. Some packages ship a shell script named <c>autogen.sh</c> which
does the same thing (this is <e>not</e> related to <c>autogen</c>).
+The autotools.eclass contains helper functions for the stand-alone tools with their
+corresponding names e.g. <c>eautoconf</c> and <c>eautomake</c>.
</p>
<warning>
@@ -122,22 +124,23 @@ either <c>Makefile.am</c> or <c>configure.ac</c>:
</p>
<codesample lang="ebuild">
-src_unpack() {
- unpack ${A}
- cd "${S}"
+EAPI="5"
+inherit autotools
+
+src_prepare() {
# Remove problematic LDFLAGS declaration
- sed -i -e '/^LDFLAGS/d' src/Makefile.am
+ sed -i -e '/^LDFLAGS/d' src/Makefile.am || die
# Rerun autotools
einfo "Regenerating autotools files..."
- WANT_AUTOCONF=2.5 autoconf || die "autoconf failed"
- WANT_AUTOMAKE=1.9 automake || die "automake failed"
+ WANT_AUTOCONF=2.5 eautoconf
+ WANT_AUTOMAKE=1.9 eautomake
}
src_compile() {
econf $(use_enable nls)
- emake || die "emake failed"
+ emake
}
</codesample>