[MITgcm-devel] make depend on sun (o:

Martin Losch mlosch at awi-bremerhaven.de
Fri Feb 25 06:04:09 EST 2005


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




More information about the MITgcm-devel mailing list