Tim,
On Thursday, December 11, 2003, at 07:35 PM, Tim Jenness wrote:
>> I'm currently doing FIO (which has platform-dependent source code, so
>> requires cunning). Then it's SST, after which it should be possible
>> to
>
> Hope I don't sound like I'm repeating myself but if you change them to
> a
> single .F file and use the C preprocessor with -D${SYSTEM} this will
> make
> things much simpler when it comes to the platform-dependent source
> code.
This is a _much_ better way of approaching this sort of problem, I
entirely agree.
For example, one unaddressable problem with the
`platform-dependent-code approach is that, even once you identify what
platform you're on, you don't know what compiler you're using: if you
tried using sun-specific code on a Sun while using gcc, you'd lose.
However, there is some platform-dependent code in the current code
base, so I feel I have to produce some way of handling it neatly, even
if I bang on in the documentation about how bad an approach this is in
practice.
By the way, the .F approach for preprocessable Fortran won't work
reliably on HFS+, since file.F and file.f are the same file.... I'd
suggest .fpp as an alternative extension, and just risk folk confusing
it with Fortran++.
I have been keeping an eye on the HFS+ issue, by the way (so relax,
Brad), and haven't (for example) relied on the distinction between
Makefile and makefile.
OS X (as opposed to HFS+) has a potential issue, however, since it's
only fairly recently that Apple submitted the patches to config.guess
which allowed it to recognise Darwin/OSX[1] correctly. That possibly
means that the configure will boke the first time Brad or I attempt to
build (my) FIO on OS X. It's probably OK in fact, since autoconf 2.57
at least has the up-to-date config.guess, and that's the version I"m
working with (matches RH9), so it's not at the top of the priority list.
See you,
Norman
[1] Details, see: http://objective.jesussave.us/propaganda.html#APPLE
--
----------------------------------------------------------------------
Norman Gray http://www.astro.gla.ac.uk/users/norman/
Physics and Astronomy, University of Glasgow [log in to unmask]
|