comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Tricks Of The Trade: How To Compile Large Program On Two Very Different Compilers
Date: Thu, 05 Nov 2009 16:31:36 +0100
Date: 2009-11-05T16:31:37+01:00	[thread overview]
Message-ID: <4af2efd8$0$6564$9b4e6d93@newsspool4.arcor-online.net> (raw)
In-Reply-To: <b813c43f-5973-43ee-aa79-9fb90d6d077c@r24g2000prf.googlegroups.com>

ChristopherL schrieb:
> On Nov 5, 2:02 am, Niklas Holsti <niklas.hol...@tidorum.invalid>
> wrote:
>> - Are they simply different versions of the same Ada packages, one
>> version tailored for system A, the other for system B, but implementing
>> the same functionality? Tailoring could be necessary for compiler
>> differences, O/S differences, or computer differences.
> 
> They are different versions of the same Ada packages, one version
> tailored
> for system A, the other for system B, but implementing the same
> functionality.
> 
> Query: Is there some way I can combine the two sets of 30 files into
> one set of
> 30 files.
> 
> Or, is it best to just forget trying to combine these two sets of 30
> files in some way. And, just manually compile the appropriate set of
> 30 files on what ever system I am working on. Does anyone have any
> ideas.

I'm not sure I understand what you mean by combine.
Manual work seems unneccessary, and maybe the whole
combination approach is not really the best option:
Would it be OK to perform the distinction by system
at run-time, e.g. during program setup by setting
some pointers or by running main loops in instances
of suitable generic instances?

If not, it was suggested to use directories, and instruct
the respective compilers to look for the respective
30 files in these directories.  Assuming you
have the typical set of spec files, body files, and
some files containing full subprograms.  A directory
setup might look like this:

/1000+-common/
/1000+-common/30-system-A
/1000+-common/30-system-B

Is this something you have in mind:
Package Foo specifies functions for both systems A and B,
but the bodies are different for systems A and B.
I'd put the spec file of package Foo in /1000+-common.
Body files go in the ./30-system-{A,B} subdirectories.
Then I tell the compiler X for system A to look in /1000+-common
and in /1000+-common/30-system-A.
I tell the compiler Y for system B to look in /1000+-common
and in /1000+-common/30-system-B.
The compiler will find specs in the directory of common files,
and bodies either in the subdirectory 30-system-A or 30-system-B,
as specified.
If compiler X should compily for system B, too, I'd say
that in the same way, for another run. And similarly for
compiler Y for system A.



  parent reply	other threads:[~2009-11-05 15:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <81734679-bcfc-4d52-b5c2-104f0d75b592@i12g2000prg.googlegroups.com>
2009-11-04 19:27 ` Tricks Of The Trade: How To Compile Large Program On Two Very Different Compilers Hibou57 (Yannick Duchêne)
     [not found] ` <40fef45f-7203-47f1-8aae-7f0bdd23ea94@u36g2000prn.googlegroups.com>
     [not found]   ` <95a354e8-385b-4175-b5cd-d59598764750@w37g2000prg.googlegroups.com>
     [not found]     ` <7b8ca66e-ca6d-44ea-bad9-35b44bb8425a@12g2000pri.googlegroups.com>
2009-11-04 20:10       ` Jeffrey R. Carter
2009-11-11 20:51         ` sjw
     [not found] ` <687d5205-3e93-4b10-8d5d-e31d20e19e08@2g2000prl.googlegroups.com>
2009-11-05 10:02   ` Niklas Holsti
     [not found]     ` <b813c43f-5973-43ee-aa79-9fb90d6d077c@r24g2000prf.googlegroups.com>
2009-11-05 15:31       ` Georg Bauhaus [this message]
     [not found]         ` <1dac1c79-6cfe-46da-a5cf-7b0dd4b95775@z4g2000prh.googlegroups.com>
     [not found]           ` <4fbfba1f-65ac-43d5-8328-61dcf075a1b1@13g2000prl.googlegroups.com>
2009-11-05 18:21             ` Georg Bauhaus
2009-11-05 19:04       ` Jeffrey R. Carter
     [not found]         ` <74d8ae6e-a5f6-4add-b08f-6760c8d3d182@12g2000pri.googlegroups.com>
2009-11-07  5:59           ` Stephen Leake
2009-11-04 19:32 Hibou57 (Yannick Duchêne)
2009-11-05 10:26 ` Stephen Leake
replies disabled

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