Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 50697 - src_compile could be more generic
Summary: src_compile could be more generic
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: High blocker
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 51933
Blocks:
  Show dependency tree
 
Reported: 2004-05-10 19:40 UTC by Mr. Bones. (RETIRED)
Modified: 2004-05-25 02:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.