From: Simon Wright <simon.j.wright@mac.com>
Subject: Re: Compiling Ada from another directory
Date: Thu, 13 Sep 2007 23:22:34 +0100
Date: 2007-09-13T23:22:34+01:00 [thread overview]
Message-ID: <m2642enr2t.fsf@mac.com> (raw)
In-Reply-To: 1189692969.193051.231830@19g2000hsx.googlegroups.com
rotinom <rotinom@gmail.com> 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
> <project file> 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;
prev parent reply other threads:[~2007-09-13 22:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-12 21:59 Compiling Ada from another directory rotinom
2007-09-12 23:01 ` Georg Bauhaus
2007-09-12 23:17 ` rotinom
2007-09-13 0:01 ` Jeffrey R. Carter
2007-09-13 0:02 ` anon
2007-09-13 14:16 ` rotinom
2007-09-13 15:01 ` Markus E L
2007-09-17 19:08 ` rotinom
2007-09-18 21:21 ` Simon Wright
2007-09-13 22:22 ` Simon Wright [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox