From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: gnat project "include file"
Date: Tue, 8 Dec 2009 09:42:20 +0100
Date: 2009-12-08T09:42:20+01:00 [thread overview]
Message-ID: <1f87hchf2wgii$.bheeb6c38hez$.dlg@40tude.net> (raw)
In-Reply-To: 4e8ce175-17da-414d-ba32-57406d23831a@x25g2000prf.googlegroups.com
On Mon, 7 Dec 2009 10:27:54 -0800 (PST), Zircona wrote:
> I got a projet which are multiple project.. Some of them have
> dependency to the other.
> Is there a way to change the with command to used an environment
> variable?
You do not need to change it. The project itself can depend on the
variable(s), i.e. instead of different versions of the same project X, you
make X dependent on the scenario variables.
E.g.:
project X is
type Development_Type is ("Debug", "Release");
Development : Development_Type := external ("Development", "Debug");
type Platform_Type is ("x86_Windows", "x86_VxWorks");
Platform : Platform_Type := external ("Platform", "x86_Windows");
case Platform is
when "x86_Windows" =>
for Source_Dirs use Dirs & "os/Windows/i586";
case Development is
when "Debug" =>
for Object_Dir use "lib/x86/Windows/Debug";
when "Release" =>
for Object_Dir use "lib/x86/Windows/Release";
end case;
when "x86_VxWorks" =>
...
etc.
The project Y may simply
with "x.gpr";
project Y is
...
Y can share the variables Development and Platform. (Copy type and variable
declaration into Y, when necessary)
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
prev parent reply other threads:[~2009-12-08 8:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 18:27 gnat project "include file" Zircona
2009-12-07 19:58 ` sjw
2009-12-08 8:42 ` Dmitry A. Kazakov [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