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,170b136bef612224 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII X-Received: by 10.224.130.195 with SMTP id u3mr22879838qas.1.1367665189120; Sat, 04 May 2013 03:59:49 -0700 (PDT) Path: y6ni7341qax.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!nrc-news.nrc.ca!News.Dal.Ca!news.litech.org!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Specifying a target in a GPRBuild project file? Date: Fri, 26 Apr 2013 20:32:31 +0200 Organization: cbb software GmbH Message-ID: <1hdsodgh31xt9$.1ua65srkn4jrx$.dlg@40tude.net> References: <8f5e2358-05ab-4b0f-82be-b2f2d7438765@googlegroups.com> <51796066.5060906@obry.net> <1jpdzc49i9m1w.12yp9l8whf5lk$.dlg@40tude.net> <517AA6C1.7050508@obry.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: rHWOzyHApalsT5sEUcbvVQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2013-04-26T20:32:31+02:00 List-Id: On Fri, 26 Apr 2013 18:09:37 +0200, Pascal Obry wrote: > Le 25/04/2013 21:02, Dmitry A. Kazakov a �crit : >> For this purpose I am using a scenario variable that controls Compiler, >> Linker etc packages. It also manipulates Source_Dirs because different >> targets have some source files different (I don't want to use >> preprocessor). > > No scenario variable won't help calling the right tool chain. I use a scenario variable Platform to select the compiler, binder, linker, archiver, whatever needed. E.g. case Platform is ... when "x86_vxworks" => ... for Gnatlist use "... 586-wrs-vxworks-gnatls"; ... So far it worked OK. > example if you compile a Win32 version of a project from Linux the > proper winres tool will be called: Winres is irrelevant for multiplatform projects, but I suppose there should be an attribute to set it. > There is no way to achieve that with scenario variables which are useful > to select proper sources and naming scheme. Hmm, why should I care about anything except *.adb and *.ads. The rest is created as appropriate during project build. Platform variable directs object, ali, a, out, exe files into separate directories. > It is also used to pass the > proper libraries. In fact most of the time I'm using: > > $ gprbuild --target=i686-pc-mingw32 -XTARGET=Windows prj.gpr > > That is, I teach gprbuild about the cross environment using the proper > triplet name and the project file circuitry about the variant I'm > building. Most of the time the TARGET project variable is UNIX, Darwin > or Windows. I do this: gnatmake -Pfoo.gpr -XPlaform=x86_vxworks Do I correctly understand that "target" requires a configuration project? Because I use none. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de