summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-08-10 05:17:43 +0000
committerZac Medico <zmedico@gentoo.org>2008-08-10 05:17:43 +0000
commit55ca969427eb13eca39addc636aa64cede317067 (patch)
tree13d8f08ac2048d25e913c444c41c3d9ddc3b8303 /doc
parentDocument the differences between EAPIs 0 and 1. (diff)
downloadportage-multirepo-55ca969427eb13eca39addc636aa64cede317067.tar.gz
portage-multirepo-55ca969427eb13eca39addc636aa64cede317067.tar.bz2
portage-multirepo-55ca969427eb13eca39addc636aa64cede317067.zip
Add sample code for the new src_configure and src_compile phase functions.
svn path=/main/trunk/; revision=11385
Diffstat (limited to 'doc')
-rw-r--r--doc/package/ebuild/eapi/2.docbook13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/package/ebuild/eapi/2.docbook b/doc/package/ebuild/eapi/2.docbook
index 1bd1c986..8e152f21 100644
--- a/doc/package/ebuild/eapi/2.docbook
+++ b/doc/package/ebuild/eapi/2.docbook
@@ -109,6 +109,19 @@
src_configure function is called in between the src_unpack and
src_compile functions.
</para>
+ <programlisting>
+src_configure() {
+ if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then
+ econf
+ fi
+}
+
+src_compile() {
+ if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ] ; then
+ emake || die "emake failed"
+ fi
+}
+ </programlisting>
<table><title>Execution Order of Phase Functions</title>
<tgroup cols='1' align='left' >
<colspec colname='name'/>