Ciaran McCreesh’s Blag
Now with 17% more caffeine
EAPI 2: src_configure and src_compile
This is post five in a series describing EAPI 2.
EAPI 2 splits src_compile into src_configure and src_compile. Like src_prepare, it’s mostly a convenience thing to reduce copying default implementations, although in this case it also makes it easier to hook in code in between configure and make being run.
The default src_configure implementation behaves like this:
src_configure() {
if [[ -x ${ECONF_SOURCE:-.}/configure ]]; then
econf
fi
}
This is the first half of EAPI 1′s src_compile, not the non-ECONF_SOURCE-aware EAPI 0 version.
The default src_compile implementation is reduced accordingly:
src_compile() {
if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]]; then
emake || die "emake failed"
fi
}
The split configure / compile setup was first used in exheres-0, which uses more elaborate default implementations. Like src_prepare, it was considered but rejected for kdebuild-1 because of eclass difficulties.
Pingback: What’s in EAPI 2? « Ciaran McCreesh’s Blag