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 10:43:19 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Detecting the OS type before clearing screen Date: Wed, 26 Mar 2003 12:43:56 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:35736 Date: 2003-03-26T12:43:56-06:00 List-Id: 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.