19 |
-help | --help | -h | --h |
-help | --help | -h | --h |
20 |
Print this help message and exit. |
Print this help message and exit. |
21 |
|
|
22 |
|
-oad | --oad |
23 |
|
Generate a Makefile for an OpenAD built |
24 |
|
|
25 |
|
-nocat4ad | -dog4ad | -ncad | -dad |
26 |
|
do not concatenate (cat) source code sent to TAF |
27 |
|
resulting in compilation of multiple files |
28 |
|
|
29 |
-adoptfile NAME | --adoptfile NAME | -adof NAME | --adof NAME |
-adoptfile NAME | --adoptfile NAME | -adof NAME | --adof NAME |
30 |
-adoptfile=NAME | --adoptfile=NAME | -adof=NAME | --adof=NAME |
-adoptfile=NAME | --adoptfile=NAME | -adof=NAME | --adof=NAME |
31 |
Use "NAME" as the adoptfile. By default, the file at |
Use "NAME" as the adoptfile. By default, the file at |
32 |
|
"tools/adjoint_options/adjoint_oad" (for OpenAD built) or |
33 |
"tools/adjoint_options/adjoint_default" will be used. |
"tools/adjoint_options/adjoint_default" will be used. |
34 |
|
|
35 |
-nooptfile | --nooptfile |
-optfile NAME | --optfile NAME | -of NAME | --of NAME |
|
-optfile NAME | --optfile NAME | -of NAME | --of NAME |
|
36 |
-optfile=NAME | --optfile=NAME | -of=NAME | --of=NAME |
-optfile=NAME | --optfile=NAME | -of=NAME | --of=NAME |
37 |
Use "NAME" as the optfile. By default, an attempt will be |
Use "NAME" as the optfile. By default, an attempt will be |
38 |
made to find an appropriate "standard" optfile in the |
made to find an appropriate "standard" optfile in the |
215 |
expand_pkg_groups() { |
expand_pkg_groups() { |
216 |
new_packages= |
new_packages= |
217 |
if test -r $PKG_GROUPS ; then |
if test -r $PKG_GROUPS ; then |
218 |
cat $PKG_GROUPS | sed -e 's/#.*$//g' | sed -e 's/:/ : /g' > ./p1.tmp |
cat $PKG_GROUPS | sed -e 's/#.*$//g' | sed -e 's/:/ : /g' > $TMP.p1 |
219 |
cat ./p1.tmp | $AWK '(NF>2 && $2==":"){ print $0 }' > ./p2.tmp |
cat $TMP.p1 | $AWK '(NF>2 && $2==":"){ print $0 }' > $TMP.p2 |
220 |
matched=0 |
matched=0 |
221 |
for i in $PACKAGES ; do |
for i in $PACKAGES ; do |
222 |
line=`grep "^ *$i" ./p2.tmp` |
line=`grep "^ *$i" $TMP.p2` |
223 |
RETVAL=$? |
RETVAL=$? |
224 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" = x0 ; then |
225 |
matched=1 |
matched=1 |
231 |
fi |
fi |
232 |
done |
done |
233 |
PACKAGES=$new_packages |
PACKAGES=$new_packages |
234 |
rm -f ./p[1,2].tmp |
rm -f $TMP.p[1,2] |
235 |
return $matched |
return $matched |
236 |
else |
else |
237 |
echo "Warning: can't read package groups definition file: $PKG_GROUPS" |
echo "Warning: can't read package groups definition file: $PKG_GROUPS" |
1086 |
} |
} |
1087 |
|
|
1088 |
check_lapack_libs() { |
check_lapack_libs() { |
1089 |
if test ! "x$SKIP_LAPACK_CHECK" = x ; then |
if test "x$CHECK_FOR_LAPACK" = xf ; then return ; fi |
|
return |
|
|
fi |
|
1090 |
echo >> $LOGFILE |
echo >> $LOGFILE |
1091 |
echo "running: check_lapack_libs()" >> $LOGFILE |
echo "running: check_lapack_libs()" >> $LOGFILE |
1092 |
cat <<EOF > genmake_tla.F |
cat <<EOF > genmake_tla.F |
1282 |
DEVEL= |
DEVEL= |
1283 |
HAVE_TEST_L= |
HAVE_TEST_L= |
1284 |
|
|
1285 |
# comment this line out to enable lapack test |
# set this to "t" to enable lapack test |
1286 |
SKIP_LAPACK_CHECK=t |
CHECK_FOR_LAPACK=f |
1287 |
|
|
1288 |
# DEFINES checked by test compilation or command-line |
# DEFINES checked by test compilation or command-line |
1289 |
HAVE_SYSTEM= |
HAVE_SYSTEM= |
1330 |
FS90= |
FS90= |
1331 |
|
|
1332 |
AUTODIFF_PKG_USED=f |
AUTODIFF_PKG_USED=f |
1333 |
|
OPENAD= |
1334 |
AD_OPTFILE= |
AD_OPTFILE= |
1335 |
|
CAT_SRC_FOR_TAF=1 |
1336 |
TAF= |
TAF= |
1337 |
AD_TAF_FLAGS= |
AD_TAF_FLAGS= |
1338 |
FTL_TAF_FLAGS= |
FTL_TAF_FLAGS= |
1358 |
gm_s4="LN S64 LINK PACKAGES INCLUDES FFLAGS FOPTIM" |
gm_s4="LN S64 LINK PACKAGES INCLUDES FFLAGS FOPTIM" |
1359 |
gm_s5="CFLAGS LIBS KPP KFLAGS1 KFLAGS2 KPPFILES NOOPTFILES NOOPTFLAGS" |
gm_s5="CFLAGS LIBS KPP KFLAGS1 KFLAGS2 KPPFILES NOOPTFILES NOOPTFLAGS" |
1360 |
gm_s6="PWD TOOLSDIR SOURCEDIRS INCLUDEDIRS EXEDIR EXECUTABLE EXEHOOK" |
gm_s6="PWD TOOLSDIR SOURCEDIRS INCLUDEDIRS EXEDIR EXECUTABLE EXEHOOK" |
1361 |
gm_s7="THISHOST THISUSER THISDATE THISVER MACHINE FC_NAMEMANGLE" |
gm_s7="TMP THISHOST THISUSER THISDATE THISVER MACHINE FC_NAMEMANGLE" |
1362 |
gm_s8="HAVE_NETCDF HAVE_SYSTEM HAVE_FDATE HAVE_ETIME HAVE_LAPACK HAVE_FLUSH" |
gm_s8="HAVE_NETCDF HAVE_SYSTEM HAVE_FDATE HAVE_ETIME HAVE_LAPACK HAVE_FLUSH" |
1363 |
|
|
1364 |
# The following are all related to adjoint/tangent-linear stuff |
# The following are all related to adjoint/tangent-linear stuff |
1365 |
gm_s10="AUTODIFF_PKG_USED AD_OPTFILE TAMC TAF AD_TAMC_FLAGS AD_TAF_FLAGS" |
gm_s10="AUTODIFF_PKG_USED AD_OPTFILE OPENAD TAMC TAF AD_TAMC_FLAGS AD_TAF_FLAGS" |
1366 |
gm_s11="FTL_TAMC_FLAGS FTL_TAF_FLAGS SVD_TAMC_FLAGS SVD_TAF_FLAGS" |
gm_s11="FTL_TAMC_FLAGS FTL_TAF_FLAGS SVD_TAMC_FLAGS SVD_TAF_FLAGS" |
1367 |
gm_s12="TAF_EXTRA TAMC_EXTRA DIVA MPIINCLUDEDIR MPI_HEADER_FILES" |
gm_s12="TAF_EXTRA TAMC_EXTRA DIVA MPIINCLUDEDIR MPI_HEADER_FILES" |
1368 |
|
|
1407 |
-help | --help | -h | --h) |
-help | --help | -h | --h) |
1408 |
usage ;; |
usage ;; |
1409 |
|
|
|
-nooptfile | --nooptfile) |
|
|
OPTFILE="NONE" ;; |
|
1410 |
-optfile | --optfile | -of | --of) |
-optfile | --optfile | -of | --of) |
1411 |
ac_prev=OPTFILE ;; |
ac_prev=OPTFILE ;; |
1412 |
-optfile=* | --optfile=* | -of=* | --of=*) |
-optfile=* | --optfile=* | -of=* | --of=*) |
1413 |
OPTFILE=$ac_optarg ;; |
OPTFILE=$ac_optarg ;; |
1414 |
|
|
1415 |
|
-oad | --oad) |
1416 |
|
OPENAD="true" ; ALWAYS_USE_F90=1 ;; |
1417 |
|
-nocat4ad | -dog4ad | -ncad | -dad) |
1418 |
|
CAT_SRC_FOR_TAF=0 ;; |
1419 |
-adoptfile | --adoptfile | -adof | --adof) |
-adoptfile | --adoptfile | -adof | --adof) |
1420 |
ac_prev=AD_OPTFILE ;; |
ac_prev=AD_OPTFILE ;; |
1421 |
-adoptfile=* | --adoptfile=* | -adof=* | --adof=*) |
-adoptfile=* | --adoptfile=* | -adof=* | --adof=*) |
1585 |
|
|
1586 |
done |
done |
1587 |
|
|
1588 |
|
#TMP=./genmk_$$ |
1589 |
|
#- try to put temporary files in system-local /tmp dir |
1590 |
|
TMP=/tmp/genmk_${USER}_$$ |
1591 |
|
touch $TMP ; retVal=$? |
1592 |
|
if [ $retVal -eq 0 ] ; then |
1593 |
|
if test ! -r $TMP ; then TMP=./genmk_$$ ; fi |
1594 |
|
else |
1595 |
|
TMP=./genmk_$$ |
1596 |
|
fi |
1597 |
|
rm -f $TMP |
1598 |
|
#echo " temp files: $TMP.*" |
1599 |
|
|
1600 |
printf " getting local config information: " |
printf " getting local config information: " |
1601 |
if test -f $gm_local ; then |
if test -f $gm_local ; then |
1602 |
echo "using $gm_local" |
echo "using $gm_local" |
1689 |
|
|
1690 |
echo " getting AD_OPTFILE information:" |
echo " getting AD_OPTFILE information:" |
1691 |
if test "x${AD_OPTFILE}" = x ; then |
if test "x${AD_OPTFILE}" = x ; then |
1692 |
if test "x$MITGCM_AD_OF" = x ; then |
if test "x$MITGCM_AD_OF" != x ; then |
1693 |
|
AD_OPTFILE=$MITGCM_AD_OF |
1694 |
|
elif test "x$OPENAD" = x ; then |
1695 |
AD_OPTFILE=$ROOTDIR/tools/adjoint_options/adjoint_default |
AD_OPTFILE=$ROOTDIR/tools/adjoint_options/adjoint_default |
1696 |
else |
else |
1697 |
AD_OPTFILE=$MITGCM_AD_OF |
AD_OPTFILE=$ROOTDIR/tools/adjoint_options/adjoint_oad |
1698 |
fi |
fi |
1699 |
fi |
fi |
1700 |
if test "x${AD_OPTFILE}" != xNONE ; then |
if test "x${AD_OPTFILE}" != xNONE ; then |
1717 |
fi |
fi |
1718 |
|
|
1719 |
#==================================================================== |
#==================================================================== |
1720 |
|
# Initialize INCLUDEDIRSMK from and optfile INCLUDEDIRS |
1721 |
|
if test "x${INCLUDEDIRS}" != "x" ; then |
1722 |
|
INCLUDEDIRSMK=${INCLUDEDIRS} |
1723 |
|
fi |
1724 |
|
|
1725 |
|
#==================================================================== |
1726 |
# Set default values if not set by the optfile |
# Set default values if not set by the optfile |
1727 |
# |
# |
1728 |
# Check that FC, CC, LINK, CPP, S64, LN, and MAKE are defined. If not, |
# Check that FC, CC, LINK, CPP, S64, LN, and MAKE are defined. If not, |
1967 |
fi |
fi |
1968 |
rm -f genmake_tcomp* |
rm -f genmake_tcomp* |
1969 |
|
|
1970 |
printf " Do we have the etime() command using $FC... " |
printf " Do we have the etime() command using $FC... " |
1971 |
cat > genmake_tcomp.$FS <<EOF |
cat > genmake_tcomp_1.$FS <<EOF |
1972 |
program hello |
program hello |
1973 |
REAL*4 ACTUAL, TARRAY(2) |
REAL*4 actual, tarray(2) |
1974 |
EXTERNAL ETIME |
EXTERNAL ETIME |
1975 |
REAL*4 ETIME |
REAL*4 ETIME |
1976 |
actual = etime( tarray ) |
actual = ETIME( tarray ) |
1977 |
print *, tarray |
print *, tarray |
1978 |
end |
end |
1979 |
EOF |
EOF |
1980 |
$FC $FFLAGS -o genmake_tcomp genmake_tcomp.$FS > genmake_tcomp.log 2>&1 |
$FC $FFLAGS -o genmake_tcomp_1 genmake_tcomp_1.$FS > genmake_tcomp.log 2>&1 |
1981 |
RETVAL=$? |
RETVAL=$? |
1982 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" = x0 ; then |
1983 |
HAVE_ETIME=t |
HAVE_ETIME='Fct' |
1984 |
DEFINES="$DEFINES -DHAVE_ETIME" |
DEFINES="$DEFINES -DHAVE_ETIME_FCT" |
1985 |
echo "yes" |
echo " yes (${HAVE_ETIME})" |
1986 |
else |
else |
1987 |
|
cat > genmake_tcomp_2.$FS <<EOF |
1988 |
|
program hello |
1989 |
|
REAL*4 actual, tarray(2) |
1990 |
|
actual = -999. |
1991 |
|
call ETIME( tarray, actual ) |
1992 |
|
if ( actual.ge.0. ) then |
1993 |
|
print *, 0, tarray, actual |
1994 |
|
else |
1995 |
|
print *, 1, tarray, actual |
1996 |
|
endif |
1997 |
|
end |
1998 |
|
EOF |
1999 |
|
$FC $FFLAGS -o genmake_tcomp_2 genmake_tcomp_2.$FS >> genmake_tcomp.log 2>&1 |
2000 |
|
RETVAL=$? |
2001 |
|
if test "x$RETVAL" = x0 ; then |
2002 |
|
echo -n 'c,' |
2003 |
|
./genmake_tcomp_2 > genmake_tcomp_2.out 2>&1 |
2004 |
|
RETVAL=$? |
2005 |
|
fi |
2006 |
|
if test "x$RETVAL" = x0 ; then |
2007 |
|
echo -n 'r:' |
2008 |
|
RETVAL=`cat genmake_tcomp_2.out | $AWK '{print $1}'` |
2009 |
|
fi |
2010 |
|
if test "x$RETVAL" = x0 ; then |
2011 |
|
HAVE_ETIME='SbR' |
2012 |
|
DEFINES="$DEFINES -DHAVE_ETIME_SBR" |
2013 |
|
echo " yes (${HAVE_ETIME})" |
2014 |
|
else |
2015 |
HAVE_ETIME= |
HAVE_ETIME= |
2016 |
echo "no" |
echo " no" |
2017 |
|
fi |
2018 |
fi |
fi |
2019 |
|
#mkdir chk_etime ; cp -p -f genmake_tcomp* chk_etime |
2020 |
rm -f genmake_tcomp* |
rm -f genmake_tcomp* |
2021 |
|
|
2022 |
printf " Can we call simple C routines (here, \"cloc()\") using $FC... " |
printf " Can we call simple C routines (here, \"cloc()\") using $FC... " |
2111 |
printf "$d " |
printf "$d " |
2112 |
SOURCEDIRS="$SOURCEDIRS $d" |
SOURCEDIRS="$SOURCEDIRS $d" |
2113 |
INCLUDEDIRS="$INCLUDEDIRS $d" |
INCLUDEDIRS="$INCLUDEDIRS $d" |
2114 |
|
SOURCEDIRSMK="$SOURCEDIRSMK $d" |
2115 |
|
INCLUDEDIRSMK="$INCLUDEDIRSMK $d" |
2116 |
fi |
fi |
2117 |
done |
done |
2118 |
echo |
echo |
2136 |
|
|
2137 |
if test "x${TOOLSDIR}" = x ; then |
if test "x${TOOLSDIR}" = x ; then |
2138 |
TOOLSDIR="$ROOTDIR/tools" |
TOOLSDIR="$ROOTDIR/tools" |
2139 |
|
TOOLSDIRMK='$(ROOTDIR)'"/tools" |
2140 |
|
else |
2141 |
|
TOOLSDIRMK=${TOOLSDIR} |
2142 |
fi |
fi |
2143 |
if test ! -d ${TOOLSDIR} ; then |
if test ! -d ${TOOLSDIR} ; then |
2144 |
echo "Error: the specified TOOLSDIR (\"$TOOLSDIR\") does not exist!" |
echo "Error: the specified TOOLSDIR (\"$TOOLSDIR\") does not exist!" |
2301 |
fi |
fi |
2302 |
|
|
2303 |
echo " applying DISABLE settings" |
echo " applying DISABLE settings" |
2304 |
echo "" > ./.tmp_pack |
echo "" > $TMP.pack |
2305 |
for i in $PACKAGES ; do |
for i in $PACKAGES ; do |
2306 |
echo $i >> ./.tmp_pack |
echo $i >> $TMP.pack |
2307 |
done |
done |
2308 |
for i in `grep "-" ./.tmp_pack` ; do |
for i in `grep "-" $TMP.pack` ; do |
2309 |
j=`echo $i | sed 's/[-]//'` |
j=`echo $i | sed 's/[-]//'` |
2310 |
DISABLE="$DISABLE $j" |
DISABLE="$DISABLE $j" |
2311 |
done |
done |
2323 |
done |
done |
2324 |
PACKAGES="$pack" |
PACKAGES="$pack" |
2325 |
echo " applying ENABLE settings" |
echo " applying ENABLE settings" |
2326 |
echo "" > ./.tmp_pack |
echo "" > $TMP.pack |
2327 |
PACKAGES="$PACKAGES $ENABLE" |
PACKAGES="$PACKAGES $ENABLE" |
2328 |
# Test if each explicitly referenced package exists |
# Test if each explicitly referenced package exists |
2329 |
for i in $PACKAGES ; do |
for i in $PACKAGES ; do |
2332 |
echo "Error: dir '$ROOTDIR/pkg/$i' missing for package '$i'" |
echo "Error: dir '$ROOTDIR/pkg/$i' missing for package '$i'" |
2333 |
exit 1 |
exit 1 |
2334 |
fi |
fi |
2335 |
echo $i >> ./.tmp_pack |
echo $i >> $TMP.pack |
2336 |
done |
done |
2337 |
PACKAGES= |
PACKAGES= |
2338 |
for i in `grep -v "-" ./.tmp_pack | sort | uniq` ; do |
for i in `grep -v "-" $TMP.pack | sort | uniq` ; do |
2339 |
PACKAGES="$PACKAGES $i" |
PACKAGES="$PACKAGES $i" |
2340 |
done |
done |
2341 |
rm -f ./.tmp_pack |
rm -f $TMP.pack |
2342 |
echo " packages are: $PACKAGES" |
echo " packages are: $PACKAGES" |
2343 |
|
|
2344 |
# Check for package MNC: if NetCDF is available, then build the MNC |
# Check for package MNC: if NetCDF is available, then build the MNC |
2408 |
fi |
fi |
2409 |
fi |
fi |
2410 |
|
|
2411 |
# Check for package RADTRANS: if LAPACK is not available, |
# Make sure the openad package is enabled if using OpenAD |
2412 |
# then issue a warning that the direct radtrans solver is not available. |
if test "x$OPENAD" != x ; then |
2413 |
if test "x$HAVE_LAPACK" != xt ; then |
echo " $PACKAGES " | grep ' openad ' > /dev/null 2>&1 |
|
echo " $PACKAGES " | grep ' radtrans ' > /dev/null 2>&1 |
|
2414 |
RETVAL=$? |
RETVAL=$? |
2415 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" != x0 ; then |
2416 |
cat <<EOF |
cat <<EOF |
|
********************************************************************* |
|
|
WARNING: the "radtrans" package was enabled but tests failed to |
|
|
compile LAPACK applications. This means that the direct radtrans |
|
|
solver is not available and compilation will fail if it is enabled. |
|
|
If you want to use the direct solver, please check that: |
|
2417 |
|
|
|
1) LAPACK is correctly installed for this compiler and |
|
|
2) the LIBS variable (within the "optfile") specifies the correct |
|
|
LAPACK library to link against. |
|
2418 |
********************************************************************* |
********************************************************************* |
2419 |
|
ERROR: when generating an adjoint with OpenAD, the openad package |
2420 |
|
must be enabled. Please add it to packages.conf. |
2421 |
|
********************************************************************* |
2422 |
|
|
2423 |
EOF |
EOF |
2424 |
|
exit 1 |
2425 |
fi |
fi |
2426 |
fi |
fi |
2427 |
|
|
2504 |
fi |
fi |
2505 |
for i in $PACKAGES ; do |
for i in $PACKAGES ; do |
2506 |
adr="$ROOTDIR/pkg/$i" |
adr="$ROOTDIR/pkg/$i" |
2507 |
|
adrmk='$(ROOTDIR)'"/pkg/$i" |
2508 |
if test -d $adr ; then |
if test -d $adr ; then |
2509 |
SOURCEDIRS="$SOURCEDIRS $adr" |
SOURCEDIRS="$SOURCEDIRS $adr" |
2510 |
INCLUDEDIRS="$INCLUDEDIRS $adr" |
INCLUDEDIRS="$INCLUDEDIRS $adr" |
2511 |
|
SOURCEDIRSMK="$SOURCEDIRSMK $adrmk" |
2512 |
|
INCLUDEDIRSMK="$INCLUDEDIRSMK $adrmk" |
2513 |
if test "x$i" = xautodiff ; then |
if test "x$i" = xautodiff ; then |
2514 |
AUTODIFF_PKG_USED=t |
AUTODIFF_PKG_USED=t |
2515 |
fi |
fi |
2565 |
if test "x$STANDARDDIRS" != x ; then |
if test "x$STANDARDDIRS" != x ; then |
2566 |
for d in $STANDARDDIRS ; do |
for d in $STANDARDDIRS ; do |
2567 |
adr="$ROOTDIR/$d/src" |
adr="$ROOTDIR/$d/src" |
2568 |
|
adrmk='$(ROOTDIR)/'"$d/src" |
2569 |
if test ! -d $adr ; then |
if test ! -d $adr ; then |
2570 |
echo "Error: directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\"" |
echo "Error: directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\"" |
2571 |
echo " is correct and that you correctly specified the STANDARDDIRS option" |
echo " is correct and that you correctly specified the STANDARDDIRS option" |
2572 |
exit 1 |
exit 1 |
2573 |
else |
else |
2574 |
SOURCEDIRS="$SOURCEDIRS $adr" |
SOURCEDIRS="$SOURCEDIRS $adr" |
2575 |
|
SOURCEDIRSMK="$SOURCEDIRSMK $adrmk" |
2576 |
fi |
fi |
2577 |
adr="$ROOTDIR/$d/inc" |
adr="$ROOTDIR/$d/inc" |
2578 |
|
adrmk='$(ROOTDIR)/'"$d/inc" |
2579 |
if test ! -d $adr ; then |
if test ! -d $adr ; then |
2580 |
echo "Error: directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\"" |
echo "Error: directory $adr not found -- please check that ROOTDIR=\"$ROOTDIR\"" |
2581 |
echo " is correct and that you correctly specified the STANDARDDIRS option" |
echo " is correct and that you correctly specified the STANDARDDIRS option" |
2582 |
exit 1 |
exit 1 |
2583 |
else |
else |
2584 |
INCLUDEDIRS="$INCLUDEDIRS $adr" |
INCLUDEDIRS="$INCLUDEDIRS $adr" |
2585 |
|
INCLUDEDIRSMK="$INCLUDEDIRSMK $adrmk" |
2586 |
fi |
fi |
2587 |
done |
done |
2588 |
fi |
fi |
2620 |
|
|
2621 |
# Here, we build the list of files to be "run through" the adjoint |
# Here, we build the list of files to be "run through" the adjoint |
2622 |
# compiler. |
# compiler. |
2623 |
if test -f ./adSrcFiles.tmp ; then |
if test -f $TMP.adSrcFiles ; then |
2624 |
rm -f ./adSrcFiles.tmp |
rm -f $TMP.adSrcFiles |
2625 |
fi |
fi |
2626 |
echo " Creating the list of files for the adjoint compiler." |
echo " Creating the list of files for the adjoint compiler." |
2627 |
touch adSrcFiles.tmp |
touch $TMP.adSrcFiles |
2628 |
for i in $SOURCEDIRS ; do |
for i in $SOURCEDIRS ; do |
2629 |
list_files=`( cd $i && ls -1 *.list 2>/dev/null )` |
list_files=`( cd $i && ls -1 *.list 2>/dev/null )` |
2630 |
for j in $list_files ; do |
for j in $list_files ; do |
2631 |
cat $i/$j >> adSrcFiles.tmp |
cat $i/$j >> $TMP.adSrcFiles |
2632 |
done |
done |
2633 |
done |
done |
2634 |
if test ! "x"$FS = "x.f" ; then |
if test ! "x"$FS = "x.f" ; then |
2635 |
cat adSrcFiles.tmp | sed -e "s/\.f/.$FS/g" > adSrcFiles.tmp_f |
cat $TMP.adSrcFiles | sed -e "s/\.f/.$FS/g" > $TMP.adSrcFiles_f |
2636 |
mv -f adSrcFiles.tmp_f adSrcFiles.tmp |
mv -f $TMP.adSrcFiles_f $TMP.adSrcFiles |
2637 |
fi |
fi |
2638 |
|
|
2639 |
echo |
echo |
2655 |
fi |
fi |
2656 |
|
|
2657 |
echo " Determining the list of source and include files" |
echo " Determining the list of source and include files" |
2658 |
rm -rf .links.tmp |
rm -rf $TMP.links |
2659 |
mkdir .links.tmp |
mkdir $TMP.links |
2660 |
touch .links.tmp/foo |
touch $TMP.links/foo |
2661 |
if test ! -r ".links.tmp/foo" ; then |
if test ! -r "$TMP.links/foo" ; then |
2662 |
echo |
echo |
2663 |
echo "ERROR : something is wrong with your directory permissions or" |
echo "ERROR : something is wrong with your directory permissions or" |
2664 |
echo " your user file-creation mask (\"umask\") since creating a" |
echo " your user file-creation mask (\"umask\") since creating a" |
2674 |
echo |
echo |
2675 |
exit 1 |
exit 1 |
2676 |
fi |
fi |
2677 |
rm -f .links.tmp/foo |
rm -f $TMP.links/foo |
2678 |
|
|
2679 |
if test "x$OPENAD" != x ; then |
if test "x$OPENAD" != x ; then |
2680 |
OAD_DONT_COMPILE="/dev/null" |
OAD_DONT_COMPILE="/dev/null" |
2682 |
OAD_KEEP_ORIGINAL="/dev/null" |
OAD_KEEP_ORIGINAL="/dev/null" |
2683 |
OAD_CB2M_FILES="/dev/null" |
OAD_CB2M_FILES="/dev/null" |
2684 |
OADTOOLS="$TOOLSDIR/OAD_support" |
OADTOOLS="$TOOLSDIR/OAD_support" |
2685 |
|
OADTOOLSMK='$(TOOLSDIR)/OAD_support' |
2686 |
echo " looking for dontCompile file: " |
echo " looking for dontCompile file: " |
2687 |
for i in "." $MODS ; do |
for i in "." $MODS $OADTOOLS ; do |
2688 |
if test -r $i"/dontCompile" ; then |
if test -r $i"/dontCompile" ; then |
2689 |
OAD_DONT_COMPILE=$i"/dontCompile" |
OAD_DONT_COMPILE=$i"/dontCompile" |
2690 |
echo " found $OAD_DONT_COMPILE" |
echo " found $OAD_DONT_COMPILE" |
2692 |
fi |
fi |
2693 |
done |
done |
2694 |
echo " looking for dontTransform file: " |
echo " looking for dontTransform file: " |
2695 |
for i in "." $MODS ; do |
for i in "." $MODS $OADTOOLS ; do |
2696 |
if test -r $i"/dontTransform" ; then |
if test -r $i"/dontTransform" ; then |
2697 |
OAD_DONT_TRANSFORM=$i"/dontTransform" |
OAD_DONT_TRANSFORM=$i"/dontTransform" |
2698 |
echo " found $OAD_DONT_TRANSFORM" |
echo " found $OAD_DONT_TRANSFORM" |
2700 |
fi |
fi |
2701 |
done |
done |
2702 |
echo " looking for keepOriginal file: " |
echo " looking for keepOriginal file: " |
2703 |
for i in "." $MODS ; do |
for i in "." $MODS $OADTOOLS ; do |
2704 |
if test -r $i"/keepOriginal" ; then |
if test -r $i"/keepOriginal" ; then |
2705 |
OAD_KEEP_ORIGINAL=$i"/keepOriginal" |
OAD_KEEP_ORIGINAL=$i"/keepOriginal" |
2706 |
echo " found $OAD_KEEP_ORIGINAL" |
echo " found $OAD_KEEP_ORIGINAL" |
2708 |
fi |
fi |
2709 |
done |
done |
2710 |
echo " looking for cb2mFiles: " |
echo " looking for cb2mFiles: " |
2711 |
for i in "." $MODS ; do |
for i in "." $MODS $OADTOOLS ; do |
2712 |
if test -r $i"/cb2mFiles" ; then |
if test -r $i"/cb2mFiles" ; then |
2713 |
OAD_CB2M_FILES=$i"/cb2mFiles" |
OAD_CB2M_FILES=$i"/cb2mFiles" |
2714 |
echo " found $OAD_CB2M_FILES" |
echo " found $OAD_CB2M_FILES" |
2718 |
echo " OpenAD exceptions: " |
echo " OpenAD exceptions: " |
2719 |
fi |
fi |
2720 |
|
|
2721 |
echo "# This section creates symbolic links" > srclinks.tmp |
echo "# This section creates symbolic links" > $TMP.srclinks |
2722 |
echo "" >> srclinks.tmp |
echo "" >> $TMP.srclinks |
2723 |
printf 'F77_SRC_FILES = ' > F77srclist.tmp |
printf 'F77_SRC_FILES = ' > $TMP.F77srclist |
2724 |
printf 'NON_AD_F77_SRC_FILES = ' > nonADF77srclist.tmp |
printf 'NON_AD_F77_SRC_FILES = ' > $TMP.nonADF77srclist |
2725 |
printf 'C_SRC_FILES = ' > csrclist.tmp |
printf 'C_SRC_FILES = ' > $TMP.csrclist |
2726 |
printf 'F90_SRC_FILES = ' > F90srclist.tmp |
printf 'F90_SRC_FILES = ' > $TMP.F90srclist |
2727 |
printf 'H_SRC_FILES = ' > hsrclist.tmp |
printf 'H_SRC_FILES = ' > $TMP.hsrclist |
2728 |
printf 'AD_FLOW_FILES = ' > ad_flow_files.tmp |
printf 'AD_FLOW_FILES = ' > $TMP.ad_flow_files |
2729 |
alldirs="$SOURCEDIRS $INCLUDEDIRS ." |
alldirs="$SOURCEDIRS $INCLUDEDIRS ." |
2730 |
|
alldirsmk=(${SOURCEDIRSMK} ${INCLUDEDIRSMK} ".") |
2731 |
|
nd=0 |
2732 |
for d in $alldirs ; do |
for d in $alldirs ; do |
2733 |
|
dmk=${alldirsmk[${nd}]} |
2734 |
|
nd=$((${nd}+1)) |
2735 |
deplist= |
deplist= |
2736 |
sfiles=`( cd $d; echo *.[h,c,F] *.flow )` |
sfiles=`( cd $d; echo *.[h,c,F] *.flow )` |
2737 |
sfiles=`( echo $sfiles; cd $d; echo *.F90 )` |
sfiles=`( echo $sfiles; cd $d; echo *.F90 )` |
2739 |
sfiles=`( echo $sfiles | grep -v _cb2m\. )` |
sfiles=`( echo $sfiles | grep -v _cb2m\. )` |
2740 |
fi |
fi |
2741 |
for sf in $sfiles ; do |
for sf in $sfiles ; do |
2742 |
if test ! -r ".links.tmp/$sf" ; then |
if test ! -r "$TMP.links/$sf" ; then |
2743 |
if test -f "$d/$sf" ; then |
if test -f "$d/$sf" ; then |
2744 |
ignore_f=f |
ignore_f=f |
2745 |
case $d/$sf in |
case $d/$sf in |
2764 |
if test "x$HAVE_TEST_L" = xt -a "x$d" = x. -a -L $sf ; then |
if test "x$HAVE_TEST_L" = xt -a "x$d" = x. -a -L $sf ; then |
2765 |
ignore_f=t |
ignore_f=t |
2766 |
else |
else |
2767 |
touch .links.tmp/$sf |
touch $TMP.links/$sf |
2768 |
deplist="$deplist $sf" |
deplist="$deplist $sf" |
2769 |
fi |
fi |
2770 |
;; |
;; |
2773 |
extn=`echo $sf | $AWK -F. '{print $NF}'` |
extn=`echo $sf | $AWK -F. '{print $NF}'` |
2774 |
case $extn in |
case $extn in |
2775 |
F) |
F) |
2776 |
echo " \\" >> F77srclist.tmp |
echo " \\" >> $TMP.F77srclist |
2777 |
printf " $sf" >> F77srclist.tmp |
printf " $sf" >> $TMP.F77srclist |
2778 |
if test "x$OPENAD" = x ; then |
if test "x$OPENAD" = x ; then |
2779 |
basename=${sf%%.F} |
basename=${sf%%.F} |
2780 |
isAD=`egrep ^$basename.f'[ ]*' adSrcFiles.tmp` |
isAD=`egrep ^$basename.f'[ ]*' $TMP.adSrcFiles` |
2781 |
if test -z "$isAD" ; then |
if test -z "$isAD" ; then |
2782 |
echo " \\" >> nonADF77srclist.tmp |
echo " \\" >> $TMP.nonADF77srclist |
2783 |
printf " $sf" >> nonADF77srclist.tmp |
printf " $sf" >> $TMP.nonADF77srclist |
2784 |
fi |
fi |
2785 |
else #- OpenAD case: |
else #- OpenAD case: |
2786 |
basename=${sf%%.F} |
basename=${sf%%.F} |
2787 |
isAD=`egrep ^$basename.f'[ ]*' adSrcFiles.tmp` |
isAD=`egrep ^$basename.f'[ ]*' $TMP.adSrcFiles` |
2788 |
if test -z "$isAD" ; then |
if test -z "$isAD" ; then |
2789 |
toBeIgnored=`egrep ^$basename'[ ]*' ${OAD_DONT_COMPILE}` |
toBeIgnored=`egrep ^$basename'[ ]*' ${OAD_DONT_COMPILE}` |
2790 |
if test -z "$toBeIgnored" ; then |
if test -z "$toBeIgnored" ; then |
2791 |
echo " \\" >> nonADF77srclist.tmp |
echo " \\" >> $TMP.nonADF77srclist |
2792 |
printf " $sf" >> nonADF77srclist.tmp |
printf " $sf" >> $TMP.nonADF77srclist |
2793 |
else |
else |
2794 |
echo " not to be compiled : $sf" |
echo " not to be compiled : $sf" |
2795 |
fi |
fi |
2804 |
echo " original to be kept : $sf" |
echo " original to be kept : $sf" |
2805 |
fi |
fi |
2806 |
if test -n "$notToBeTransformed" -o -n "$untransformedVersionToBeKept" ; then |
if test -n "$notToBeTransformed" -o -n "$untransformedVersionToBeKept" ; then |
2807 |
echo " \\" >> nonADF77srclist.tmp |
echo " \\" >> $TMP.nonADF77srclist |
2808 |
printf " $sf" >> nonADF77srclist.tmp |
printf " $sf" >> $TMP.nonADF77srclist |
2809 |
fi |
fi |
2810 |
fi |
fi |
2811 |
fi |
fi |
2812 |
;; |
;; |
2813 |
F90) |
F90) |
2814 |
echo " \\" >> F90srclist.tmp |
echo " \\" >> $TMP.F90srclist |
2815 |
printf " $sf" >> F90srclist.tmp |
printf " $sf" >> $TMP.F90srclist |
2816 |
;; |
;; |
2817 |
c) |
c) |
2818 |
echo " \\" >> csrclist.tmp |
echo " \\" >> $TMP.csrclist |
2819 |
printf " $sf" >> csrclist.tmp |
printf " $sf" >> $TMP.csrclist |
2820 |
;; |
;; |
2821 |
h) |
h) |
2822 |
echo " \\" >> hsrclist.tmp |
echo " \\" >> $TMP.hsrclist |
2823 |
printf " $sf" >> hsrclist.tmp |
printf " $sf" >> $TMP.hsrclist |
2824 |
;; |
;; |
2825 |
flow) |
flow) |
2826 |
echo " \\" >> ad_flow_files.tmp |
echo " \\" >> $TMP.ad_flow_files |
2827 |
printf " $sf" >> ad_flow_files.tmp |
printf " $sf" >> $TMP.ad_flow_files |
2828 |
;; |
;; |
2829 |
esac |
esac |
2830 |
fi |
fi |
2833 |
done |
done |
2834 |
if test "x$deplist" != x ; then |
if test "x$deplist" != x ; then |
2835 |
if test "$d" != "." ; then |
if test "$d" != "." ; then |
2836 |
echo "" >> srclinks.tmp |
echo "" >> $TMP.srclinks |
2837 |
echo "# These files are linked from $d" >> srclinks.tmp |
echo "# These files are linked from $dmk ( aka $d )" >> $TMP.srclinks |
2838 |
echo "$deplist :" >> srclinks.tmp |
echo "$deplist :" >> $TMP.srclinks |
2839 |
# We need to make sure that the link isn't already there. |
# We need to make sure that the link isn't already there. |
2840 |
# This may happen when make thinks that a header file has to be "remade" |
# This may happen when make thinks that a header file has to be "remade" |
2841 |
# because a module it depends on has changed. In this case we do nothing. |
# because a module it depends on has changed. In this case we do nothing. |
2842 |
printf "\tif [ ! -L \$@ ]; then \$(LN) %s/\$@ \$@; fi\n" $d >> srclinks.tmp |
printf "\tif [ ! -L \$@ ]; then \$(LN) %s/\$@ \$@; fi\n" $dmk >> $TMP.srclinks |
2843 |
fi |
fi |
2844 |
fi |
fi |
2845 |
done |
done |
2846 |
rm -rf .links.tmp |
rm -rf $TMP.links |
2847 |
echo "" >> F77srclist.tmp |
echo "" >> $TMP.F77srclist |
2848 |
echo "" >> nonADF77srclist.tmp |
echo "" >> $TMP.nonADF77srclist |
2849 |
echo "" >> csrclist.tmp |
echo "" >> $TMP.csrclist |
2850 |
echo "" >> F90srclist.tmp |
echo "" >> $TMP.F90srclist |
2851 |
echo "" >> hsrclist.tmp |
echo "" >> $TMP.hsrclist |
2852 |
echo "" >> ad_flow_files.tmp |
echo "" >> $TMP.ad_flow_files |
2853 |
|
|
2854 |
CMDLINE=$0 |
CMDLINE=$0 |
2855 |
for xx in "$@" ; do nw=`echo $xx | wc -w` |
for xx in "$@" ; do nw=`echo $xx | wc -w` |
2896 |
|
|
2897 |
ROOTDIR = ${ROOTDIR} |
ROOTDIR = ${ROOTDIR} |
2898 |
BUILDDIR = ${BUILDDIR} |
BUILDDIR = ${BUILDDIR} |
2899 |
SOURCEDIRS = ${SOURCEDIRS} |
SOURCEDIRS = ${SOURCEDIRSMK} |
2900 |
INCLUDEDIRS = ${INCLUDEDIRS} |
INCLUDEDIRS = ${INCLUDEDIRSMK} |
2901 |
EXEDIR = ${EXEDIR} |
EXEDIR = ${EXEDIR} |
2902 |
EXECUTABLE = \$(EXEDIR)/${EXECUTABLE} |
EXECUTABLE = \$(EXEDIR)/${EXECUTABLE} |
2903 |
TOOLSDIR = ${TOOLSDIR} |
TOOLSDIR = ${TOOLSDIRMK} |
2904 |
OADTOOLS = ${OADTOOLS} |
OADTOOLS = ${OADTOOLSMK} |
2905 |
|
|
2906 |
#eh3 new defines for the adjoint work |
#eh3 new defines for the adjoint work |
2907 |
AUTODIFF = ${ROOTDIR}/pkg/autodiff |
AUTODIFF = \$(ROOTDIR)/pkg/autodiff |
2908 |
EXE_AD = ${EXE_AD} |
EXE_AD = ${EXE_AD} |
2909 |
EXE_FTL = ${EXE_FTL} |
EXE_FTL = ${EXE_FTL} |
2910 |
EXE_SVD = ${EXE_SVD} |
EXE_SVD = ${EXE_SVD} |
2951 |
KFLAGS1 = ${KFLAGS1} |
KFLAGS1 = ${KFLAGS1} |
2952 |
KFLAGS2 = ${KFLAGS2} |
KFLAGS2 = ${KFLAGS2} |
2953 |
# Optim./debug for FC |
# Optim./debug for FC |
2954 |
FFLAGS = ${FFLAGS} ${FEXTRAFLAGS} |
FFLAGS = ${FFLAGS} |
2955 |
FOPTIM = ${FOPTIM} |
FOPTIM = ${FOPTIM} ${FEXTRAFLAGS} |
2956 |
# Optim./debug for FC |
# Optim./debug for FC |
2957 |
F90FLAGS = ${F90FLAGS} |
F90FLAGS = ${F90FLAGS} |
2958 |
F90OPTIM = ${F90OPTIM} |
F90OPTIM = ${F90OPTIM} |
2971 |
|
|
2972 |
EOF |
EOF |
2973 |
|
|
2974 |
cat F77srclist.tmp >> $MAKEFILE |
cat $TMP.F77srclist >> $MAKEFILE |
2975 |
cat nonADF77srclist.tmp >> $MAKEFILE |
cat $TMP.nonADF77srclist >> $MAKEFILE |
2976 |
cat csrclist.tmp >> $MAKEFILE |
cat $TMP.csrclist >> $MAKEFILE |
2977 |
cat F90srclist.tmp >> $MAKEFILE |
cat $TMP.F90srclist >> $MAKEFILE |
2978 |
cat hsrclist.tmp >> $MAKEFILE |
cat $TMP.hsrclist >> $MAKEFILE |
2979 |
cat ad_flow_files.tmp >> $MAKEFILE |
cat $TMP.ad_flow_files >> $MAKEFILE |
2980 |
|
|
2981 |
rm -f F77srclist.tmp nonADF77srclist.tmp csrclist.tmp F90srclist.tmp hsrclist.tmp ad_flow_files.tmp |
rm -f $TMP.F77srclist $TMP.nonADF77srclist $TMP.csrclist $TMP.F90srclist $TMP.hsrclist $TMP.ad_flow_files |
2982 |
|
|
2983 |
echo >> $MAKEFILE |
echo >> $MAKEFILE |
2984 |
|
|
3018 |
|
|
3019 |
lib: libmitgcmuv.a |
lib: libmitgcmuv.a |
3020 |
|
|
3021 |
libmitgcmuv.a: \$(OBJFILES) |
libmitgcmuv.a: \$(SPECIAL_FILES) \$(OBJFILES) |
3022 |
ar rcv libmitgcmuv.a \$(OBJFILES) |
ar rcv libmitgcmuv.a \$(OBJFILES) |
3023 |
ar d libmitgcmuv.a main.o |
ar d libmitgcmuv.a main.o |
3024 |
|
|
3028 |
|
|
3029 |
small_f: \$(F77_PP_SRC_FILES) \$(F90_PP_SRC_FILES) |
small_f: \$(F77_PP_SRC_FILES) \$(F90_PP_SRC_FILES) |
3030 |
|
|
|
output.txt: \$(EXECUTABLE) |
|
|
@printf 'running ... ' |
|
|
@\$(EXECUTABLE) > \$@ |
|
|
|
|
3031 |
# remove most of the files that "make" generates |
# remove most of the files that "make" generates |
3032 |
clean: |
clean: |
3033 |
-rm -rf *.p *.$FS90 *.mod ${RMFILES} work.{pc,pcl} *.template |
-rm -rf *.p *.$FS90 *.mod ${RMFILES} work.{pc,pcl} *.template |
3171 |
echo " Add the source list for AD code generation" |
echo " Add the source list for AD code generation" |
3172 |
echo >> $MAKEFILE |
echo >> $MAKEFILE |
3173 |
printf "AD_FILES = " >> $MAKEFILE |
printf "AD_FILES = " >> $MAKEFILE |
3174 |
AD_FILES=`cat adSrcFiles.tmp` |
AD_FILES=`cat $TMP.adSrcFiles` |
3175 |
for i in $AD_FILES ; do |
for i in $AD_FILES ; do |
3176 |
echo " \\" >> $MAKEFILE |
echo " \\" >> $MAKEFILE |
3177 |
printf " $i" >> $MAKEFILE |
printf " $i" >> $MAKEFILE |
3178 |
done |
done |
3179 |
echo >> $MAKEFILE |
echo >> $MAKEFILE |
3180 |
rm -f adSrcFiles.tmp |
rm -f $TMP.adSrcFiles |
3181 |
|
|
3182 |
|
if test $CAT_SRC_FOR_TAF = 0 ; then |
3183 |
|
cat >>$MAKEFILE <<EOF |
3184 |
|
|
3185 |
|
# ... Utilities ... |
3186 |
|
remove_comments: |
3187 |
|
sed -i.bak -f \$(TOOLSDIR)/remove_comments_sed \$(AD_FILES) |
3188 |
|
@-rm -f \$(AD_FILES:.$FS=.$FS.bak) |
3189 |
|
adj_sed: |
3190 |
|
sed -i.bak -f \$(TOOLSDIR)/adjoint_sed \$(AD_FILES:.$FS=_ad.$FS) |
3191 |
|
@-rm -f \$(AD_FILES:.$FS=_ad.$FS.bak) |
3192 |
|
ftl_sed: |
3193 |
|
sed -i.bak -f \$(TOOLSDIR)/adjoint_sed \$(AD_FILES:.$FS=_tl.$FS) |
3194 |
|
@-rm -f \$(AD_FILES:.$FS=_tl.$FS.bak) |
3195 |
|
adobjfiles: \$(AD_FILES:.$FS=_ad.o) |
3196 |
|
ftlobjfiles: \$(AD_FILES:.$FS=_tl.o) |
3197 |
|
EOF |
3198 |
|
fi |
3199 |
|
|
3200 |
cat >>$MAKEFILE <<EOF |
cat >>$MAKEFILE <<EOF |
3201 |
|
|
3219 |
@\$(MAKE) -f \$(MAKEFILE) \$(FLOWFILES) |
@\$(MAKE) -f \$(MAKEFILE) \$(FLOWFILES) |
3220 |
cat \$(FLOWFILES) \$(AD_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ad_input_code.$FS |
cat \$(FLOWFILES) \$(AD_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ad_input_code.$FS |
3221 |
|
|
3222 |
ad_taf_output.$FS: ad_input_code.$FS |
adtafonly: |
|
@-rm -f ad_input_code_ad.$FS |
|
3223 |
\$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS |
\$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS |
3224 |
ls -l ad_input_code_ad.$FS |
ls -l ad_input_code_ad.$FS |
3225 |
cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS |
cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS |
3226 |
|
|
3227 |
adtafonly: |
EOF |
3228 |
|
|
3229 |
|
if test $CAT_SRC_FOR_TAF = 1 ; then |
3230 |
|
cat >>$MAKEFILE <<EOF |
3231 |
|
# ... send 1 file to TAF ... |
3232 |
|
ad_taf_output.$FS: ad_input_code.$FS |
3233 |
|
@-rm -f ad_input_code_ad.$FS ; echo '' |
3234 |
\$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS |
\$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS |
3235 |
ls -l ad_input_code_ad.$FS |
ls -l ad_input_code_ad.$FS |
3236 |
cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS |
cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_taf_output.$FS |
3238 |
\$(EXE_AD): \$(SPECIAL_FILES) \$(H_SRC_FILES) ad_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(EMBEDDED_FILES) |
\$(EXE_AD): \$(SPECIAL_FILES) \$(H_SRC_FILES) ad_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(EMBEDDED_FILES) |
3239 |
\$(LINK) -o \${EXE_AD} \$(FFLAGS) \$(FOPTIM) ad_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(LIBS) |
\$(LINK) -o \${EXE_AD} \$(FFLAGS) \$(FOPTIM) ad_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(LIBS) |
3240 |
|
|
3241 |
ad_tamc_output.$FS: ad_input_code.$FS |
adobj: ad_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) |
|
\$(TAMC) \$(AD_TAMC_FLAGS) \$(TAMC_EXTRA) ad_input_code.$FS |
|
|
cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_tamc_output.$FS |
|
3242 |
|
|
3243 |
ad_tamc: ad_tamc_output.o \$(OBJFILES) |
EOF |
3244 |
\$(LINK) -o ${EXE_AD} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_tamc_output.o \$(LIBS) |
|
3245 |
|
else |
3246 |
|
cat >>$MAKEFILE <<EOF |
3247 |
|
# ... send multiple files to TAF ... |
3248 |
|
ad_taf_output.$FS: \$(AD_FLOW_FILES) \$(AD_FILES) |
3249 |
|
@$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Adjoint version" -bAD_CONFIG_H -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN > ad_config.template |
3250 |
|
cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h |
3251 |
|
@-rm -f ad_config.template |
3252 |
|
@\$(MAKE) -f \$(MAKEFILE) \$(F77_PP_SRC_FILES) |
3253 |
|
@\$(MAKE) -f \$(MAKEFILE) \$(FLOWFILES) |
3254 |
|
@-rm -f \$(AD_FILES:.$FS=_ad.$FS) \$(AD_FILES:.$FS=_ad.o); echo '' |
3255 |
|
\$(MAKE) -f \$(MAKEFILE) remove_comments |
3256 |
|
\$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) \$(FLOWFILES) \$(AD_FILES) |
3257 |
|
\$(MAKE) -f \$(MAKEFILE) adj_sed |
3258 |
|
cat \$(AD_FILES:.$FS=_ad.$FS) > ad_taf_output.$FS |
3259 |
|
|
3260 |
|
\$(EXE_AD): \$(SPECIAL_FILES) \$(H_SRC_FILES) ad_taf_output.$FS \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(EMBEDDED_FILES) |
3261 |
|
\$(MAKE) -f \$(MAKEFILE) adobjfiles |
3262 |
|
\$(LINK) -o \${EXE_AD} \$(FFLAGS) \$(FOPTIM) \$(AD_FILES:.$FS=_ad.o) \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(LIBS) |
3263 |
|
|
3264 |
|
adobj: ad_taf_output.$FS \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) |
3265 |
|
\$(MAKE) -f \$(MAKEFILE) adobjfiles |
3266 |
|
|
3267 |
|
EOF |
3268 |
|
fi |
3269 |
|
|
3270 |
|
cat >>$MAKEFILE <<EOF |
3271 |
adonlyfwd: |
adonlyfwd: |
3272 |
patch < \$(TOOLSDIR)/ad_taf_output.f.onlyfwd.diff |
patch < \$(TOOLSDIR)/ad_taf_output.f.onlyfwd.diff |
3273 |
|
|
3274 |
adtrick: |
adtrick: |
3275 |
patch < \$(TOOLSDIR)/ad_taf_output.f.adtrick.diff |
patch < \$(TOOLSDIR)/ad_taf_output.f.adtrick.diff |
3276 |
|
|
3277 |
adobj: ad_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) |
ad_tamc_output.$FS: ad_input_code.$FS |
3278 |
|
\$(TAMC) \$(AD_TAMC_FLAGS) \$(TAMC_EXTRA) ad_input_code.$FS |
3279 |
|
cat ad_input_code_ad.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ad_tamc_output.$FS |
3280 |
|
|
3281 |
|
ad_tamc: ad_tamc_output.o \$(OBJFILES) |
3282 |
|
\$(LINK) -o ${EXE_AD} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_tamc_output.o \$(LIBS) |
3283 |
|
|
3284 |
# ... FTL ... |
# ... FTL ... |
3285 |
ftlall: ftl_exe_target |
ftlall: ftl_exe_target |
3301 |
@\$(MAKE) -f \$(MAKEFILE) \$(AD_FLOW_FILES) |
@\$(MAKE) -f \$(MAKEFILE) \$(AD_FLOW_FILES) |
3302 |
cat \$(AD_FLOW_FILES) \$(AD_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ftl_input_code.$FS |
cat \$(AD_FLOW_FILES) \$(AD_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ftl_input_code.$FS |
3303 |
|
|
3304 |
ftl_taf_output.$FS: ftl_input_code.$FS |
ftltafonly: |
|
@-rm -f ftl_input_code_tl.$FS |
|
3305 |
\$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS |
\$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS |
3306 |
ls -l ftl_input_code_tl.$FS |
ls -l ftl_input_code_tl.$FS |
3307 |
cat ftl_input_code_tl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS |
cat ftl_input_code_tl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS |
3308 |
|
|
3309 |
ftltafonly: |
EOF |
3310 |
|
|
3311 |
|
if test $CAT_SRC_FOR_TAF = 1 ; then |
3312 |
|
cat >>$MAKEFILE <<EOF |
3313 |
|
# ... send 1 file to TAF ... |
3314 |
|
ftl_taf_output.$FS: ftl_input_code.$FS |
3315 |
|
@-rm -f ftl_input_code_tl.$FS ; echo '' |
3316 |
\$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS |
\$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS |
3317 |
ls -l ftl_input_code_tl.$FS |
ls -l ftl_input_code_tl.$FS |
3318 |
cat ftl_input_code_tl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS |
cat ftl_input_code_tl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS |
3320 |
\$(EXE_FTL): \$(SPECIAL_FILES) \$(H_SRC_FILES) ftl_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(EMBEDDED_FILES) |
\$(EXE_FTL): \$(SPECIAL_FILES) \$(H_SRC_FILES) ftl_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(EMBEDDED_FILES) |
3321 |
\$(LINK) -o \${EXE_FTL} \$(FFLAGS) \$(FOPTIM) ftl_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(LIBS) |
\$(LINK) -o \${EXE_FTL} \$(FFLAGS) \$(FOPTIM) ftl_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(LIBS) |
3322 |
|
|
3323 |
|
EOF |
3324 |
|
|
3325 |
|
else |
3326 |
|
cat >>$MAKEFILE <<EOF |
3327 |
|
# ... send multiple files to TAF ... |
3328 |
|
ftl_taf_output.$FS: \$(AD_FLOW_FILES) \$(AD_FILES) |
3329 |
|
@$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "TangLin version" -bAD_CONFIG_H -UALLOW_ADJOINT_RUN -DALLOW_TANGENTLINEAR_RUN > ad_config.template |
3330 |
|
cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h |
3331 |
|
@-rm -f ad_config.template |
3332 |
|
@\$(MAKE) -f \$(MAKEFILE) \$(F77_PP_SRC_FILES) |
3333 |
|
@\$(MAKE) -f \$(MAKEFILE) \$(AD_FLOW_FILES) |
3334 |
|
@-rm -f \$(AD_FILES:.$FS=_tl.$FS) \$(AD_FILES:.$FS=_tl.o); echo '' |
3335 |
|
\$(MAKE) -f \$(MAKEFILE) remove_comments |
3336 |
|
\$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) \$(AD_FLOW_FILES) \$(AD_FILES) |
3337 |
|
\$(MAKE) -f \$(MAKEFILE) ftl_sed |
3338 |
|
cat \$(AD_FILES:.$FS=_tl.$FS) > ftl_taf_output.$FS |
3339 |
|
|
3340 |
|
\$(EXE_FTL): \$(SPECIAL_FILES) \$(H_SRC_FILES) ftl_taf_output.$FS \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(EMBEDDED_FILES) |
3341 |
|
\$(MAKE) -f \$(MAKEFILE) ftlobjfiles |
3342 |
|
\$(LINK) -o \${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(AD_FILES:.$FS=_tl.o) \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o) \$(LIBS) |
3343 |
|
|
3344 |
|
EOF |
3345 |
|
fi |
3346 |
|
|
3347 |
|
cat >>$MAKEFILE <<EOF |
3348 |
ftl_tamc_output.$FS: ftl_input_code.$FS |
ftl_tamc_output.$FS: ftl_input_code.$FS |
3349 |
\$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.$FS |
\$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.$FS |
3350 |
cat ftl_input_code_ftl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_tamc_output.$FS |
cat ftl_input_code_ftl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_tamc_output.$FS |
3387 |
# ============ begin OpenAD specific section ============== |
# ============ begin OpenAD specific section ============== |
3388 |
|
|
3389 |
cat >>$MAKEFILE <<EOF |
cat >>$MAKEFILE <<EOF |
3390 |
|
# ... OpenAD ... |
3391 |
|
|
3392 |
# all the source files linked from the various locations: |
# all the source files linked from the various locations: |
3393 |
ALL_LINKED_FILES= \ |
ALL_LINKED_FILES= \ |
3427 |
echo " \\" >> $MAKEFILE |
echo " \\" >> $MAKEFILE |
3428 |
printf " ${i}_mod.f$FS90" >> $MAKEFILE |
printf " ${i}_mod.f$FS90" >> $MAKEFILE |
3429 |
done |
done |
3430 |
AD_FILES=`cat adSrcFiles.tmp` |
AD_FILES=`cat $TMP.adSrcFiles` |
3431 |
for i in $AD_FILES ; do |
for i in $AD_FILES ; do |
3432 |
basename=${i%%.f} |
basename=${i%%.f} |
3433 |
toBeIgnored=`egrep ^$basename'[ ]*' ${OAD_DONT_COMPILE} ${OAD_DONT_TRANSFORM}` |
toBeIgnored=`egrep ^$basename'[ ]*' ${OAD_DONT_COMPILE} ${OAD_DONT_TRANSFORM}` |
3437 |
fi |
fi |
3438 |
done |
done |
3439 |
echo >> $MAKEFILE |
echo >> $MAKEFILE |
3440 |
rm -f adSrcFiles.tmp |
rm -f $TMP.adSrcFiles |
3441 |
|
|
3442 |
cat >>$MAKEFILE <<EOF |
cat >>$MAKEFILE <<EOF |
3443 |
|
|
3444 |
adAll: \$(EXE_AD) |
adAll: ad_exe_target |
3445 |
.PHONY: adAll |
.PHONY: adAll |
3446 |
|
|
3447 |
|
ad_exe_target: |
3448 |
|
@echo Update AD_CONFIG.h and make \$(EXE_AD) |
3449 |
|
@$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Adjoint version" -bAD_CONFIG_H -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN > ad_config.template |
3450 |
|
@cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h |
3451 |
|
@-rm -f ad_config.template |
3452 |
|
\$(MAKE) -f \$(MAKEFILE) \$(EXE_AD) |
3453 |
|
|
3454 |
CB2M_F90_PP_SRC_FILES=\$(addsuffix _mod.f$FS90, \$(CB2M_F90_SRC_NAMES)) |
CB2M_F90_PP_SRC_FILES=\$(addsuffix _mod.f$FS90, \$(CB2M_F90_SRC_NAMES)) |
3455 |
|
|
3456 |
.PRECIOUS: \$(CB2M_F90_PP_SRC_FILES) \$(NON_AD_F77_SRC_FILES:.F=_cb2m.f$FS90) |
.PRECIOUS: \$(CB2M_F90_PP_SRC_FILES) \$(NON_AD_F77_SRC_FILES:.F=_cb2m.f$FS90) |
3467 |
OAD_cp.F90 \ |
OAD_cp.F90 \ |
3468 |
OAD_rev.F90 \ |
OAD_rev.F90 \ |
3469 |
OAD_tape.F90 \ |
OAD_tape.F90 \ |
3470 |
|
OAD_regular_cp.F90 \ |
3471 |
revolve.F90 |
revolve.F90 |
3472 |
|
|
3473 |
OPENAD_SUPPORT_C_SRC_FILES = \ |
OPENAD_SUPPORT_C_SRC_FILES = \ |
3494 |
\$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(AD_OBJ_FILES_S2) \$(LIBS) |
\$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(AD_OBJ_FILES_S2) \$(LIBS) |
3495 |
|
|
3496 |
# create sources files modules from header files containing common blocks |
# create sources files modules from header files containing common blocks |
3497 |
%_mod.FF90 : %.h \${OADTOOLS}/cb2mGetModules.csh \${OADTOOLS}/cb2mGetModules.awk |
%_mod.FF90 : %.h \$(OADTOOLS)/cb2mGetModules.csh \$(OADTOOLS)/cb2mGetModules.awk |
3498 |
\${OADTOOLS}/cb2mGetModules.csh $< \${OADTOOLS}/cb2mGetModules.awk |
\$(OADTOOLS)/cb2mGetModules.csh $< \$(OADTOOLS)/cb2mGetModules.awk |
3499 |
|
|
3500 |
# create new header files with USE statements for the new modules made above |
# create new header files with USE statements for the new modules made above |
3501 |
%_mod.h : %.h \${OADTOOLS}/cb2mGetHeaders.csh \${OADTOOLS}/cb2mGetHeaders.awk |
%_mod.h : %.h \$(OADTOOLS)/cb2mGetHeaders.csh \$(OADTOOLS)/cb2mGetHeaders.awk |
3502 |
\${OADTOOLS}/cb2mGetHeaders.csh $< \${OADTOOLS}/cb2mGetHeaders.awk \$(CB2M_F90_SRC_NAMES) |
\$(OADTOOLS)/cb2mGetHeaders.csh $< \$(OADTOOLS)/cb2mGetHeaders.awk \$(CB2M_F90_SRC_NAMES) |
3503 |
|
|
3504 |
# change the include directives of everybody to refer to the new header files with the USE statements |
# change the include directives of everybody to refer to the new header files with the USE statements |
3505 |
%_cb2m.FF90 : %.F \${OADTOOLS}/cb2mUseModules.bash |
%_cb2m.FF90 : %.F \$(OADTOOLS)/cb2mUseModules.bash |
3506 |
\${OADTOOLS}/cb2mUseModules.bash $< ${MPI} |
\$(OADTOOLS)/cb2mUseModules.bash $< ${MPI} |
3507 |
|
|
3508 |
# makefile debug rule |
# makefile debug rule |
3509 |
small_f: \$(CB2M_F90_PP_SRC_FILES) |
small_f: \$(CB2M_F90_PP_SRC_FILES) |
3510 |
.PHONY: small_f |
.PHONY: small_f |
3511 |
|
|
|
ad_output.txt: \$(EXE_AD) |
|
|
@printf 'linking data files ... ' |
|
|
\$(LN) -f ../input_ad/data* ../input_ad/eedata . |
|
|
\$(LN) -f ../../global_ocean.90x40x15/input/*.bin . |
|
|
@printf 'running ... ' |
|
|
@./\$(EXE_AD) > \$@ |
|
|
|
|
3512 |
ad_input_code.f$FS90: \$(CB2M_AD_FILES) |
ad_input_code.f$FS90: \$(CB2M_AD_FILES) |
3513 |
cat \$^ > \$@ |
cat \$^ > \$@ |
3514 |
|
|
3518 |
|
|
3519 |
# replace stop statements (to avoid the implied unstructured control flow) with print statements |
# replace stop statements (to avoid the implied unstructured control flow) with print statements |
3520 |
ad_input_code_sf.pre.s2p.f90 : ad_input_code_sf.pre.f90 |
ad_input_code_sf.pre.s2p.f90 : ad_input_code_sf.pre.f90 |
3521 |
cat \$< | sed -f \${OADTOOLS}/stop2print.sed > ad_input_code_sf.pre.s2p.f90 |
cat \$< | sed -f \$(OADTOOLS)/stop2print.sed > ad_input_code_sf.pre.s2p.f90 |
3522 |
|
|
3523 |
# F -> WHIRL |
# F -> WHIRL |
3524 |
ad_input_code_sf.pre.s2p.B: ad_input_code_sf.pre.s2p.f90 |
ad_input_code_sf.pre.s2p.B: ad_input_code_sf.pre.s2p.f90 |
3541 |
\${OPEN64ROOT}/whirl2f/whirl2f -FLIST:ftn_file=\$@ -openad \$< |
\${OPEN64ROOT}/whirl2f/whirl2f -FLIST:ftn_file=\$@ -openad \$< |
3542 |
|
|
3543 |
# insert template directives |
# insert template directives |
3544 |
ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90: ad_input_code_sf.pre.s2p.xb.x2w.w2f.f$FS90 \${OADTOOLS}/insertTemplateDir.bash |
ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90: ad_input_code_sf.pre.s2p.xb.x2w.w2f.f$FS90 \$(OADTOOLS)/insertTemplateDir.bash |
3545 |
\${OADTOOLS}/insertTemplateDir.bash \$< \$@ |
\$(OADTOOLS)/insertTemplateDir.bash \$< \$@ |
3546 |
|
|
3547 |
PPEXTRAS=\$(notdir \$(wildcard \${OADTOOLS}/ad_template.*.F)) ad_inline.F |
PPEXTRAS=\$(notdir \$(wildcard \$(OADTOOLS)/ad_template.*.F)) ad_inline.F |
3548 |
# postprocess F' |
# postprocess F' |
3549 |
postProcess.tag: ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90 \$(PPEXTRAS:.F=.f) | w2f__types.f90 |
postProcess.tag: ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90 \$(PPEXTRAS:.F=.f) | w2f__types.f90 |
3550 |
\${OPENADFORTTK_BASE}/tools/SourceProcessing/postProcess.py --progress --timing --infoUnitFile w2f__types.f90 --outputFormat=fixed --separateOutput --pathSuffix "" --filenameSuffix "_oad" -m r -i ad_inline.f \$< |
\${OPENADFORTTK_BASE}/tools/SourceProcessing/postProcess.py --progress --timing --infoUnitFile w2f__types.f90 --outputFormat=fixed --separateOutput --pathSuffix "" --filenameSuffix "_oad" -m r -i ad_inline.f \$< |
3559 |
|
|
3560 |
# link the support files: |
# link the support files: |
3561 |
\$(OPENAD_SUPPORT_F90_SRC_FILES) \$(OPENAD_SUPPORT_C_SRC_FILES) \$(PPEXTRAS): |
\$(OPENAD_SUPPORT_F90_SRC_FILES) \$(OPENAD_SUPPORT_C_SRC_FILES) \$(PPEXTRAS): |
3562 |
\$(LN) \${OADTOOLS}/\$@ . |
\$(LN) \$(OADTOOLS)/\$@ . |
3563 |
|
|
3564 |
AD_CLEAN += *_mod.h *_mod.F90 *.FF90 *.mod-whirl temp.sed oad_cp.* postProcess.tag |
AD_CLEAN += *_mod.h *_mod.F90 *.FF90 *.mod-whirl temp.sed oad_cp.* postProcess.tag |
3565 |
|
|
3597 |
done |
done |
3598 |
|
|
3599 |
echo " Add rules for links" |
echo " Add rules for links" |
3600 |
cat srclinks.tmp >> $MAKEFILE |
cat $TMP.srclinks >> $MAKEFILE |
3601 |
rm -f srclinks.tmp |
rm -f $TMP.srclinks |
3602 |
|
|
3603 |
echo " Adding makedepend marker" |
echo " Adding makedepend marker" |
3604 |
printf "\n\n# DO NOT DELETE\n" >> $MAKEFILE |
printf "\n\n# DO NOT DELETE\n" >> $MAKEFILE |