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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d561cda996d4dac4 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news1.google.com!postnews.google.com!j4g2000yqe.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: Adding a compiler to GPS or a GPR project Date: Fri, 1 Jan 2010 06:58:16 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <1l5v84b72sizk$.j72gn8d711oq$.dlg@40tude.net> NNTP-Posting-Host: 77.198.58.45 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1262357897 18781 127.0.0.1 (1 Jan 2010 14:58:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 1 Jan 2010 14:58:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j4g2000yqe.googlegroups.com; posting-host=77.198.58.45; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8571 Date: 2010-01-01T06:58:16-08:00 List-Id: I've noticed a seaming trick with language files and compiler definitions files. With language files : when a kind of file does not make distinction between specification and implementation, the documentation suggest to use the element Extension instead of the two element Spec_Suffix and Body_Suffix. However, as I've noticed with AdaControl file, which was relying on the file zadactl.xml for its language definition, enabling the AdaControl language support in a project, was not showing up AdaControl files (*.aru) in the project view. This can be solved using either the Spec_Suffix or the Body_Suffix, instead of Extension, and unlike what the documentation suggest. Exemple of modification to be applied in zadactl.xml : AdaControl .aru Next, in the compiler configuration files now, the documentation point that if a language is not associated to a compiler (like AdaControl source files are), then the element in should contains an empty string. Unfortunately, GPRConfig which is invoked prior to GPRBuild when building from GPS, does not seems to handle this properly, and simply do as if a compiler was to be found for AdaControl file and none was found, so finally, GPRBuild gives warning messages complaining no compiler could be found for AdaControl and all AdaControl source files were ignored. This is an erroneous warning message. There is luckily a work around : provid in , the name of an application which GPRConfig will be able to find, then, use an empty string in the =93package Compiler=94 chunk for Driver. Exemple : AdaCtl DummyVersion adactl .... .... package Compiler is for Driver ("AdaControl") use ""; end Compiler; I've applied this trick to have access to AdaControl files from GPS without getting any erroneous warnings at build time. The complete source of the adacontrol.xml file I use for the AdaControl dummy compiler definition I use, with a long comment at the end, is given below. AdaCtl DummyVersion adactl AdaControl i386-pc-mingw32 i686-pc-mingw32 pentium-mingw32msv i386-pc-linux i686-pc-linux pentium-linux package Naming is for Body_Suffix ("AdaControl") use ".aru"; end Naming; package Compiler is for Driver ("AdaControl") use ""; -- Use an empty string end Compiler; -- here, instead of in the Executable tag