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: 103376,6426898aedaa5880 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!fdn.fr!freenix!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Message-ID: <46FD45BA.5030205@obry.net> Date: Fri, 28 Sep 2007 20:19:38 +0200 From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 Newsgroups: comp.lang.ada To: Georg Bauhaus Subject: Re: Pragma for conditional compilation? (Ada 2005 vs. 95) References: <1190879769.361848.188220@22g2000hsm.googlegroups.com> <1190929570.915553.284000@19g2000hsx.googlegroups.com> <4p1jdf.ssa.ln@hunter.axlog.fr> <1190993095.488093.244130@r29g2000hsg.googlegroups.com> <1v8jdf.rc4.ln@hunter.axlog.fr> <1191002053.9585.66.camel@kartoffel> In-Reply-To: <1191002053.9585.66.camel@kartoffel> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit NNTP-Posting-Date: 28 Sep 2007 20:19:41 CEST NNTP-Posting-Host: 82.120.149.112 X-Trace: 1191003581 news.orange.fr 27391 82.120.149.112:2214 X-Complaints-To: abuse@orange.fr Xref: g2news2.google.com comp.lang.ada:2195 Date: 2007-09-28T20:19:41+02:00 List-Id: Note that some of the configuration management can be done directly with GNAT Project File. In this case: type OS_Type is ("UNIX", "Windows_NT"); OS : OS_Type := external ("OS", "UNIX"); case OS is when "Windows_NT" => for Implementation ("OS_Services") use "os_services__win32.adb"; when "UNIX" => for Implementation ("OS_Services") use "os_services__linux.adb"; end case; Note the double underscore to be sure that those files are not found automatically by the project file when storing the OS specific units with all the other sources. Alternatively it is possible to do: case OS is when "Windows_NT" => for Source_Dirs use Project'Source_Dirs & ("win32"); when "UNIX" => for Source_Dirs use Project'Source_Dirs & ("linux"); end case; And place the bodies in the proper directories. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595