--- MITgcm/tools/genmake2 2003/11/13 19:33:29 1.34 +++ MITgcm/tools/genmake2 2003/11/14 02:48:18 1.36 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.34 2003/11/13 19:33:29 edhill Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.36 2003/11/14 02:48:18 edhill Exp $ # # Makefile generator for MITgcm UV codes # created by cnh 03/98 @@ -704,8 +704,8 @@ fi fi -# Check that FC, LINK, CPP, and S64 are defined. If not, complain -# and abort! +# Check that FC, LINK, CPP, S64, and LN are defined. If not, +# complain and abort! if test "x$FC" = x ; then cat <&2 @@ -741,7 +741,22 @@ if test "x$MAKEDEPEND" = x ; then MAKEDEPEND=makedepend fi +if test "x$LN" = x ; then + LN="ln -s" +fi +echo "test" > genmake_test_ln +$LN genmake_test_ln genmake_tlink +RETVAL=$? +if test "x$RETVAL" != x0 ; then + cat <&2 +Error: The command "ln -s" failed -- please specify a working soft-link + command in the optfile. + +EOF + exit 1 +fi +rm -f genmake_test_ln genmake_tlink printf "\n=== Checking system libraries ===\n" echo -n " Do we have the system() command using $FC... " @@ -849,7 +864,7 @@ # they appear as regular source code if test -r $ROOTDIR"/eesupp/src/Makefile" ; then echo " Making source files in eesupp from templates" - $MAKE -C $ROOTDIR"/eesupp/src/" > make_eesupp.errors 2>&1 + ( cd $ROOTDIR"/eesupp/src/" && $MAKE ) > make_eesupp.errors 2>&1 RETVAL=$? if test "x${RETVAL}" = x0 ; then rm -f make_eesupp.errors