[sword-devel] autogen.sh (was: Re: Autotools Bug? )

Jonathan Marsden jmarsden at fastmail.fm
Tue May 12 02:57:14 MST 2009


Matthew Talbert wrote:

> gnome-autogen.sh is the autogen.sh used for GNOME software.

OK.  Unless I am misunderstanding you, that is clearly not the same
command as autogen.sh.  The two are different filenames.  They are
spelled differently... unlike say, ./configure which is very consistent
across many many projects (and so is well worth remembering, and tends
to become "wired in" to ones brain and fingers over time).  Having to
read a README or INSTALL and then remember, for each project, the name
of the script or command that is used to rebuild *this* build system,
does not seem an efficient use of (usually limited!) developer memory.

> I would say that your comments are only based in your experience, not
> in fact.

Perhaps.  Hard facts on this are not all that easy to come by.

But I think you perhaps just made my point above by mentioning a
gnome-autogen.sh.  There is no standard name for such files.  Well,
there may be ... but it's not a standard I have read, or even read
about.  So, speaking of hard facts: do you have a link to such a
standard, official or unofficial?  Does GNOME document its standard for
this somewhere?  gnome-autogen.sh appears to be a part of gnome-common,
but a few Google searches did not find me much about its use as a
standard approach.  If this hypothetical standard does things that
autoreconf does not do, or it has wider application than just
autotools-based projects, then it might well be a good idea!

You mentioned basing this on facts.  If we can't find a standard, let's
try to look for numbers instead.

How many projects other than SWORD are there that have a file named
autogen.sh (not some variation on that, but exactly autogen.sh) in the
top level directory, which rebuilds their build system, doing no more
and no less than the one in SWORD does?  And are there that use plain
Autotools (and therefore, if their configure.ac and Makefile.am files
are correct, either do use or can use) autoreconf, doing no more and no
less that autoreconf does when run on the (patched) SWORD source tree)?

There is a project called buildconf that seems to suggest Autoconf users
can gain some portability benefits by using a script called autogen.sh.
 But that is not (I am fairly sure) the script SWORD is using, because
SWORD's script is tiny and has been customized specifically for SWORD,
and (unless someone can actually explain more about what it does)
SWORD's autogen.sh does not appear to do any of the things that the
buildconf project claims *its* autogen.sh does!  SWORD's little script
does (as far as I can see) pretty much what autoreconf does, only rather
less generically.  The buildconf web page lists exactly 3 projects that
use it (a number, but not a very impressive number).  I'll download
their tarball and take a look.  The resulting buildconf autogen.sh
script is 1491 lines long... clearly very different from the SWORD one
at 23 lines, and from the swfdec one at 3 lines.

I really think that Dmitrij had the right idea about a common way to do
things, when he suggested: ./autogen && ./configure && make && sudo make
install" -- but there is no standard name for the "./autogen" (or even
./autogen.sh ) script, nor, as far as I can see, even a clear definition
of what it does, at least if we compare what the buildconf one says it
does with what the SWORD and swfdec ones do.

Here is what a comment inside the buildconf autogen.sh file says:

# Basically, if everything is set up and installed correctly, the
# script will validate that minimum versions of the GNU Build System
# tools are installed, account for several common configuration
# issues, and then simply run autoreconf for you.

It goes on to indicate what it does when autoreconf fails.  So that
autogen.sh *is* a (large) wrapper around/reimplementation of autoreconf,
meaning that all projects using it are, in some fashion, using autoreconf :)

Likewise the swfdec one just calls autoreconf and then ./configure :)

Looking for "facts":

I'm downloading about a sample of about one thousand source packages now
(all the source packages in the Ubuntu universe repo that start with the
letter s -- well, unless the partition I am dowloading to fills up
first).  By not using g or k as the initial letter (the archive tree
uses initial letter as one level of its hierarchy) I hope to avoid bias
towards Gnome or KDE.

With that sample on hand, I can get a quick estimate of what percentage
of them have a file in them called autogen.sh, and what percentage
contain a file called configure.ac (which would indicate use of
autotools and hence capability of using autoreconf for what the SWORD
autogen.sh does).  I can probably get a number for projects having a
gnome-autogen.sh file too, if you like.  Seeing how many of all these
files call autoreconf could be done, too.

I hope to have a rather "fact-based" number once that is completed.  If
you have a way to check on (and so provide stats for) a wider sample of
software than this, go for it :)  [ So far the stats are 196 (25%)
configure.ac and 80 autogen.sh (10%) out of 780 tarballs - a higher
amount of autogen.sh files that I expected ]

I *really* didn't expect my trying to figure out why a small shell
script in SWORD doesn't use autoreconf (but apparently does the same
work as autoreconf does) would generate this much discussion -- I
thought I might get more of an "OK, let's try that" response, or else a
"we can't use autoreconf for SWORD because it does XYZ" ... so much for
that kind of simplicity :)

Jonathan



More information about the sword-devel mailing list