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: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.bbs-scene.org!weretis.net!feeder4.news.weretis.net!newsfeed.datemas.de!uucp.gnuu.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Sat, 18 May 2013 19:10:55 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is it possible invoke $(pkg-config ...) in gnat project file? References: <27c98def-e317-474d-aa7e-2b3f93de92f3@googlegroups.com> In-Reply-To: <27c98def-e317-474d-aa7e-2b3f93de92f3@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <5197b61f$0$6642$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 18 May 2013 19:10:55 CEST NNTP-Posting-Host: cf385694.newsspool2.arcor-online.net X-Trace: DXC=aPnE180ke_h_0Po7BmQ3]lA9EHlD; 3Ycb4Fo<]lROoRa8kFejVho 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