comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Is it possible invoke $(pkg-config ...) in gnat project file?
Date: Sat, 18 May 2013 19:10:55 +0200
Date: 2013-05-18T19:10:55+02:00	[thread overview]
Message-ID: <5197b61f$0$6642$9b4e6d93@newsspool2.arcor-online.net> (raw)
In-Reply-To: <27c98def-e317-474d-aa7e-2b3f93de92f3@googlegroups.com>

On 18.05.13 12:30, kylix wrote:
> I tried add link switch "$(pkg-config --libs cairo) in Linker section, it seems not work, any idea?
>
> project P is
>       for Main use ("program");
>       package Linker is
>              for Default_Switches("Ada") use ("$(pkg-config --libs cairo)");
>      end Linker;
> end P;
>

$(pkg-config ...) is shell syntax for command substitution, i.e.
starting a new process. I think that GNAT project relates programs
will only pass text, not interpret it, or have the shell interpret
it.

You could have an external variable referenced in the project file and
initialize it "outside", thus

   package Linker is
     for Default_Switches("Ada") use ("-gnatwa") & external("MYGTKL");
   end Linker;

$ MYGTKL=$(pkg-config --libs cairo) gnatmake -PP



  reply	other threads:[~2013-05-18 17:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-18 10:30 Is it possible invoke $(pkg-config ...) in gnat project file? kylix
2013-05-18 17:10 ` Georg Bauhaus [this message]
2013-05-21 18:47   ` Per Sandberg
replies disabled

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