[Gllug] [OT] software packaging

James Hollingshead james at hollo.org
Wed May 29 00:08:03 UTC 2002


On Tue, May 28, 2002 at 11:12:42PM +0100, Stig Brautaset wrote:
> Should I be using autoproject/autoconf/automake for my small-ish
> programs?  I had a brief look at autoproject and think maybe it is a bit
> overkill... 
> 
> It would be nice to know what the 'proper' programmers here think.  The
> kind of programs I'm talking about I'm sure some of you can hack up
> during the advertisement-breaks of a matin? on a lazy Sunday afternoon,
> but for me it is a 'major project' of about 1500 lines of C ;D

Well I'm not sure I'd claim to be a 'proper' programmer, and it is my
first post on this list so hello everyone, but I thought I'd reply to
this one.

I've not used autoproject, but am a definite fan of autoconf/automake
even for smallish projects. From the user's point of view, I find that
3rd party programs which use automake cross compile properly much more
frequently, and if you need to package them it is much simpler to
change them to install elsewhere.

>From the developer's point of view I do find it disturbing how much
stuff gets generated -- your 1500 C project will end up surrounded by
2500 or so lines of build system, even before you start on machine
dependencies and compile time options. On the other hand the amount of
that build system you actually need to write is about 10 lines to
start with. I normally start with just:

configure.in:
  AC_INIT(hello.c)
  AM_INIT_AUTOMAKE(hello, 0.0.1)
  AM_CONFIG_HEADER(config.h)

  AC_PROG_INSTALL
  AC_PROG_CC

  AC_OUTPUT(Makefile)

and Makefile.am:
  bin_PROGRAMS = hello
  hello_SOURCES = hello.c hello.h

and a bootstrap command of:
  aclocal && autoheader && automake --foreign --add-missing && autoconf

Overall I reckon simpler than doing it any other way, and if the
project expands it is easy to add to. My main wish is for a less
verbose syntax for adding in compile time options for ./configure.

James


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list