From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ab5f27c42c253ac5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed1.ip.tiscali.net!tiscali!transit1.news.tiscali.nl!dreader2.news.tiscali.nl!not-for-mail Newsgroups: comp.lang.ada Subject: Re: GNAT and GNU build system References: From: Ludovic Brenta Date: Wed, 04 Aug 2004 21:21:40 +0200 Message-ID: <87hdrik8u3.fsf@insalien.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:xA2GMIhZqkSRPda91vZDuLJ3J0U= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tiscali bv NNTP-Posting-Date: 04 Aug 2004 21:21:37 CEST NNTP-Posting-Host: 83.134.241.76 X-Trace: 1091647297 dreader2.news.tiscali.nl 62400 83.134.241.76:35306 X-Complaints-To: abuse@tiscali.nl Xref: g2news1.google.com comp.lang.ada:2552 Date: 2004-08-04T21:21:37+02:00 List-Id: 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.