From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.6k1R0IQgF+3y+m4EkNohlQ.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Have one GPR file build another with external variables Date: Sat, 30 May 2020 22:33:26 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <906b9ee8-19be-4fd0-8ba7-f7af5823bd56@googlegroups.com> NNTP-Posting-Host: 6k1R0IQgF+3y+m4EkNohlQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) Cancel-Lock: sha1:k8oXVm69PAv3MvwTbWAeMBPo2Tc= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:58895 Date: 2020-05-30T22:33:26+01:00 List-Id: 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.