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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,15d78a51b0d35cec X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder.news-service.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed10.multikabel.net!feeder3.cambriumusenet.nl!feed.tweaknews.nl!195.14.215.230.MISMATCH!news.netcologne.de!newsfeed-hp2.netcologne.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: architecture-independent GNAT project files? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <75l5ceF18samiU1@mid.individual.net> Date: Mon, 27 Apr 2009 10:02:13 +0200 Message-ID: NNTP-Posting-Date: 27 Apr 2009 10:02:13 CEST NNTP-Posting-Host: c370ed50.newsspool2.arcor-online.net X-Trace: DXC=BIi`kU6_U3H78PK[oJ2ng@A9EHlD;3YcB4Fo<]lROoRA^YC2XCjHcbI^3QAZeYME[HDNcfSJ;bb[EFCTGGVUmh?DLK[5LiR>kgBH:Vb`K4>i8O X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:5549 Date: 2009-04-27T10:02:13+02:00 List-Id: On Mon, 27 Apr 2009 09:32:29 +0200, Bj�rn Persson wrote: > 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 I am using is to have a platform variable in the project file: type Platform_Type is ("x86_Windows", "x86_VxWorks"); Platform : Platform_Type := external ("Platform", "x86_Windows"); and then somewhere later case Platform is when "x86_Windows" => for Source_Dirs use "os/Windows/i586" & ...; when "x86_VxWorks" => for Source_Dirs use "os/vxworks/i586" & ...; end case; then same for library things etc. > 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 don't know if it has, but if any, how that is supposed to work for cross platform developing? > Does anyone have a better idea? I would like to hear it too, because the solution I am using is a bit obtrusive. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de