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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9023f3818c3c6a68 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-26 12:38:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Detecting the OS type before clearing screen Date: 26 Mar 2003 20:36:41 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1048711092 15535 62.49.19.209 (26 Mar 2003 20:38:12 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 26 Mar 2003 20:38:12 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:35742 Date: 2003-03-26T20:36:41+00:00 List-Id: sk writes: > Using make files ? Then either you somehow get "make" to > detect which version you require or edit the makefile > to set a variable. The new GNAT Project feature lets you do this based on envirnment variables or gnatmake switches. project Foo is type Target_Type is ("host", "target"); Target : Target_Type := external ("TARGET", "host"); case Target is when "host" => for Source_Dirs use (".", "./host"); when "target" => for Source_Dirs use (".", "./target"); end case; end Foo; means you put the spec inthe same directory as the project file, the target (eg VxWorks) body in ./target and the host (eg Linux) body in ./host. The default is the host version; select the other by either TARGET=target gnatmake -PFoo or gnatmake -PFoo -XTARGET=target See http://gcc.gnu.org/onlinedocs/gnat_ug_unx/GNAT-Project-Manager.html#GNAT%20Project%20Manager -S