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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!t13g2000yqt.googlegroups.com!not-for-mail From: Chrono Newsgroups: comp.lang.ada Subject: Re: Conditional Compilation in Ada Date: Mon, 29 Jun 2009 11:00:06 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <5618a901-6b05-4a60-8362-7821261da50b@f19g2000yqo.googlegroups.com> <768c8117-d8af-4a04-b27e-2e74b69c1e8b@y17g2000yqn.googlegroups.com> <15ce8441-af38-4498-b3ed-c0517ad87dc6@x3g2000yqa.googlegroups.com> NNTP-Posting-Host: 201.7.145.1 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1246298407 16166 127.0.0.1 (29 Jun 2009 18:00:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 29 Jun 2009 18:00:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: t13g2000yqt.googlegroups.com; posting-host=201.7.145.1; posting-account=n9Sa1woAAACZc_iwSjaEkj9Lnt-XVrSr User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6723 Date: 2009-06-29T11:00:06-07:00 List-Id: On 29 jun, 09:15, sjw wrote: > On Jun 29, 12:42=A0pm, sjw wrote: > > > =A0 =A0type Environment is ("Real", "Simulated"); > > =A0 =A0Env : Environment :=3D external ("ENVIRONMENT"); > > =A0 =A0case Env is > > =A0 =A0 =A0 when "Real" =3D> Env_Path =3D "Real"; > > =A0 =A0 =A0 when "Simulated" =3D> Env_Path =3D "Simulated"; > > =A0 =A0end case; > > =A0 =A0for Source_Dirs use ..... & Env_Path; > > > (I haven't tested this particular example ...) > > Ahem. A version which works is > > project T is > =A0 =A0type Environment is ("Real", "Simulated"); > =A0 =A0Env : Environment :=3D external ("ENVIRONMENT"); > =A0 =A0Base_Path :=3D ("."); > =A0 =A0Real_Path :=3D ("Real"); > =A0 =A0Sim_Path :=3D ("Simulated"); > =A0 =A0case Env is > =A0 =A0 =A0 when "Real" =3D> for Source_Dirs use Base_Path & Real_Path; > =A0 =A0 =A0 when "Simulated" =3D> for Source_Dirs use Base_Path & Sim_Pat= h; > =A0 =A0end case; > end T; > > When GPS sees this, the Scenario view (Tools > Views > Scenario offers > ENVIRONMENT with the choices Real, Simulated. Well, creating folders for each scenario is definitely not a better solution than using a prep script, mainly in a project with high complexity in its architecture. Even creating new packages for doing this (or new variables which are going to be compiled with main code), due to requirements restrictions. But thanks even though for all responses.