comp.lang.ada
 help / color / mirror / Atom feed
From: Per Sandberg <per.sandberg@bredband.net>
Subject: Re: Conditional Compilation in Ada
Date: Wed, 01 Jul 2009 18:20:06 +0200
Date: 2009-07-01T18:20:06+02:00	[thread overview]
Message-ID: <4A4B8CB6.1080202@bredband.net> (raw)
In-Reply-To: <ccd1ef04-8497-4bbc-a3b4-bf1ed3a6360a@37g2000yqp.googlegroups.com>

Well use the:
" -s       Recompile if compiler switches have changed"
switch and the recompilation will occur.
----------------------------------
   "gnatmake -s -pfools fools-main"

or in the project file

package builder is
for Default_Switches("Ada") use ("-s");
end builder;
-------------------------------------
/Per


sjw wrote:
> On Jun 30, 4:39 pm, Per Sandberg <per.sandb...@bredband.net> wrote:
>> After all discussions her are a solution for conditinal compilation
>> using GNAT:
> 
>> /Ugly but it works
> 
> One thing I noticed is that GNAT doesn't see a change to the
> environment variables as triggering a recompilation (well, there may
> be more flags):
> 
> $ gnatmake -Pfools fools-main
> gcc -c -gnateDDUMB="Fool" -I- -gnatA /Users/simon/tmp/target/fools-
> main.adb
> gcc -c -gnateDDUMB="Fool" -I- -gnatA /Users/simon/tmp/target/fools.ads
> gnatbind -I- -x /Users/simon/tmp/target/fools-main.ali
> gnatlink /Users/simon/tmp/target/fools-main.ali -o /Users/simon/tmp/
> target/fools-main
> $
> $ gnatmake -Pfools -XDUMB="\"Idiot\"" fools-main
> gnatmake: "/Users/simon/tmp/target/fools-main" up to date.



  reply	other threads:[~2009-07-01 16:20 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
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 [this message]
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