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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,15d78a51b0d35cec,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn?= Persson Newsgroups: comp.lang.ada Subject: architecture-independent GNAT project files? Date: Mon, 27 Apr 2009 09:32:29 +0200 Message-ID: <75l5ceF18samiU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit X-Trace: individual.net WPFBELQIUFi6DrywvdUfIwRxkc1D16NlYtJkxNaPLF88D++YaV Cancel-Lock: sha1:trqGcV4D3jRMTcF1kky15czhVPo= User-Agent: KNode/0.10.9 Xref: g2news2.google.com comp.lang.ada:5548 Date: 2009-04-27T09:32:29+02:00 List-Id: When I write GNAT project files for shared libraries I find that I have to hardcode the paths to some architecture-specific directories. 32-bit libraries are in /usr/lib/ while 64-bit libraries are in /usr/lib64/, and I would like to have a single project file that works for both cases. The way to find out the architecture of a Unix-like system appears to be to invoke uname, but GNAT project files don't seem to have a shell-out feature. As far as I can see in the manual the only ways they can get input is by environment variables and command line parameters. I don't suppose Gnatmake provides some variable to project files that shows what the architecture is? I could define an environment variable in the systemwide profile, but that's not really a good solution. That variable would contain the host architecture but it's the target architecture I really need to test for. I also don't like polluting the environment. Does anyone have a better idea? -- Bj�rn Persson PGP key A88682FD