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 22:34:25 +0200
Date: 2004-08-04T22:34:22+02:00	[thread overview]
Message-ID: <873c32k5gu.fsf@insalien.org> (raw)
In-Reply-To: NkbQc.1099$9p1.607@reader1.news.jippii.net

Tapio Kelloniemi writes:
> I would really prefer typing:
> ./configure --prefix=/usr --enable-goldobj

I understand your concern completely.  My concern, though, is the
sheer complecity of the ./configure script itself, and that of the
Makefile it generates.  Most of that complexity is unnecessary with
Ada programs, and in fact really gets in the way.  With Ada, you would
normally want to take full advantage of GNAT project files.  The only
places where ./configure may be of help are for the installation
target (--prefix), and finding any Ada libraries you depend on.

<plug mode=shameless>

This problem is solved nicely in Debian GNU/Linux.  Each library has a
GNAT project file in a well-known location
(/usr/share/ada/adalib/library.gpr).  Your program just "withs" them
as required.

</plug>

Furthermore, on non-Debian systems, the GNU Ada Environment
Specification[1] says where library files should be installed.  Here
again, you would not need a ./configure at all; just use -aI and -aO
as necessary.

<plug mode="really_shameless">

Since Debian follows the GNAE, your GNAT project file can be portable
without the need for ./configure.

</plug>

[1] http://cert.uni-stuttgart.de/projects/ada/gnae.php

So, you could consider writing a ./configure script by hand, which
would generate a minimal Makefile containing only the value of
--prefix.  Something along the lines of:

PREFIX=/usr

all: my_program

my_program:
        gnatmake -Pmy_program.gpr

install: my_program
        cp my_program $(PREFIX)/bin

If you need package-specific options (e.g. --enable-gold-objects),
then you can extend the ./configure and generate something like:

PREFIX=/usr
GOLD_OBJECTS=false

all: my_program

my_program:
        gnatmake -Pmy_program.gpr -XGOLD_OBJECTS=$(GOLD_OBJECTS)

install: my_program
        cp my_program $(PREFIX)/bin

-- 
Ludovic Brenta.



  reply	other threads:[~2004-08-04 20:34 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
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 [this message]
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