comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Have one GPR file build another with external variables
Date: Sat, 30 May 2020 22:33:26 +0100
Date: 2020-05-30T22:33:26+01:00	[thread overview]
Message-ID: <lyd06laz15.fsf@pushface.org> (raw)
In-Reply-To: 906b9ee8-19be-4fd0-8ba7-f7af5823bd56@googlegroups.com

If you're only concerned wih runtimes, you could maybe look at
_installing_ the runtime in different locations depending on the
release/debug mode?

For Cortex GNAT RTS I use this style in build_runtime.gpr, to install
either with the compiler (not that I ever do!) or in
~/cortex-gnat-rts/local/stm32f4 (for example). All the source files in
the runtime source end up in the one adainclude/ directory.

   package Install is
      case Common.Local is
         when "no" =>
            for Prefix use "arm-eabi/lib/gnat/";
         when "yes" =>
            for Prefix use project'Project_Dir & "../local/";
      end case;
      for Prefix use Install'Prefix & "stm32f4";
      for Sources_Subdir use "adainclude";
      for Ali_Subdir use "adalib";
      for Lib_Subdir use "adalib";
      for Required_Artifacts (".") use ("runtime.xml");
      for Required_Artifacts ("adalib") use ("adalib/stm32f407-flash.ld");
      for Install_Project use "false";
   end Install;

Common.Local is set by the scenario variable INSTALL_LOCALLY, but you
could equally use your BUILD variable, so that the RTS would end up in
/some/path/debug or /some/path/release, and your project would pick up
its runtime from whichever. Wouldn't even have to use the same build
variable in project and RTS, so long as the projject knows where to
look.

  parent reply	other threads:[~2020-05-30 21:33 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
2020-05-30 18:48   ` Jere
2020-05-30 19:29     ` Dmitry A. Kazakov
2020-05-30 21:33     ` Simon Wright [this message]
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