Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 182253 - deprecated autotools snippets on devmanual
Summary: deprecated autotools snippets on devmanual
Status: RESOLVED FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Devmanual (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Devmanual Team
URL: http://devmanual.gentoo.org/general-c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-16 19:41 UTC by Santiago M. Mola (RETIRED)
Modified: 2012-10-30 11:01 UTC (History)
1 user (show)

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


Attachments
clean-example-ebuild.patch (clean-example-ebuild.patch,2.12 KB, patch)
2007-06-16 23:26 UTC, Santiago M. Mola (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Santiago M. Mola (RETIRED) gentoo-dev 2007-06-16 19:41:27 UTC
"The Basics of Autotools" section of devmanual has all its snippets calling to autotools directly, which is supposed to be a practice deprecated in favor of autotools.eclass.

"Further Autotools Reading" subsection could link to Gentoo's autotool-related docs like
http://www.gentoo.org/proj/en/qa/autofailure.xml

Reproducible: Always

Steps to Reproduce:
Comment 1 Santiago M. Mola (RETIRED) gentoo-dev 2007-06-16 19:45:28 UTC
"The einfo message before running autotools is not mandatory. However, these steps can sometimes take a while and may produce no output, so it may make sense to let the user know that something is still happening." statment is no valid anymore with autotools.eclass.
Comment 2 Santiago M. Mola (RETIRED) gentoo-dev 2007-06-16 20:17:22 UTC
More sections are affected:
http://devmanual.gentoo.org/ebuild-writing/using-eclasses/index.html
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2007-06-16 22:53:42 UTC
If you can provide a patch that would speed things up. devmanual is available via http://anoncvs.gentoo.org/
Comment 4 Santiago M. Mola (RETIRED) gentoo-dev 2007-06-16 23:26:52 UTC
Created attachment 122284 [details, diff]
clean-example-ebuild.patch

This fixes the problem with http://devmanual.gentoo.org/ebuild-writing/using-eclasses/index.html

Substituted devtodo with a simplified example ebuild which doesn't use autotools.
Comment 5 Petteri Räty (RETIRED) gentoo-dev 2007-06-23 21:04:16 UTC
(In reply to comment #0)
> "The Basics of Autotools" section of devmanual has all its snippets calling to
> autotools directly, which is supposed to be a practice deprecated in favor of
> autotools.eclass.
> 
> "Further Autotools Reading" subsection could link to Gentoo's autotool-related
> docs like
> http://www.gentoo.org/proj/en/qa/autofailure.xml
> 
(In reply to comment #4)
> Created an attachment (id=122284) [edit]
> clean-example-ebuild.patch
> 

Doesn't seem to fix your original issues but thanks for the work so far.

Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-07-02 19:11:32 UTC
I can spot a couple of problems that should probably be solved with the autotools information on devmanual:

a) autoreconf is not always working for Gentoo as it handles a few more cases that we don't want silently handled, autogen should _not_ be used, often it uses the wrong tools or simply tries to do copies from system files that are outside ebuild scope;
b) the first warning about the generated files should note that this happens when maintainer mode is active; a package without maintainer mode active will not re-build anything, for this reason it is _categorical_ to regenerate in ebuild
c) the snippet uses the deprecated manual execution of tools; WANT_AUTOCONF and WANT_AUTOMAKE should be set before inherit, and autotools eclass should be inherited; no einfo is needed and eautoreconf is most of the times the only thing you need;
d) in the --enable/--disable checks, as well as --with/--without, the third parameter in all the examples could be replaced by nothing, with a comma right after it to skip it empty: $enable_foo and $with_foo for AC_ARG_[WITH|ENABLE](foo) is automatically created if passed.
e) again in the examples the help text should be generated by AS_HELP_STRING([--with-foo], [foo])
f) on "Makefile Variables", it should be noted that AM_CFLAGS is not _appended_ to custom-defined per-target _CFLAGS variables, so if you got something like

CFLAGS = -fno-strict-aliasing

bin_PROGRAMS = foo
foo_SOURCES = foo.c
foo_CFLAGS = -I/usr/include/bar

if you just change CFLAGS to AM_CFLAGS you're breaking the Makefile (and might be breaking badly the application)

g) in "aclocal and m4 files" the examples should be replaced by eautoreconf calls, and instead of -I the AT_M4DIR variable should be set.
h) libtool info is missing, but I was already planning a "how and why of elibtoolize" guide in the next days, so just wait for that.
Comment 7 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-04-25 17:37:55 UTC
Should be updated or complemented with EAPI >=2
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2010-08-10 17:16:10 UTC
commit 6fb095bbfb6f1cf271b56d0a8a586c963f0d17e5
Author: hwoarang <hwoarang@gentoo.org>
Date:   Tue Aug 10 20:14:21 2010 +0300

    Update and commit patch from bug #182253
    
    Thanks to Jeremy Olexa (darkside) for reviewing the patch. The original
    patch from bug #182253 was updated to EAPI2, added eautoreconf call, added
    missing autotools eclass. Fix indentation.

The bug will remain open just because we need to make more QA fixes in this area
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2012-10-30 11:01:01 UTC
We will handle the rest of the problems in due time