comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Detecting the OS type before clearing screen
Date: Wed, 26 Mar 2003 12:43:56 -0600
Date: 2003-03-26T12:43:56-06:00	[thread overview]
Message-ID: <v83t67kg6ad44@corp.supernews.com> (raw)
In-Reply-To: mailman.20.1048625222.20696.comp.lang.ada@ada.eu.org

sk wrote in message ...
>I like, and use, package renaming to establish different
>implementations, but I do not think that the actual build
>issue has been addressed.
>
>At some point in the build, a decision has to be made
>as to which implementation is required. Some form of
>preprocessing is required.
>
>Manually edit the renames every time ? No thanks.


We just keep a copy of each version of the files in different
directories, and point the make file (or whatever) at the correct one.

Generally, when this sort of thing is required, you're building the two
versions with different toolchains: a different version of the compiler,
runtime, linker, make tool, etc. Sometimes even with tools from
different vendors (with Claw, for instance, we regularly test with four
different compilers). Using a different make file and maintaining
multiple copies of a handful of source files is the least of the
problems.

The original questioner certainly was going to have to face that: you
need different versions of Gnat to make Linux and Windows files.
Preprocessing doesn't help here.

What preprocessing is good for is separating debugging/testing
infrastructure from the rest of the program. That's especially important
if its expensive (in time or space); usually it's best to keep that
stuff around for the inevitable debugging that happens when users find
bugs - sometimes you can reuse previous debugging code to find new
problems. But it's better to deliver code without that; otherwise it is
tied to a particular compiler, and that is bad.

          Randy.





  reply	other threads:[~2003-03-26 18:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-24 23:55 Detecting the OS type before clearing screen Redy RAMAMONJISOA
2003-03-25  0:58 ` sk
2003-03-25 10:24   ` Samuel Tardieu
2003-03-25 11:19     ` sk
2003-03-25 12:47       ` Lutz Donnerhacke
2003-03-25 14:26         ` SIMON Claude
2003-03-25 14:33           ` Lutz Donnerhacke
2003-03-25 21:48             ` Wojtek Narczynski
2003-03-25 12:25   ` Wojtek Narczynski
2003-03-25 17:27 ` Warren W. Gay VE3WWG
2003-03-25 20:54 ` sk
2003-03-26 18:43   ` Randy Brukardt [this message]
2003-03-26 20:36   ` Simon Wright
replies disabled

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