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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,474f983404143522 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Compiling Ada from another directory Date: Thu, 13 Sep 2007 23:22:34 +0100 Organization: Pushface Message-ID: References: <1189634389.893905.5800@50g2000hsm.googlegroups.com> <1189692969.193051.231830@19g2000hsx.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1189722155 22183 62.49.19.209 (13 Sep 2007 22:22:35 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 13 Sep 2007 22:22:35 +0000 (UTC) Cancel-Lock: sha1:vCnn7faqsqWo+AJSRBHSl0Ix4p8= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Xref: g2news2.google.com comp.lang.ada:1944 Date: 2007-09-13T23:22:34+01:00 List-Id: rotinom writes: > On Sep 12, 7:02 pm, a...@anon.org (anon) wrote: >> # >> # The "bind" and "link" functions do not require command line options >> # >> gcc -c -o _build/Bottles.o src/Bottles.adb >> gnatbind _build/Bottles.ali >> gnatlink _build/Bottles.ali >> > > I played with the project files yesterday, and they do what I want, > however I would then have to maintain them, and they > > After playing around with it, it appears that this is the *best* > solution. The downside however, is that gnatbind creates the b~* > "temporary" files in the current directory. gnatlink is kind enough > to remove them, however it still sort of stinks. I'd need to go back > and check, but I seem to recall that if I "slowed" gnatmake -P > down to build one step at a time, it was able to place > the b~* files in the "Object" directory. I really think you should reconsider. If you don't use GPRs you're going to have to use Makefile equivalents which will be hugely more complicated to get right. gnatmake always puts b~ files in the object directory. Just as a 'simple' self-contained example, project EWS is for Main use ("ews-server-test", "ews-make_htdocs"); for Exec_Dir use "."; for Source_Dirs use ( ".", external ("HOME") & "/bc", external ("HOME") & "/xmlada/**" ); for Object_Dir use ".build"; -- GLIDE (GPS?) configuration. package IDE is for Compiler_Command ("ada") use "gnatmake"; for Gnatlist use "gnatls"; end IDE; -- GNATMAKE configuration options. package Builder is for Default_Switches ("ada") use ( "-g", "-j2", "-m" ); end Builder; -- GCC configuration options. package Compiler is for Default_Switches ("ada") use ( "-gnatqQafoy", "-gnatwaL", "-O2" ); end Compiler; -- GNATBIND configuration options. package Binder is for Default_Switches ("ada") use ("-E"); end Binder; -- GNATLINK configuration options. package Linker is end Linker; end EWS;