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,80155a886d197693 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!x3g2000yqa.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: Conditional Compilation in Ada Date: Mon, 29 Jun 2009 05:15:19 -0700 (PDT) Organization: http://groups.google.com Message-ID: <15ce8441-af38-4498-b3ed-c0517ad87dc6@x3g2000yqa.googlegroups.com> References: <5618a901-6b05-4a60-8362-7821261da50b@f19g2000yqo.googlegroups.com> <768c8117-d8af-4a04-b27e-2e74b69c1e8b@y17g2000yqn.googlegroups.com> NNTP-Posting-Host: 82.20.239.89 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1246277719 11010 127.0.0.1 (29 Jun 2009 12:15:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 29 Jun 2009 12:15:19 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x3g2000yqa.googlegroups.com; posting-host=82.20.239.89; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.18 (KHTML, like Gecko) Version/4.0.1 Safari/530.18,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6711 Date: 2009-06-29T05:15:19-07:00 List-Id: 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 type Environment is ("Real", "Simulated"); Env : Environment :=3D external ("ENVIRONMENT"); Base_Path :=3D ("."); Real_Path :=3D ("Real"); Sim_Path :=3D ("Simulated"); case Env is when "Real" =3D> for Source_Dirs use Base_Path & Real_Path; when "Simulated" =3D> for Source_Dirs use Base_Path & Sim_Path; end case; end T; When GPS sees this, the Scenario view (Tools > Views > Scenario offers ENVIRONMENT with the choices Real, Simulated.