comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Have one GPR file build another with external variables
Date: Sat, 30 May 2020 19:17:10 +0200
Date: 2020-05-30T19:17:10+02:00	[thread overview]
Message-ID: <rau4ej$rj7$1@gioia.aioe.org> (raw)
In-Reply-To: ae7f4136-02f9-43dd-a809-c42927589ffb@googlegroups.com

On 30/05/2020 18:59, Jere wrote:
> Say I have a custom runtime whose project file (GPR) takes in an
> external variable to compile in either debug or release
> (-xBUILD=release vs -xBUILD=debug for example).  If I have another
> project that uses this runtime with the same external variable, is
> there a way for me to tell the project file for this 2nd project to
> also rebuild the runtime GPR and use the same external variable value?
> I'm looking for a solution within the GPR file if possible.  I know
> I can always just do a make file, but wanted to see if I have a more
> cross platform alternative.

I don't quite understand your question, because as a rule, you design 
the project files so that when you change a scenario variable that would 
also change the object and library directories. Thus there would be no 
need to rebuild anything unless you change to code. Something like:

    Object_Dir_Path := "obj/" & OS "/" & arch & "/" & BUILD;
    for Object_Dir use Object_Dir_Path;

in the root GPR file. The project with-ing it can take Object_Dir_Path 
for their Object_Dir:

    Object_Dir_Path := Parent.Object_Dir_Path;

This will make each project having its own set of object files along all 
dependencies. If you want rather share object files across all projects 
you can make the path absolute.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2020-05-30 17:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-30 16:59 Have one GPR file build another with external variables Jere
2020-05-30 17:17 ` Dmitry A. Kazakov [this message]
2020-05-30 18:48   ` Jere
2020-05-30 19:29     ` Dmitry A. Kazakov
2020-05-30 21:33     ` Simon Wright
2020-05-31 18:42       ` Jere
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox