Gentoo Development Guide
src_compile
| Function | src_compile |
| Purpose | Configure and build the package. |
| Sandbox | Enabled |
| Privilege | user |
| Called for | ebuild |
Default src_compile
src_compile() {
if [ -x ./configure ]; then
econf
fi
if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
emake || die "emake failed"
fi
}
Sample src_compile
src_compile() {
use sparc && filter-flags -fomit-frame-pointer
append-ldflags -Wl,-z,now
econf \
$(use_enable ssl ) \
$(use_enable perl perlinterp ) \
|| die "Configure failed!"
emake || die "Make failed!"
}
src_compile Processes
The following subsections cover different topics which often occur when writing
src_compile functions.