Add sample code for the new src_configure and src_compile phase functions.
authorZac Medico <zmedico@gentoo.org>
Sun, 10 Aug 2008 05:17:43 +0000 (05:17 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 10 Aug 2008 05:17:43 +0000 (05:17 -0000)
svn path=/main/trunk/; revision=11385

doc/package/ebuild/eapi/2.docbook

index 1bd1c986cb705e0a1f267be6c6bf25290b5e5f32..8e152f21d79de260833b9677af3312603b92b752 100644 (file)
                        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'/>