From: Zircona on 7 Dec 2009 13:27 HI! 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? E.g. I have a project call electrics.gpr: with "..\..\..\acsys_common\dist\script\acsys_common.gpr" project electrics is end electrics; I would like something like with External ("ACSYS_COMMON_SCRIPT") & "/acsys_common.gpr" project electrics is end electrics; Is there a way to do this? Thanks!
From: sjw on 7 Dec 2009 14:58 On Dec 7, 6:27 pm, Zircona <Zircon...(a)yahoo.com> 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? > E.g. > I have a project call electrics.gpr: > with "..\..\..\acsys_common\dist\script\acsys_common.gpr" > project electrics is > end electrics; > > I would like something like > with External ("ACSYS_COMMON_SCRIPT") & "/acsys_common.gpr" > project electrics is > end electrics; The 'normal' way would be to set the environment variable ADA_PROJECT_PATH -- you're on a Windows system, so the paths will be semicolon-separated.
From: Dmitry A. Kazakov on 8 Dec 2009 03:42 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
|
Pages: 1 Prev: Ada and MySQL (mysql_library_init) Next: Shootout News: 64 Bits of Sweet Pancake |