On Sun, 30 Jan 2005, Norman Gray wrote:
> On 2005 Jan 28 , at 18.55, Peter W. Draper wrote:
>
> > but it seems to be working otherwise. When I read your original
> > message I thought that STAR_INITIALISE_FORTRAN would be integrated
> > into ndfInit. Would have saved a few lines and will always still be
> > needed for that job, or do you think the role of
> > STAR_INITIALISE_FORTRAN might go beyond the simple job it does now?
>
> I thought of putting it into ndfInit, but decided against it, following
> a principle of least cunning.
>
> How a particular object or library is eventually linked -- which program
> does the linking -- depends on a variety of things, most particularly
> the mix of Fortan, C and C++ (as you obviously know). We've got away
> with being rather carefree about this in the past, but OSX has shown us
> a couple of case where it does matter. This means that when building a
> program, we do in general need to be aware of the mix of source
> languages, and of such things like whether the Fortran runtime might
> have to be initialised (or if you don't, you soon will be when you try
> to build your code on OSX). That means that there isn't, I think, a
> great deal gained by putting this Fortran initialisation deep inside a
> library, and something potentially to be lost by having this
> not-strictly-necessary cleverness embedded. That is, an initialisation
> located in ndfInit wouldn't really save much beyond the few lines you
> mention; plus this way is usefully explicit.
>
> As you suggest, I think that STAR_INITIALISE_FORTRAN -- both autoconf
> and cpp macro -- might potentially do more than it does right now. At
> present, the autoconf macro does nothing more sophisticated than simply
> checking whether it has found g77, and it only actually has to do that
> on OSX. I don't see any pressing need to make it do more, but it's
> there if we need it.
>
> Am I being overly nervous, do you think? Or overly cautious of
> cunning? Revert away, if you think so.
Hi Norman,
in this case the reverse of least cunning was least action (put it in one
place and forget it), but now that the work's done I will not undo it, but
I think it's worth a mention in ndfInit and it's associated documentation.
I'll look into that.
Cheers,
Peter.
|