96 |
will search for a working compiler by trying a list of |
will search for a working compiler by trying a list of |
97 |
"usual suspects" such as gcc, c89, cc, etc. |
"usual suspects" such as gcc, c89, cc, etc. |
98 |
|
|
|
-[no]ieee | --[no]ieee |
|
|
Do or don't use IEEE numerics. Note that this option |
|
|
*only* works if it is supported by the OPTFILE that |
|
|
is being used. |
|
|
|
|
99 |
-use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 |
-use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 |
100 |
Use "real*4" type for _RS variable (#undef REAL4_IS_SLOW) |
Use "real*4" type for _RS variable (#undef REAL4_IS_SLOW) |
101 |
*only* works if CPP_EEOPTIONS.h allows this. |
*only* works if CPP_EEOPTIONS.h allows this. |
121 |
-hpmt | --hpmt |
-hpmt | --hpmt |
122 |
Performance analysis with the HPM Toolkit |
Performance analysis with the HPM Toolkit |
123 |
|
|
124 |
-gsl | --gsl |
-ieee | --ieee |
125 |
Use GSL to control floating point rounding and precision |
use IEEE numerics. Note that this option *only* works |
126 |
|
if it is supported by the OPTFILE that is being used. |
127 |
-devel | --devel |
-devel | --devel |
128 |
Add additional warning and debugging flags for development |
Add additional warning and debugging flags for development |
129 |
|
(if supported by the OPTFILE); also switch to IEEE numerics. |
130 |
|
-gsl | --gsl |
131 |
|
Use GSL to control floating point rounding and precision |
132 |
|
|
133 |
-mpi | --mpi |
-mpi | --mpi |
134 |
Include MPI header files and link to MPI libraries |
Include MPI header files and link to MPI libraries |
345 |
# 3) locally build and use the cyrus implementation |
# 3) locally build and use the cyrus implementation |
346 |
# 4) fall back to the buggy local xmakedpend script |
# 4) fall back to the buggy local xmakedpend script |
347 |
# |
# |
348 |
|
echo >> $LOGFILE |
349 |
|
echo "running: look_for_makedepend()" >> $LOGFILE |
350 |
|
if test "x${MAKEDEPEND}" != x ; then |
351 |
|
echo "${MAKEDEPEND}" | grep -i cyrus > /dev/null 2>&1 |
352 |
|
RETVAL=$? |
353 |
|
if test x"$RETVAL" = x0 ; then |
354 |
|
build_cyrus_makedepend |
355 |
|
RETVAL=$? |
356 |
|
if test "x$RETVAL" != x0 ; then |
357 |
|
echo "WARNING: unable to build cyrus-makedepend. Try 'makedepend'" |
358 |
|
MAKEDEPEND= |
359 |
|
fi |
360 |
|
else |
361 |
|
echo "${MAKEDEPEND}" | grep 'tools.xmakedepend' > /dev/null 2>&1 |
362 |
|
RETVAL=$? |
363 |
|
if test "x$RETVAL" = x0 ; then |
364 |
|
MAKEDEPEND='$(TOOLSDIR)/xmakedepend' |
365 |
|
fi |
366 |
|
echo " --> MAKEDEPEND=${MAKEDEPEND}" >> $LOGFILE |
367 |
|
fi |
368 |
|
fi |
369 |
if test "x${MAKEDEPEND}" = x ; then |
if test "x${MAKEDEPEND}" = x ; then |
370 |
which makedepend > /dev/null 2>&1 |
which makedepend > /dev/null 2>&1 |
371 |
RV0=$? |
RV0=$? |
390 |
test -f $MAKEFILE".tst" && mv -f $MAKEFILE".tst" $MAKEFILE |
test -f $MAKEFILE".tst" && mv -f $MAKEFILE".tst" $MAKEFILE |
391 |
if test "x${RV0}${RV1}" = x00 ; then |
if test "x${RV0}${RV1}" = x00 ; then |
392 |
MAKEDEPEND=makedepend |
MAKEDEPEND=makedepend |
393 |
|
echo " --> set MAKEDEPEND=${MAKEDEPEND}" >> $LOGFILE |
394 |
else |
else |
395 |
echo " a system-default makedepend was not found." |
echo " system-default makedepend not found. Try to build cyrus-makedepend" |
396 |
# Try to build the cyrus implementation |
# Try to build the cyrus implementation |
397 |
build_cyrus_makedepend |
build_cyrus_makedepend |
398 |
RETVAL=$? |
RETVAL=$? |
399 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
400 |
|
echo "WARNING: unable to build cyrus-makedepend. Use local xmakedepend" |
401 |
MAKEDEPEND='$(TOOLSDIR)/xmakedepend' |
MAKEDEPEND='$(TOOLSDIR)/xmakedepend' |
402 |
|
echo " --> set MAKEDEPEND=${MAKEDEPEND}" >> $LOGFILE |
403 |
fi |
fi |
|
rm -f ./genmake_cy_md |
|
|
fi |
|
|
else |
|
|
# echo "MAKEDEPEND=${MAKEDEPEND}" |
|
|
echo "${MAKEDEPEND}" | grep -i cyrus > /dev/null 2>&1 |
|
|
RETVAL=$? |
|
|
if test x"$RETVAL" = x0 ; then |
|
|
build_cyrus_makedepend |
|
404 |
fi |
fi |
405 |
fi |
fi |
406 |
} |
} |
407 |
|
|
408 |
build_cyrus_makedepend() { |
build_cyrus_makedepend() { |
409 |
|
echo >> $LOGFILE |
410 |
|
echo "running: build_cyrus_makedepend()" >> $LOGFILE |
411 |
rm -f ./genmake_cy_md |
rm -f ./genmake_cy_md |
412 |
( |
( |
413 |
cd $ROOTDIR/tools/cyrus-imapd-makedepend \ |
cd $ROOTDIR/tools/cyrus-imapd-makedepend \ |
424 |
rm -f ./genmake_cy_md |
rm -f ./genmake_cy_md |
425 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" = x0 ; then |
426 |
MAKEDEPEND='$(TOOLSDIR)/cyrus-imapd-makedepend/makedepend' |
MAKEDEPEND='$(TOOLSDIR)/cyrus-imapd-makedepend/makedepend' |
427 |
|
echo " --> set MAKEDEPEND=${MAKEDEPEND}" >> $LOGFILE |
428 |
return 0 |
return 0 |
429 |
else |
else |
430 |
echo "WARNING: unable to build cyrus-imapd-makedepend" |
echo "WARNING: fail to build cyrus-imapd-makedepend" >> $LOGFILE |
431 |
return 1 |
return 1 |
432 |
fi |
fi |
433 |
} |
} |
1071 |
FEXTRAFLAGS= |
FEXTRAFLAGS= |
1072 |
USE_EXTENDED_SRC= |
USE_EXTENDED_SRC= |
1073 |
EXTENDED_SRC_FLAG= |
EXTENDED_SRC_FLAG= |
1074 |
|
GET_FC_VERSION= |
1075 |
CFLAGS= |
CFLAGS= |
1076 |
KFLAGS1= |
KFLAGS1= |
1077 |
KFLAGS2= |
KFLAGS2= |
1151 |
|
|
1152 |
# The following state can be set directly by command-line switches |
# The following state can be set directly by command-line switches |
1153 |
gm_s1="OPTFILE PKG_DEPEND PKG_GROUPS MAKEFILE MAKEDEPEND PLATFORM ROOTDIR MODS DISABLE ENABLE" |
gm_s1="OPTFILE PKG_DEPEND PKG_GROUPS MAKEFILE MAKEDEPEND PLATFORM ROOTDIR MODS DISABLE ENABLE" |
1154 |
gm_s2="FC CC IEEE USE_R4 TS PAPIS PCLS PAPI PCL HPMT GSL DEVEL MPI OMP DUMPSTATE STANDARDDIRS" |
gm_s2="FC CC USE_R4 TS PAPIS PCLS PAPI PCL HPMT IEEE DEVEL GSL MPI OMP DUMPSTATE STANDARDDIRS" |
1155 |
|
|
1156 |
# The following state is not directly set by command-line switches |
# The following state is not directly set by command-line switches |
1157 |
gm_s3="LN S64 LINK MAKE PACKAGES INCLUDES FFLAGS FOPTIM FEXTRAFLAGS" |
gm_s3="LN S64 LINK MAKE PACKAGES INCLUDES FFLAGS FOPTIM FEXTRAFLAGS" |
1315 |
-fs90=* | --fs90=*) |
-fs90=* | --fs90=*) |
1316 |
FS90=$ac_optarg ;; |
FS90=$ac_optarg ;; |
1317 |
|
|
1318 |
|
-use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 ) |
1319 |
|
USE_R4=true ;; |
1320 |
|
|
1321 |
-ieee | --ieee) |
-ieee | --ieee) |
1322 |
IEEE=true ;; |
IEEE=true ;; |
1323 |
-noieee | --noieee) |
-noieee | --noieee) |
1324 |
IEEE= ;; |
echo "Warning: ignore option '$ac_option' (default is already without '-ieee')" ;; |
1325 |
|
-devel | --devel) |
1326 |
-use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 ) |
IEEE=true ; DEVEL=true ;; |
1327 |
USE_R4=true ;; |
-gsl | --gsl) |
1328 |
|
GSL=true ;; |
1329 |
|
|
1330 |
-ts | --ts) |
-ts | --ts) |
1331 |
TS=true ;; |
TS=true ;; |
1342 |
-hpmt | --hpmt) |
-hpmt | --hpmt) |
1343 |
HPMT=true ;; |
HPMT=true ;; |
1344 |
|
|
|
-gsl | --gsl) |
|
|
GSL=true ;; |
|
|
|
|
|
-devel | --devel) |
|
|
DEVEL=true ;; |
|
|
|
|
1345 |
-mpi | --mpi) |
-mpi | --mpi) |
1346 |
MPI=true ;; |
MPI=true ;; |
1347 |
-mpi=* | --mpi=*) |
-mpi=* | --mpi=*) |
1392 |
echo "WARNING: genmake2 has detected a copy of the old-style \"./.genmakerc\"" |
echo "WARNING: genmake2 has detected a copy of the old-style \"./.genmakerc\"" |
1393 |
echo " file. This file format is no longer supported. For directions on" |
echo " file. This file format is no longer supported. For directions on" |
1394 |
echo " how to setup and use the new \"genmake2\" script, please see:" |
echo " how to setup and use the new \"genmake2\" script, please see:" |
1395 |
echo " http://mitgcm.org/devel_HOWTO/" |
echo " http://mitgcm.org/public/devel_HOWTO/" |
1396 |
echo " and send an email to MITgcm-support@mitgcm.org if you need help." |
echo " and send an email to MITgcm-support@mitgcm.org if you need help." |
1397 |
echo "WARNING: ignore \"./.genmakerc\" and continue." |
echo "WARNING: ignore \"./.genmakerc\" and continue." |
1398 |
echo |
echo |
1407 |
for d in . .. ../.. ../../.. ../../../.. ../../../../.. ; do |
for d in . .. ../.. ../../.. ../../../.. ../../../../.. ; do |
1408 |
if [ -d "$d/model" -a -d "$d/eesupp" -a -d "$d/pkg" ]; then |
if [ -d "$d/model" -a -d "$d/eesupp" -a -d "$d/pkg" ]; then |
1409 |
ROOTDIR=$d |
ROOTDIR=$d |
1410 |
printf "Warning: ROOTDIR was not specified but there appears to be" |
printf "Warning: ROOTDIR was not specified ;" |
1411 |
echo " a copy of MITgcm at \"$ROOTDIR\" so we'll try it." |
echo " try using a local copy of MITgcm found at \"$ROOTDIR\"" |
1412 |
break |
break |
1413 |
fi |
fi |
1414 |
done |
done |
1515 |
EOF |
EOF |
1516 |
exit 1 |
exit 1 |
1517 |
fi |
fi |
1518 |
|
if test "x$GET_FC_VERSION" != x ; then |
1519 |
|
echo "Get compiler version using: $FC $GET_FC_VERSION" >> $LOGFILE |
1520 |
|
$FC $GET_FC_VERSION >> $LOGFILE 2>&1 |
1521 |
|
echo "<-- compiler version ----" >> $LOGFILE |
1522 |
|
fi |
1523 |
|
|
1524 |
if test "x$CC" = x ; then |
if test "x$CC" = x ; then |
1525 |
look_for_C_compilers |
look_for_C_compilers |
2721 |
CLEAN: |
CLEAN: |
2722 |
@make Clean |
@make Clean |
2723 |
-rm -f \$(EXECUTABLE) \$(EXE_AD) *.bak |
-rm -f \$(EXECUTABLE) \$(EXE_AD) *.bak |
2724 |
-rm -f $LOGFILE genmake_state genmake_*optfile genmake.tr_log make.tr_log |
-rm -f $LOGFILE genmake_state genmake_*optfile |
2725 |
|
-rm -f SIZE.h.mpi genmake.tr_log make.tr_log |
2726 |
-find \$(EXEDIR) -name "*.meta" -exec rm {} \; |
-find \$(EXEDIR) -name "*.meta" -exec rm {} \; |
2727 |
-find \$(EXEDIR) -name "*.data" -exec rm {} \; |
-find \$(EXEDIR) -name "*.data" -exec rm {} \; |
2728 |
-find \$(EXEDIR) -name "fort.*" -exec rm {} \; |
-find \$(EXEDIR) -name "fort.*" -exec rm {} \; |