Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 50697

Summary: src_compile could be more generic
Product: Portage Development Reporter: Mr. Bones. (RETIRED) <mr_bones_>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: blocker CC: agriffis
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 51933    
Bug Blocks:    

Description Mr. Bones. (RETIRED) gentoo-dev 2004-05-10 19:40:49 UTC
Currently, src_compile looks like this in ebuild.sh:

if [ -x ./configure ]; then
    econf
    emake || die "emake failed"
fi

This is fine for a lot of ebuilds, but there is a good number of ebuilds where
it would be nice if the emake part would fire off if there were a GNUmakefile, makefile, or Makefile (these are the three files that GNU make looks for, in that order).  Basically, moving the emake out of the check for configure.

This would enable packages that are similar to app-text/tree that don't use autoconf, but simply provide a makefile to avoid providing an ebuild-specific src_compile.
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-05-10 19:51:40 UTC
This would be best:

if [ -x ./configure ]; then
    econf || die "econf failed"
fi
if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
    emake || die "emake failed"
fi
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2004-05-10 19:54:28 UTC
Thanks Aron.

That would be ideal portage devs. ^^^^
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2004-05-21 09:57:51 UTC
This breaks with packages that have a Makefile that's only used for `make install` (e.g. sys-apps/man-pages)
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2004-05-24 13:41:42 UTC
sys-apps/man-pages should just supply an empty src_compile function I think.  That
is a pretty unusual case.  The more general case (that is, probably autoconf, followed in frequency by simple makefiles that are used for compiling and installing) should be the one supported by the generic src_compile in my opinion.
Comment 5 Aron Griffis (RETIRED) gentoo-dev 2004-05-24 14:55:27 UTC
FWIW, I agree with Mr_Bones_, man-pages should just supply an "empty" function:

src_compile() {
   true  # nothing to do, override default src_compile
}
Comment 6 Nicholas Jones (RETIRED) gentoo-dev 2004-05-25 02:45:01 UTC
This is in _pre9, and I changed man-pages so that it doesn't explode.