comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic.brenta@insalien.org>
Subject: Re: GNAT and GNU build system
Date: Wed, 04 Aug 2004 21:21:40 +0200
Date: 2004-08-04T21:21:37+02:00	[thread overview]
Message-ID: <87hdrik8u3.fsf@insalien.org> (raw)
In-Reply-To: cer1es$6dp$1@a1-hrz.uni-duisburg.de

I also tend to think that autoconf and automake are poor hacks meant
to circumvent the deficiencies of C; just like make in fact.  However,
I see one situation where it makes sense to use them in Ada, and that
is when you want to build a binding to a C library that has
platform-dependent parts.  This is best illustrated by Florist, which
has a rather convoluted build process:

1) It uses configure to generate a Makefile and a config.h
2) The Makefile compiles a number of C source files, and links them into
   an executable, named c-posix
3) The Makefile executes c-posix, which writes a gnatprep configuration
   file and a C file, c-posix-signals.c
4) The Makefile runs gnatprep, with the configuration file, to generate
   several Ada files
5) The Makefile compiles and links c-posix-signals.c
6) Executes c-posix-signals, which creates posix_signals.ads
7) Compiles all the Ada files
8) Links the compiled files into a library

See http://buildd.debian.org/fetch.php?&pkg=libflorist-3.15p-1&ver=3.15p-3&arch=sparc&stamp=1069154570&file=log&as=raw

But the conclusion I draw from all this is: do your very best to avoid
such a complicated build process if possible!  Unless you are
interfacing to the operating system, there is very little reason to
use the autotools.  GNAT and Florist together should provide you all
the portability you need (and yes, GNAT does use autoconf/automake,
because GCC does).

-- 
Ludovic Brenta.



  reply	other threads:[~2004-08-04 19:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-03 19:36 GNAT and GNU build system Tapio Kelloniemi
2004-08-03 20:12 ` Jerome Hugues
2004-08-04  2:05 ` Lutz Donnerhacke
2004-08-04  7:49   ` Tapio Kelloniemi
2004-08-04 13:33     ` Mark H Johnson
2004-08-04 16:04       ` Georg Bauhaus
2004-08-04 19:21         ` Ludovic Brenta [this message]
2004-08-04 20:29         ` Tapio Kelloniemi
2004-08-05  2:15           ` Georg Bauhaus
2004-08-06 10:26             ` Stephen Leake
2004-08-06 15:36               ` Georg Bauhaus
2004-08-14  6:00                 ` Tapio Kelloniemi
2004-08-14 11:32                   ` Ludovic Brenta
2004-08-14 14:41                   ` Georg Bauhaus
2004-08-04 20:06       ` Tapio Kelloniemi
2004-08-04 20:34         ` Ludovic Brenta
2004-08-04 22:11           ` Stephen Leake
2004-08-05  8:50             ` Tapio Kelloniemi
2004-08-08 14:45               ` Ludovic Brenta
2004-08-10 16:18                 ` Nick Roberts
2004-08-12 13:56   ` Florian Weimer
2004-08-13 15:52     ` Lutz Donnerhacke
2004-08-04 22:06 ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox