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 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-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder.news-service.com!cyclone01.ams2.highwinds-media.com!news.highwinds-media.com!npeersf01.ams.highwinds-media.com!newsfe13.ams2.POSTED!40385e62!not-for-mail Message-ID: <4A4B8CB6.1080202@bredband.net> From: Per Sandberg User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Conditional Compilation in Ada References: <5618a901-6b05-4a60-8362-7821261da50b@f19g2000yqo.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@WWWSpace.NET NNTP-Posting-Date: Wed, 01 Jul 2009 17:18:52 UTC Date: Wed, 01 Jul 2009 18:20:06 +0200 Xref: g2news2.google.com comp.lang.ada:6786 Date: 2009-07-01T18:20:06+02:00 List-Id: 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 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.