[MITgcm-devel] make depend on sun (o:
Martin Losch
mlosch at awi-bremerhaven.de
Fri Feb 25 09:18:48 EST 2005
two problems in xmakedepend:
1. the line
if test "x$CPP" != x0 ; then
does not work, but
if test "x$CPP" != x ; then
does. (on SunOS)
2. xmakedepend only seems to work properly with "/lib/cpp" (at least on
"my" system) and I don't know whether this is the best choice for the
"make small_f" step. Testing for genmake_optfile does not really make
sense, if it is removed "routinely" by make CLEAN, so can anyone
remember why /lib/cpp was changed to cpp between versions 1.1 and 1.2?
I assume that xmakedepend is only used with SunOS, isn't it, so maybe
things should be hardwired to this system.
I suggest this: revert everything to the original and replace
if test -r ./genmake_optfile ; then
. ./genmake_optfile
fi
if test "x$CPP" != x0 ; then
CC="$CPP $CPPARGS"
else
CC="cpp $CPPARGS"
fi
by
CC="/lib/cpp $CPPARGS"
Now you can tell me, why this isn't a good idea. (o:
Martin
On Feb 25, 2005, at 12:04 PM, Martin Losch wrote:
> Hi Ed,
>
> my favorite topic: SunOS
> I am having with make depend (which uses xmakedepend on SunOS).
> At the beginning of ${TOOLS}/xmakedepend there is this:
>> CPPARGS="-Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE
>> -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE "
>>
>> if test -r ./genmake_optfile ; then
>> . ./genmake_optfile
>> fi
>> if test "x$CPP" != x0 ; then
>> CC="$CPP $CPPARGS"
>> else
>> CC="cpp $CPPARGS"
>> fi
>
> after this CC should be set to either cpp + arguments or whatever is
> stored in ./genmake_optfile for $CPP. If there is no ./genmake_optfile
> (which is always removed by make CLEAN in testreport), then there is
> no $CPP and the script should use simply cpp ( this, by itself is not
> really good, but I don't see a way to change that). However, I checked
> an the test doesn't work properly: in case of no ./genmake_optfile CC
> only contains the content of $CPPARGS, and no "cpp". I don't know
> enough about bash (yet), but appaerently the test fails and always
> goes into the first option.
>
> Appart from that (if .genmake_exists), make depend DOES NOT append
> anything to Makefile.
> I am onto that, but I am sure you can find out why much faster than I
> can.
> You should be able to reproduce these problems in slough (with both
> sunos_sun4u_g77 and f77)
>
> Martin
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://dev.mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list