comp.lang.ada
 help / color / mirror / Atom feed
From: Chrono <pablittto@gmail.com>
Subject: Re: Conditional Compilation in Ada
Date: Tue, 30 Jun 2009 03:41:34 -0700 (PDT)
Date: 2009-06-30T03:41:34-07:00	[thread overview]
Message-ID: <5977b4ec-d5d4-40a1-a58a-d494eec21d27@18g2000yqa.googlegroups.com> (raw)
In-Reply-To: abbb1d04-ed1b-422b-8c83-85b69c0f1a4b@t21g2000yqi.googlegroups.com

On 29 jun, 17:02, sjw <simon.j.wri...@mac.com> wrote:
> On Jun 29, 7:00 pm, Chrono <pablit...@gmail.com> wrote:
>
> > 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.
>
> Gosh, how many scenario variables do you have? with how many options?
> I bet they don't actually affect that many actual code units,
> especially if structured the way Dmitry suggests.
>
> You could use alternately-named bodies:
>
> project T is
>   type Environment is ("Real", "Simulated");
>   Env : Environment := external ("ENVIRONMENT");
>   package Naming is
>      case Env is
>         when "Real" =>
>            for body ("Target.Get_Position")
>              use "target-get_position_real.adb";
>         when "Simulated" =>
>            for body ("Target.Get_Position")
>              use "target-get_position_simulated.adb";
>      end case;
>   end Naming;
> end T;
>
> --S

So let me explain... they are something like 5k files, each one with
some 5k code lines. Anyway (and furthermore) by my team requirement,
any optimization, even in development/coding level, even in run-time
level, cannot be done with any creation of new files of folders. I can
use gnat prepost as well, but what we already have been doing is a
prep, so the number of steps doing this would be the same, and it does
not worth doing. What I wanted is to change some directives in the
code (which I could make a bash script for doing this easily) which
already are there, but now relate them to scenarios watches, and as I
choose Scenario "Thing" and make compile/build, GPS can identify
automatically...'this part of code do not belong to this scenario
"Thing", so I should not compile/build it with the whole project', and
just ignore it: the idea is as we were hiding the prep phase, but the
text codes do not change actually.



  reply	other threads:[~2009-06-30 10:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-29 11:10 Conditional Compilation in Ada Pablo
2009-06-29 11:42 ` sjw
2009-06-29 12:01   ` Chrono
2009-06-29 12:30     ` Dmitry A. Kazakov
2009-06-29 12:15   ` sjw
2009-06-29 18:00     ` Chrono
2009-06-29 20:02       ` sjw
2009-06-30 10:41         ` Chrono [this message]
2009-06-29 20:13       ` Robert A Duff
2009-06-30 15:39 ` Per Sandberg
2009-06-30 17:03   ` Chrono
2009-06-30 20:09   ` sjw
2009-06-30 20:15   ` sjw
2009-07-01 16:20     ` Per Sandberg
2009-07-01  0:18 ` anon
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox