37 |
grep -i "$strng" $file > /dev/null 2>&1 |
grep -i "$strng" $file > /dev/null 2>&1 |
38 |
RETVAL=$? |
RETVAL=$? |
39 |
if test "x${RETVAL}" = x0 ; then |
if test "x${RETVAL}" = x0 ; then |
40 |
echo -n "Error: In $file there is an illegal line: " |
printf "Error: In $file there is an illegal line: " |
41 |
grep -i "$strng" $file |
grep -i "$strng" $file |
42 |
return 1 |
return 1 |
43 |
fi |
fi |
67 |
done |
done |
68 |
PACKAGES=$new_packages |
PACKAGES=$new_packages |
69 |
rm -f ./p[1,2].tmp |
rm -f ./p[1,2].tmp |
70 |
|
return $matched |
71 |
else |
else |
72 |
echo "Warning: can't read package groups definition file: $PKG_GROUPS" |
echo "Warning: can't read package groups definition file: $PKG_GROUPS" |
73 |
fi |
fi |
81 |
tmp3=`echo $tmp2 | sed -e 's/power macintosh/ppc/'` |
tmp3=`echo $tmp2 | sed -e 's/power macintosh/ppc/'` |
82 |
tmp1=`echo $tmp3 | sed -e 's|x86_64|amd64|'` |
tmp1=`echo $tmp3 | sed -e 's|x86_64|amd64|'` |
83 |
tmp2=`echo $tmp1 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'` |
tmp2=`echo $tmp1 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'` |
84 |
PLATFORM=$tmp2 |
tmp3=`echo $tmp2 | sed -e 's/cray sv1/craysv1/'` |
85 |
|
PLATFORM=$tmp3 |
86 |
OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")` |
OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")` |
87 |
echo " The platform appears to be: $PLATFORM" |
echo " The platform appears to be: $PLATFORM" |
88 |
|
|
121 |
# 4) fall back to the buggy local xmakedpend script |
# 4) fall back to the buggy local xmakedpend script |
122 |
# |
# |
123 |
if test "x${MAKEDEPEND}" = x ; then |
if test "x${MAKEDEPEND}" = x ; then |
124 |
which makedepend >& /dev/null |
which makedepend > /dev/null 2>&1 |
125 |
RETVAL=$? |
RETVAL=$? |
126 |
if test ! "x${RETVAL}" = x0 ; then |
if test ! "x${RETVAL}" = x0 ; then |
127 |
echo " a system-default makedepend was not found." |
echo " a system-default makedepend was not found." |
260 |
. ./.pd_tmp |
. ./.pd_tmp |
261 |
rm -f ./.pd_tmp |
rm -f ./.pd_tmp |
262 |
|
|
263 |
echo -n "PNAME = "${} |
printf "PNAME = "${} |
264 |
} |
} |
265 |
|
|
266 |
|
|
350 |
set to PATH. i.e. Include files from $PATH/include, link to libraries |
set to PATH. i.e. Include files from $PATH/include, link to libraries |
351 |
from $PATH/lib and use binaries from $PATH/bin. |
from $PATH/lib and use binaries from $PATH/bin. |
352 |
|
|
353 |
|
-bash NAME |
354 |
|
Explicitly specify the Bourne or BASH shell to use |
355 |
|
|
356 |
While it is most often a single word, the "NAME" variables specified |
While it is most often a single word, the "NAME" variables specified |
357 |
above can in many cases be a space-delimited string such as: |
above can in many cases be a space-delimited string such as: |
358 |
|
|
566 |
CFLAGS= |
CFLAGS= |
567 |
KFLAGS1= |
KFLAGS1= |
568 |
KFLAGS2= |
KFLAGS2= |
569 |
|
#LDADD= |
570 |
LIBS= |
LIBS= |
571 |
KPPFILES= |
KPPFILES= |
572 |
NOOPTFILES= |
NOOPTFILES= |
587 |
INCLUDEDIRS= |
INCLUDEDIRS= |
588 |
STANDARDDIRS="USE_THE_DEFAULT" |
STANDARDDIRS="USE_THE_DEFAULT" |
589 |
|
|
590 |
|
G2ARGS= |
591 |
|
BASH= |
592 |
PWD=`pwd` |
PWD=`pwd` |
593 |
MAKE=make |
MAKE=make |
594 |
AWK=awk |
AWK=awk |
657 |
break |
break |
658 |
fi |
fi |
659 |
done |
done |
660 |
echo -n " getting local config information: " |
printf " getting local config information: " |
661 |
if test -e $gm_local ; then |
if test -e $gm_local ; then |
662 |
echo "using $gm_local" |
echo "using $gm_local" |
663 |
. $gm_local |
. $gm_local |
681 |
ac_prev= |
ac_prev= |
682 |
for ac_option ; do |
for ac_option ; do |
683 |
|
|
684 |
|
G2ARGS="$G2ARGS \"$ac_option\"" |
685 |
|
|
686 |
# If the previous option needs an argument, assign it. |
# If the previous option needs an argument, assign it. |
687 |
if test -n "$ac_prev"; then |
if test -n "$ac_prev"; then |
688 |
eval "$ac_prev=\$ac_option" |
eval "$ac_prev=\$ac_option" |
724 |
-make=* | --make=* | -m=* | --m=*) |
-make=* | --make=* | -m=* | --m=*) |
725 |
MAKE=$ac_optarg ;; |
MAKE=$ac_optarg ;; |
726 |
|
|
727 |
|
-bash | --bash) |
728 |
|
ac_prev=BASH ;; |
729 |
|
-bash=* | --bash=*) |
730 |
|
BASH=$ac_optarg ;; |
731 |
|
|
732 |
-makedepend | --makedepend | -md | --md) |
-makedepend | --makedepend | -md | --md) |
733 |
ac_prev=MAKEDEPEND ;; |
ac_prev=MAKEDEPEND ;; |
734 |
-makedepend=* | --makedepend=* | -md=* | --md=*) |
-makedepend=* | --makedepend=* | -md=* | --md=*) |
843 |
for d in . .. ../.. ../../.. ../../../.. ../../../../.. ; do |
for d in . .. ../.. ../../.. ../../../.. ../../../../.. ; do |
844 |
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 |
845 |
ROOTDIR=$d |
ROOTDIR=$d |
846 |
echo -n "Warning: ROOTDIR was not specified but there appears to be" |
printf "Warning: ROOTDIR was not specified but there appears to be" |
847 |
echo " a copy of MITgcm at \"$ROOTDIR\" so we'll try it." |
echo " a copy of MITgcm at \"$ROOTDIR\" so we'll try it." |
848 |
break |
break |
849 |
fi |
fi |
877 |
. "$OPTFILE" |
. "$OPTFILE" |
878 |
RETVAL=$? |
RETVAL=$? |
879 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
880 |
echo -n "Error: failed to source OPTFILE \"$OPTFILE\"" |
printf "Error: failed to source OPTFILE \"$OPTFILE\"" |
881 |
echo "--please check that variable syntax is bash-compatible" |
echo "--please check that variable syntax is bash-compatible" |
882 |
exit 1 |
exit 1 |
883 |
fi |
fi |
904 |
. "$AD_OPTFILE" |
. "$AD_OPTFILE" |
905 |
RETVAL=$? |
RETVAL=$? |
906 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
907 |
echo -n "Error: failed to source AD_OPTFILE \"$AD_OPTFILE\"" |
printf "Error: failed to source AD_OPTFILE \"$AD_OPTFILE\"" |
908 |
echo "--please check that variable syntax is bash-compatible" |
echo "--please check that variable syntax is bash-compatible" |
909 |
exit 1 |
exit 1 |
910 |
fi |
fi |
919 |
|
|
920 |
# Check that FC, LINK, CPP, S64, LN, and MAKE are defined. If not, |
# Check that FC, LINK, CPP, S64, LN, and MAKE are defined. If not, |
921 |
# either set defaults or complain and abort! |
# either set defaults or complain and abort! |
922 |
|
if test ! "x$BASH" = x ; then |
923 |
|
# add a trailing space so that it works within the Makefile syntax (see below) |
924 |
|
BASH="$BASH " |
925 |
|
fi |
926 |
if test "x$FC" = x ; then |
if test "x$FC" = x ; then |
927 |
cat <<EOF 1>&2 |
cat <<EOF 1>&2 |
928 |
|
|
993 |
fi |
fi |
994 |
|
|
995 |
printf "\n=== Checking system libraries ===\n" |
printf "\n=== Checking system libraries ===\n" |
996 |
echo -n " Do we have the system() command using $FC... " |
printf " Do we have the system() command using $FC... " |
997 |
cat > genmake_tcomp.f <<EOF |
cat > genmake_tcomp.f <<EOF |
998 |
program hello |
program hello |
999 |
call system('echo hi') |
call system('echo hi') |
1011 |
fi |
fi |
1012 |
rm -f genmake_tcomp* |
rm -f genmake_tcomp* |
1013 |
|
|
1014 |
echo -n " Do we have the fdate() command using $FC... " |
printf " Do we have the fdate() command using $FC... " |
1015 |
cat > genmake_tcomp.f <<EOF |
cat > genmake_tcomp.f <<EOF |
1016 |
program hello |
program hello |
1017 |
CHARACTER(128) string |
CHARACTER(128) string |
1032 |
fi |
fi |
1033 |
rm -f genmake_tcomp* |
rm -f genmake_tcomp* |
1034 |
|
|
1035 |
echo -n " Can we call simple C routines (here, \"cloc()\") using $FC... " |
printf " Can we call simple C routines (here, \"cloc()\") using $FC... " |
1036 |
check_HAVE_CLOC |
check_HAVE_CLOC |
1037 |
if test "x$HAVE_CLOC" != x ; then |
if test "x$HAVE_CLOC" != x ; then |
1038 |
echo "yes" |
echo "yes" |
1041 |
fi |
fi |
1042 |
rm -f genmake_t* |
rm -f genmake_t* |
1043 |
|
|
1044 |
echo -n " Can we create NetCDF-enabled binaries... " |
printf " Can we create NetCDF-enabled binaries... " |
1045 |
check_netcdf_libs |
check_netcdf_libs |
1046 |
if test "x$HAVE_NETCDF" != x ; then |
if test "x$HAVE_NETCDF" != x ; then |
1047 |
echo "yes" |
echo "yes" |
1051 |
|
|
1052 |
|
|
1053 |
printf "\n=== Setting defaults ===\n" |
printf "\n=== Setting defaults ===\n" |
1054 |
echo -n " Adding MODS directories: " |
printf " Adding MODS directories: " |
1055 |
for d in $MODS ; do |
for d in $MODS ; do |
1056 |
if test ! -d $d ; then |
if test ! -d $d ; then |
1057 |
echo |
echo |
1058 |
echo "Error: MODS directory \"$d\" not found!" |
echo "Error: MODS directory \"$d\" not found!" |
1059 |
exit 1 |
exit 1 |
1060 |
else |
else |
1061 |
echo -n " $d" |
printf " $d" |
1062 |
SOURCEDIRS="$SOURCEDIRS $d" |
SOURCEDIRS="$SOURCEDIRS $d" |
1063 |
INCLUDEDIRS="$INCLUDEDIRS $d" |
INCLUDEDIRS="$INCLUDEDIRS $d" |
1064 |
fi |
fi |
1183 |
def=`cat $PDEFAULT | sed -e 's/#.*$//g' | $AWK '(NF>0){print $0}'` |
def=`cat $PDEFAULT | sed -e 's/#.*$//g' | $AWK '(NF>0){print $0}'` |
1184 |
RETVAL=$? |
RETVAL=$? |
1185 |
if test "x${RETVAL}" != x0 ; then |
if test "x${RETVAL}" != x0 ; then |
1186 |
echo -n "Error: can't parse default package list " |
printf "Error: can't parse default package list " |
1187 |
echo "-- please check PDEFAULT=\"$PDEFAULT\"" |
echo "-- please check PDEFAULT=\"$PDEFAULT\"" |
1188 |
exit 1 |
exit 1 |
1189 |
fi |
fi |
1191 |
PACKAGES="$PACKAGES $i" |
PACKAGES="$PACKAGES $i" |
1192 |
done |
done |
1193 |
echo " before group expansion packages are: $PACKAGES" |
echo " before group expansion packages are: $PACKAGES" |
1194 |
expand_pkg_groups |
while ! expand_pkg_groups; do echo > /dev/null; done |
1195 |
echo " after group expansion packages are: $PACKAGES" |
echo " after group expansion packages are: $PACKAGES" |
1196 |
fi |
fi |
1197 |
fi |
fi |
1198 |
|
|
1199 |
echo " applying DISABLE settings" |
echo " applying DISABLE settings" |
1200 |
|
for i in $PACKAGES ; do |
1201 |
|
echo $i >> ./.tmp_pack |
1202 |
|
done |
1203 |
|
for i in `grep "-" ./.tmp_pack` ; do |
1204 |
|
j=`echo $i | sed 's/[-]//'` |
1205 |
|
DISABLE="$DISABLE $j" |
1206 |
|
done |
1207 |
pack= |
pack= |
1208 |
for p in $PACKAGES ; do |
for p in $PACKAGES ; do |
1209 |
addit="t" |
addit="t" |
1220 |
echo " applying ENABLE settings" |
echo " applying ENABLE settings" |
1221 |
echo "" > ./.tmp_pack |
echo "" > ./.tmp_pack |
1222 |
PACKAGES="$PACKAGES $ENABLE" |
PACKAGES="$PACKAGES $ENABLE" |
1223 |
|
# Test if each explicitly referenced package exists |
1224 |
for i in $PACKAGES ; do |
for i in $PACKAGES ; do |
1225 |
if test ! -d "$ROOTDIR/pkg/$i" ; then |
j=`echo $i | sed 's/[-+]//'` |
1226 |
|
if test ! -d "$ROOTDIR/pkg/$j" ; then |
1227 |
echo "Error: can't find package $i at \"$ROOTDIR/pkg/$i\"" |
echo "Error: can't find package $i at \"$ROOTDIR/pkg/$i\"" |
1228 |
exit 1 |
exit 1 |
1229 |
fi |
fi |
1230 |
echo $i >> ./.tmp_pack |
echo $i >> ./.tmp_pack |
1231 |
done |
done |
|
pack=`cat ./.tmp_pack | sort | uniq` |
|
|
rm -f ./.tmp_pack |
|
1232 |
PACKAGES= |
PACKAGES= |
1233 |
for i in $pack ; do |
for i in `grep -v "-" ./.tmp_pack | sort | uniq` ; do |
1234 |
PACKAGES="$PACKAGES $i" |
PACKAGES="$PACKAGES $i" |
1235 |
done |
done |
1236 |
|
rm -f ./.tmp_pack |
1237 |
echo " packages are: $PACKAGES" |
echo " packages are: $PACKAGES" |
1238 |
|
|
1239 |
echo " applying package dependency rules" |
echo " applying package dependency rules" |
1474 |
mkdir .links.tmp |
mkdir .links.tmp |
1475 |
echo "# This section creates symbolic links" > srclinks.tmp |
echo "# This section creates symbolic links" > srclinks.tmp |
1476 |
echo "" >> srclinks.tmp |
echo "" >> srclinks.tmp |
1477 |
echo -n 'SRCFILES = ' > srclist.inc |
printf 'SRCFILES = ' > srclist.inc |
1478 |
echo -n 'CSRCFILES = ' > csrclist.inc |
printf 'CSRCFILES = ' > csrclist.inc |
1479 |
echo -n 'F90SRCFILES = ' > f90srclist.inc |
printf 'F90SRCFILES = ' > f90srclist.inc |
1480 |
echo -n 'HEADERFILES = ' > hlist.inc |
printf 'HEADERFILES = ' > hlist.inc |
1481 |
echo -n 'AD_FLOW_FILES = ' > ad_flow_files.inc |
printf 'AD_FLOW_FILES = ' > ad_flow_files.inc |
1482 |
alldirs="$SOURCEDIRS $INCLUDEDIRS ." |
alldirs="$SOURCEDIRS $INCLUDEDIRS ." |
1483 |
for d in $alldirs ; do |
for d in $alldirs ; do |
1484 |
deplist= |
deplist= |
1503 |
case $extn in |
case $extn in |
1504 |
F) |
F) |
1505 |
echo " \\" >> srclist.inc |
echo " \\" >> srclist.inc |
1506 |
echo -n " $sf" >> srclist.inc |
printf " $sf" >> srclist.inc |
1507 |
;; |
;; |
1508 |
F90) |
F90) |
1509 |
echo " \\" >> f90srclist.inc |
echo " \\" >> f90srclist.inc |
1510 |
echo -n " $sf" >> f90srclist.inc |
printf " $sf" >> f90srclist.inc |
1511 |
;; |
;; |
1512 |
c) |
c) |
1513 |
echo " \\" >> csrclist.inc |
echo " \\" >> csrclist.inc |
1514 |
echo -n " $sf" >> csrclist.inc |
printf " $sf" >> csrclist.inc |
1515 |
;; |
;; |
1516 |
h) |
h) |
1517 |
echo " \\" >> hlist.inc |
echo " \\" >> hlist.inc |
1518 |
echo -n " $sf" >> hlist.inc |
printf " $sf" >> hlist.inc |
1519 |
;; |
;; |
1520 |
flow) |
flow) |
1521 |
echo " \\" >> ad_flow_files.inc |
echo " \\" >> ad_flow_files.inc |
1522 |
echo -n " $sf" >> ad_flow_files.inc |
printf " $sf" >> ad_flow_files.inc |
1523 |
;; |
;; |
1524 |
esac |
esac |
1525 |
fi |
fi |
1548 |
echo "# This makefile was generated automatically on" >> $MAKEFILE |
echo "# This makefile was generated automatically on" >> $MAKEFILE |
1549 |
echo "# $THISDATE" >> $MAKEFILE |
echo "# $THISDATE" >> $MAKEFILE |
1550 |
echo "# by the command:" >> $MAKEFILE |
echo "# by the command:" >> $MAKEFILE |
1551 |
echo "# $0 $@" >> $MAKEFILE |
echo "# $0 $G2ARGS" >> $MAKEFILE |
1552 |
echo "# executed by:" >> $MAKEFILE |
echo "# executed by:" >> $MAKEFILE |
1553 |
echo "# $USER@${THISHOSTNAME}:${THISCWD}" >> $MAKEFILE |
echo "# $USER@${THISHOSTNAME}:${THISCWD}" >> $MAKEFILE |
1554 |
|
|
1616 |
# Fortran compiler |
# Fortran compiler |
1617 |
F90C = ${F90C} |
F90C = ${F90C} |
1618 |
# Link editor |
# Link editor |
1619 |
LINK = ${LINK} |
LINK = ${LINK} ${LDADD} |
1620 |
|
|
1621 |
# Defines for CPP |
# Defines for CPP |
1622 |
DEFINES = ${DEFINES} |
DEFINES = ${DEFINES} |
1669 |
@make links |
@make links |
1670 |
\$(MAKEDEPEND) -o .f \$(DEFINES) \$(INCLUDES) \$(SRCFILES) |
\$(MAKEDEPEND) -o .f \$(DEFINES) \$(INCLUDES) \$(SRCFILES) |
1671 |
\$(TOOLSDIR)/f90mkdepend >> \$(MAKEFILE) |
\$(TOOLSDIR)/f90mkdepend >> \$(MAKEFILE) |
1672 |
|
-rm -f makedepend.out |
1673 |
|
|
1674 |
links: \$(SRCFILES) \$(CSRCFILES) \$(HEADERFILES) \$(F90SRCFILES) \$(SPECIAL_FILES) |
links: \$(SRCFILES) \$(CSRCFILES) \$(HEADERFILES) \$(F90SRCFILES) \$(SPECIAL_FILES) |
1675 |
|
|
1695 |
|
|
1696 |
#eh3 Makefile: makefile |
#eh3 Makefile: makefile |
1697 |
makefile: |
makefile: |
1698 |
$THIS_SCRIPT $@ |
$THIS_SCRIPT $G2ARGS |
1699 |
cleanlinks: |
cleanlinks: |
1700 |
-find . -type l -exec rm {} \; |
-find . -type l -exec rm {} \; |
1701 |
|
|
1702 |
# Special targets ($SPECIAL_FILES) which are create by make |
# Special targets ($SPECIAL_FILES) which are create by make |
1703 |
${PACKAGES_DOT_H}: |
${PACKAGES_DOT_H}: |
1704 |
@echo Creating \$@ ... |
@echo Creating \$@ ... |
1705 |
@\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -bPACKAGES_CONFIG_H "Disabled packages:" \$(DISABLED_PACKAGES) " " "Enabled packages:" \$(ENABLED_PACKAGES) > \$@ |
@$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -bPACKAGES_CONFIG_H "Disabled packages:" \$(DISABLED_PACKAGES) " " "Enabled packages:" \$(ENABLED_PACKAGES) > \$@ |
1706 |
AD_CONFIG.h: |
AD_CONFIG.h: |
1707 |
@echo Creating \$@ ... |
@echo Creating \$@ ... |
1708 |
@\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -bAD_CONFIG_H -UALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > \$@ |
@$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -bAD_CONFIG_H -UALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > \$@ |
1709 |
FC_NAMEMANGLE.h: |
FC_NAMEMANGLE.h: |
1710 |
@echo Creating \$@ ... |
@echo Creating \$@ ... |
1711 |
echo "$FC_NAMEMANGLE" > \$@ |
echo "$FC_NAMEMANGLE" > \$@ |
1752 |
|
|
1753 |
echo " Add the source list for AD code generation" |
echo " Add the source list for AD code generation" |
1754 |
echo >> $MAKEFILE |
echo >> $MAKEFILE |
1755 |
echo -n "AD_FILES = " >> $MAKEFILE |
printf "AD_FILES = " >> $MAKEFILE |
1756 |
AD_FILES=`cat ad_files` |
AD_FILES=`cat ad_files` |
1757 |
for i in $AD_FILES ; do |
for i in $AD_FILES ; do |
1758 |
echo " \\" >> $MAKEFILE |
echo " \\" >> $MAKEFILE |
1759 |
echo -n " $i" >> $MAKEFILE |
printf " $i" >> $MAKEFILE |
1760 |
done |
done |
1761 |
echo >> $MAKEFILE |
echo >> $MAKEFILE |
1762 |
rm -f ad_files |
rm -f ad_files |
1769 |
adtamc: ad_tamc_output.f |
adtamc: ad_tamc_output.f |
1770 |
|
|
1771 |
ad_input_code.f: \$(AD_FILES) \$(HEADERFILES) |
ad_input_code.f: \$(AD_FILES) \$(HEADERFILES) |
1772 |
@\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ad_config.template |
@$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ad_config.template |
1773 |
cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h |
cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h |
1774 |
-rm -f ad_config.template |
-rm -f ad_config.template |
1775 |
@make \$(F77FILES) |
@make \$(F77FILES) |
1801 |
ftltamc: ftl_tamc_output.f |
ftltamc: ftl_tamc_output.f |
1802 |
|
|
1803 |
ftl_input_code.f: \$(AD_FILES) \$(HEADERFILES) |
ftl_input_code.f: \$(AD_FILES) \$(HEADERFILES) |
1804 |
@\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -UALLOW_ADJOINT_RUN -DALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ftl_config.template |
@$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -UALLOW_ADJOINT_RUN -DALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ftl_config.template |
1805 |
cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h |
cmp ftl_config.template AD_CONFIG.h || cat ftl_config.template > AD_CONFIG.h |
1806 |
-rm -f ftl_config.template |
-rm -f ftl_config.template |
1807 |
@make \$(F77FILES) |
@make \$(F77FILES) |
1874 |
printf "\n=== Done ===\n" |
printf "\n=== Done ===\n" |
1875 |
|
|
1876 |
# Create special header files |
# Create special header files |
1877 |
$TOOLSDIR/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -bPACKAGES_CONFIG_H "Disabled packages:" $DISABLED_PACKAGES " " "Enabled packages:" $ENABLED_PACKAGES > $PACKAGES_DOT_H".tmp" |
$BASH $TOOLSDIR/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -bPACKAGES_CONFIG_H "Disabled packages:" $DISABLED_PACKAGES " " "Enabled packages:" $ENABLED_PACKAGES > $PACKAGES_DOT_H".tmp" |
1878 |
if test ! -f $PACKAGES_DOT_H ; then |
if test ! -f $PACKAGES_DOT_H ; then |
1879 |
mv -f $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H |
mv -f $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H |
1880 |
else |
else |
1888 |
fi |
fi |
1889 |
fi |
fi |
1890 |
if test ! -f AD_CONFIG.h ; then |
if test ! -f AD_CONFIG.h ; then |
1891 |
$TOOLSDIR/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -UALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > AD_CONFIG.h |
$BASH $TOOLSDIR/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -UALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > AD_CONFIG.h |
1892 |
fi |
fi |
1893 |
|
|
1894 |
|
|
1895 |
# Write the "state" for future records |
# Write the "state" for future records |
1896 |
if test "x$DUMPSTATE" != xf ; then |
if test "x$DUMPSTATE" != xf ; then |
1897 |
echo -n "" > genmake_state |
printf "" > genmake_state |
1898 |
for i in $gm_state ; do |
for i in $gm_state ; do |
1899 |
t1="t2=\$$i" |
t1="t2=\$$i" |
1900 |
eval $t1 |
eval $t1 |