/[MITgcm]/MITgcm/tools/genmake2
ViewVC logotype

Diff of /MITgcm/tools/genmake2

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.252 by jmc, Mon Jul 22 19:11:31 2013 UTC revision 1.265 by jmc, Fri Apr 4 21:34:01 2014 UTC
# Line 19  Usage: "$0" [OPTIONS] Line 19  Usage: "$0" [OPTIONS]
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      -adoptfile NAME | --adoptfile NAME | -adof NAME | --adof NAME      -adoptfile NAME | --adoptfile NAME | -adof NAME | --adof NAME
26        -adoptfile=NAME | --adoptfile=NAME | -adof=NAME | --adof=NAME        -adoptfile=NAME | --adoptfile=NAME | -adof=NAME | --adof=NAME
27            Use "NAME" as the adoptfile.  By default, the file at            Use "NAME" as the adoptfile.  By default, the file at
28              "tools/adjoint_options/adjoint_oad" (for OpenAD built) or
29            "tools/adjoint_options/adjoint_default" will be used.            "tools/adjoint_options/adjoint_default" will be used.
30    
31      -nooptfile | --nooptfile      -nooptfile | --nooptfile
# Line 208  test_for_string_in_file() { Line 212  test_for_string_in_file() {
212  expand_pkg_groups() {  expand_pkg_groups() {
213      new_packages=      new_packages=
214      if test -r $PKG_GROUPS ; then      if test -r $PKG_GROUPS ; then
215          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
216          cat ./p1.tmp | $AWK '(NF>2 && $2==":"){ print $0 }' > ./p2.tmp          cat $TMP.p1 | $AWK '(NF>2 && $2==":"){ print $0 }' > $TMP.p2
217          matched=0          matched=0
218          for i in $PACKAGES ; do          for i in $PACKAGES ; do
219              line=`grep "^ *$i" ./p2.tmp`              line=`grep "^ *$i" $TMP.p2`
220              RETVAL=$?              RETVAL=$?
221              if test "x$RETVAL" = x0 ; then              if test "x$RETVAL" = x0 ; then
222                  matched=1                  matched=1
# Line 224  expand_pkg_groups() { Line 228  expand_pkg_groups() {
228              fi              fi
229          done          done
230          PACKAGES=$new_packages          PACKAGES=$new_packages
231          rm -f ./p[1,2].tmp          rm -f $TMP.p[1,2]
232          return $matched          return $matched
233      else      else
234          echo "Warning: can't read package groups definition file: $PKG_GROUPS"          echo "Warning: can't read package groups definition file: $PKG_GROUPS"
# Line 607  EOF Line 611  EOF
611  mpi_headers_do_local_copy() {  mpi_headers_do_local_copy() {
612    
613      dBug=0      dBug=0
614      #----- check for additional headers (chain of included headers)      rm -rf ./mpi_headers
615      listIni=$MPI_HEADER_FILES      if test -d $MPIINCLUDEDIR ; then
616      echo $listIni | grep "\<mpif.h\>" > /dev/null 2>&1  
617      outp=$?          #----- check for additional headers (chain of included headers)
618      #- always check mpif.h (the only mpi-header included in standard MITgcm code)          echo -n '  Check MPI headers ... '
619      if test $outp != 0 ; then listIni="mpif.h $listIni" ; fi          listIni=$MPI_HEADER_FILES
620      if test $dBug = 1 ; then echo "listIni='$listIni'" ; fi          echo $listIni | grep "\<mpif.h\>" > /dev/null 2>&1
621      doCheck=1 ; list2copy='' ; list2check=$listIni          outp=$?
622      while test $doCheck = 1 ; do          #- always check mpif.h (the only mpi-header included in standard MITgcm code)
623          newList=''          if test $outp != 0 ; then listIni="mpif.h $listIni" ; fi
624          for i in $list2check ; do          if test $dBug = 1 ; then echo "listIni='$listIni'" ; fi
625           if test -f $MPIINCLUDEDIR/$i ; then  
626              newInc=`grep '^ *include ' $MPIINCLUDEDIR/$i | \          doCheck=1 ; list2copy='' ; list2check=$listIni
627            while test $doCheck = 1 ; do
628              newList=''
629              for i in $list2check ; do
630                if test -f $MPIINCLUDEDIR/$i ; then
631                  newInc=`grep '^ *include ' $MPIINCLUDEDIR/$i | \
632                  sed -e 's/^ *include //' -e 's/\!.*$//' -e "s/'//g"  -e 's/\"//g'`                  sed -e 's/^ *include //' -e 's/\!.*$//' -e "s/'//g"  -e 's/\"//g'`
633             if test $dBug = 1 ; then echo -n "checking $i : newInc='$newInc'" ; fi                if test $dBug = 1 ; then echo -n "checking $i : newInc='$newInc'" ; fi
634             for j in $newInc ; do                for j in $newInc ; do
635               echo $listIni $list2copy $newList | grep "\<$j\>" > /dev/null 2>&1                  echo $listIni $list2copy $newList | grep "\<$j\>" > /dev/null 2>&1
636               outp=$?                  outp=$?
637               if test $outp != 0 ; then                  if test $outp != 0 ; then
638                  if test $dBug = 1 ; then echo -n " ; adding $j" ; fi                    if test $dBug = 1 ; then echo -n " ; adding $j" ; fi
639                  newList="$newList $j"                    newList="$newList $j"
640               fi                  fi
641             done                done
642             if test $dBug = 1 ; then echo "" ; fi                if test $dBug = 1 ; then echo "" ; fi
643           fi              fi
644              done
645              if test "x$newList" = x ; then doCheck=0
646              else list2check=$newList ; list2copy="$list2copy $newList"
647              fi
648          done          done
649          if test "x$newList" = x ; then doCheck=0          list2copy="$MPI_HEADER_FILES $list2copy"
650          else list2check=$newList ; list2copy="$list2copy $newList"          if test $dBug = 1 ; then echo "list2copy='$list2copy'" ; fi
651          fi  
652      done          #----- create local mpi_headers dir if we have files to copy
653      list2copy="$MPI_HEADER_FILES $list2copy"          mkListInc=`echo $list2copy | wc -w`
654      if test $dBug = 1 ; then echo "list2copy='$list2copy'" ; fi          if test $mkListInc != 0 ; then
655      #----- make local copy and update LOCAL_MPI_HEADERS (if not already set)            echo 'create local "./mpi_headers" dir'
656      mkListInc=0            mkdir -p ./mpi_headers
657      for i in $list2copy ; do            INCLUDES="-I./mpi_headers $INCLUDES"
658          if test -f $MPIINCLUDEDIR/$i ; then            mkListInc=1
659            fi
660            if test "x$LOCAL_MPI_HEADERS" != x ; then mkListInc=0 ; fi
661    
662            #----- make local copy and update LOCAL_MPI_HEADERS (if not already set)
663            for i in $list2copy ; do
664              if test -f $MPIINCLUDEDIR/$i ; then
665              cp -p $MPIINCLUDEDIR/$i ./mpi_headers              cp -p $MPIINCLUDEDIR/$i ./mpi_headers
666              if test $i = 'mpif.h' ; then              if test $i = 'mpif.h' ; then
667                  perl -i -pe 's/MPI_DISPLACEMENT_CURRENT=-1_8/MPI_DISPLACEMENT_CURRENT=-1/g' mpi_headers/mpif.h                  perl -i -pe 's/MPI_DISPLACEMENT_CURRENT=-1_8/MPI_DISPLACEMENT_CURRENT=-1/g' mpi_headers/mpif.h
668              fi              fi
669              if test $mkListInc = 1 ; then              if test $mkListInc = 2 ; then
670                  LOCAL_MPI_HEADERS="$LOCAL_MPI_HEADERS ./mpi_headers/$i"                  LOCAL_MPI_HEADERS="$LOCAL_MPI_HEADERS ./mpi_headers/$i"
671              fi              fi
672              if test "x$LOCAL_MPI_HEADERS" = x ; then              if test $mkListInc = 1 ; then
673                  LOCAL_MPI_HEADERS="./mpi_headers/$i" ; mkListInc=1                  LOCAL_MPI_HEADERS="./mpi_headers/$i" ; mkListInc=2
674              fi              fi
675          fi            fi
676      done          done
677        else
678            echo "WARNING: MPIINCLUDEDIR='$MPIINCLUDEDIR' is not a directory"
679            echo "WARNING: => skip checking for MPI headers (no ./mpi_headers dir)"
680    #       exit -1
681        fi
682  }  }
683    
684  #  Parse the package dependency information  #  Parse the package dependency information
# Line 1305  FS= Line 1329  FS=
1329  FS90=  FS90=
1330    
1331  AUTODIFF_PKG_USED=f  AUTODIFF_PKG_USED=f
1332    OPENAD=
1333  AD_OPTFILE=  AD_OPTFILE=
1334  TAF=  TAF=
1335  AD_TAF_FLAGS=  AD_TAF_FLAGS=
# Line 1331  gm_s3="FEXTRAFLAGS IEEE DEVEL GSL TS PAP Line 1356  gm_s3="FEXTRAFLAGS IEEE DEVEL GSL TS PAP
1356  gm_s4="LN S64 LINK PACKAGES INCLUDES FFLAGS FOPTIM"  gm_s4="LN S64 LINK PACKAGES INCLUDES FFLAGS FOPTIM"
1357  gm_s5="CFLAGS LIBS KPP KFLAGS1 KFLAGS2 KPPFILES NOOPTFILES NOOPTFLAGS"  gm_s5="CFLAGS LIBS KPP KFLAGS1 KFLAGS2 KPPFILES NOOPTFILES NOOPTFLAGS"
1358  gm_s6="PWD TOOLSDIR SOURCEDIRS INCLUDEDIRS EXEDIR EXECUTABLE EXEHOOK"  gm_s6="PWD TOOLSDIR SOURCEDIRS INCLUDEDIRS EXEDIR EXECUTABLE EXEHOOK"
1359  gm_s7="THISHOST THISUSER THISDATE THISVER MACHINE FC_NAMEMANGLE"  gm_s7="TMP THISHOST THISUSER THISDATE THISVER MACHINE FC_NAMEMANGLE"
1360  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"
1361    
1362  #  The following are all related to adjoint/tangent-linear stuff  #  The following are all related to adjoint/tangent-linear stuff
1363  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"
1364  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"
1365  gm_s12="TAF_EXTRA TAMC_EXTRA DIVA MPIINCLUDEDIR MPI_HEADER_FILES"  gm_s12="TAF_EXTRA TAMC_EXTRA DIVA MPIINCLUDEDIR MPI_HEADER_FILES"
1366    
# Line 1387  for ac_option in "$@" ; do Line 1412  for ac_option in "$@" ; do
1412          -optfile=* | --optfile=* | -of=* | --of=*)          -optfile=* | --optfile=* | -of=* | --of=*)
1413              OPTFILE=$ac_optarg ;;              OPTFILE=$ac_optarg ;;
1414    
1415            -oad | --oad)
1416                OPENAD="true" ;;
1417          -adoptfile | --adoptfile | -adof | --adof)          -adoptfile | --adoptfile | -adof | --adof)
1418              ac_prev=AD_OPTFILE ;;              ac_prev=AD_OPTFILE ;;
1419          -adoptfile=* | --adoptfile=* | -adof=* | --adof=*)          -adoptfile=* | --adoptfile=* | -adof=* | --adof=*)
# Line 1556  for ac_option in "$@" ; do Line 1583  for ac_option in "$@" ; do
1583    
1584  done  done
1585    
1586    #TMP=./genmk_$$
1587    #- try to put temporary files in system-local /tmp dir
1588    TMP=/tmp/genmk_$$
1589    touch $TMP ; retVal=$?
1590    if [ $retVal -eq 0 ] ; then
1591      if test ! -r $TMP ; then TMP=./genmk_$$ ; fi
1592    else
1593      TMP=./genmk_$$
1594    fi
1595    rm -f $TMP
1596    #echo "  temp files: $TMP.*"
1597    
1598  printf "  getting local config information:  "  printf "  getting local config information:  "
1599  if test -f $gm_local ; then  if test -f $gm_local ; then
1600      echo "using $gm_local"      echo "using $gm_local"
# Line 1648  fi Line 1687  fi
1687    
1688  echo "  getting AD_OPTFILE information:"  echo "  getting AD_OPTFILE information:"
1689  if test "x${AD_OPTFILE}" = x ; then  if test "x${AD_OPTFILE}" = x ; then
1690      if test "x$MITGCM_AD_OF" = x ; then      if test "x$MITGCM_AD_OF" != x ; then
1691            AD_OPTFILE=$MITGCM_AD_OF
1692        elif test "x$OPENAD" = x ; then
1693          AD_OPTFILE=$ROOTDIR/tools/adjoint_options/adjoint_default          AD_OPTFILE=$ROOTDIR/tools/adjoint_options/adjoint_default
1694      else      else
1695          AD_OPTFILE=$MITGCM_AD_OF          AD_OPTFILE=$ROOTDIR/tools/adjoint_options/adjoint_oad
1696      fi      fi
1697  fi  fi
1698  if test "x${AD_OPTFILE}" != xNONE ; then  if test "x${AD_OPTFILE}" != xNONE ; then
# Line 2217  if test "x${PKG_GROUPS}" != x ; then Line 2258  if test "x${PKG_GROUPS}" != x ; then
2258  fi  fi
2259    
2260  echo "  applying DISABLE settings"  echo "  applying DISABLE settings"
2261  echo "" > ./.tmp_pack  echo "" > $TMP.pack
2262  for i in $PACKAGES ; do  for i in $PACKAGES ; do
2263      echo $i >> ./.tmp_pack      echo $i >> $TMP.pack
2264  done  done
2265  for i in `grep  "-" ./.tmp_pack` ; do  for i in `grep  "-" $TMP.pack` ; do
2266      j=`echo $i | sed 's/[-]//'`      j=`echo $i | sed 's/[-]//'`
2267      DISABLE="$DISABLE $j"      DISABLE="$DISABLE $j"
2268  done  done
# Line 2239  for p in $PACKAGES ; do Line 2280  for p in $PACKAGES ; do
2280  done  done
2281  PACKAGES="$pack"  PACKAGES="$pack"
2282  echo "  applying ENABLE settings"  echo "  applying ENABLE settings"
2283  echo "" > ./.tmp_pack  echo "" > $TMP.pack
2284  PACKAGES="$PACKAGES $ENABLE"  PACKAGES="$PACKAGES $ENABLE"
2285  # Test if each explicitly referenced package exists  # Test if each explicitly referenced package exists
2286  for i in $PACKAGES ; do  for i in $PACKAGES ; do
# Line 2248  for i in $PACKAGES ; do Line 2289  for i in $PACKAGES ; do
2289          echo "Error: dir '$ROOTDIR/pkg/$i' missing for package '$i'"          echo "Error: dir '$ROOTDIR/pkg/$i' missing for package '$i'"
2290          exit 1          exit 1
2291      fi      fi
2292      echo $i >> ./.tmp_pack      echo $i >> $TMP.pack
2293  done  done
2294  PACKAGES=  PACKAGES=
2295  for i in `grep -v "-" ./.tmp_pack | sort | uniq` ; do  for i in `grep -v "-" $TMP.pack | sort | uniq` ; do
2296      PACKAGES="$PACKAGES $i"      PACKAGES="$PACKAGES $i"
2297  done  done
2298  rm -f ./.tmp_pack  rm -f $TMP.pack
2299  echo "    packages are: $PACKAGES"  echo "    packages are: $PACKAGES"
2300    
2301  #  Check for package MNC: if NetCDF is available, then build the MNC  #  Check for package MNC: if NetCDF is available, then build the MNC
# Line 2324  EOF Line 2365  EOF
2365      fi      fi
2366  fi  fi
2367    
2368  #  Check for package RADTRANS: if LAPACK is not available,  #  Make sure the openad package is enabled if using OpenAD
2369  #  then issue a warning that the direct radtrans solver is not available.  if test "x$OPENAD" != x ; then
2370  if test "x$HAVE_LAPACK" != xt ; then      echo " $PACKAGES " | grep ' openad ' > /dev/null 2>&1
     echo " $PACKAGES " | grep ' radtrans ' > /dev/null 2>&1  
2371      RETVAL=$?      RETVAL=$?
2372      if test "x$RETVAL" = x0 ; then      if test "x$RETVAL" != x0 ; then
2373          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:  
2374    
   1) LAPACK is correctly installed for this compiler and  
   2) the LIBS variable (within the "optfile") specifies the correct  
      LAPACK library to link against.  
2375  *********************************************************************  *********************************************************************
2376    ERROR: when generating an adjoint with OpenAD, the openad package
2377      must be enabled.  Please add it to packages.conf.
2378    *********************************************************************
2379    
2380  EOF  EOF
2381            exit 1
2382      fi      fi
2383  fi  fi
2384    
# Line 2533  fi Line 2570  fi
2570    
2571  #  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
2572  #  compiler.  #  compiler.
2573  if test -f ./adSrcFiles.tmp ; then  if test -f $TMP.adSrcFiles ; then
2574      rm -f ./adSrcFiles.tmp      rm -f $TMP.adSrcFiles
2575  fi  fi
2576  echo "  Creating the list of files for the adjoint compiler."  echo "  Creating the list of files for the adjoint compiler."
2577  touch adSrcFiles.tmp  touch $TMP.adSrcFiles
2578  for i in $SOURCEDIRS ; do  for i in $SOURCEDIRS ; do
2579      list_files=`( cd $i && ls -1 *.list 2>/dev/null )`      list_files=`( cd $i && ls -1 *.list 2>/dev/null )`
2580      for j in $list_files ; do      for j in $list_files ; do
2581          cat $i/$j >> adSrcFiles.tmp          cat $i/$j >> $TMP.adSrcFiles
2582      done      done
2583  done  done
2584  if test ! "x"$FS = "x.f" ; then  if test ! "x"$FS = "x.f" ; then
2585      cat adSrcFiles.tmp | sed -e "s/\.f/.$FS/g" > adSrcFiles.tmp_f      cat $TMP.adSrcFiles | sed -e "s/\.f/.$FS/g" > $TMP.adSrcFiles_f
2586      mv -f adSrcFiles.tmp_f adSrcFiles.tmp      mv -f $TMP.adSrcFiles_f $TMP.adSrcFiles
2587  fi  fi
2588    
2589  echo  echo
# Line 2559  for i in $INCLUDEDIRS ; do Line 2596  for i in $INCLUDEDIRS ; do
2596  done  done
2597    
2598  if test ! "x$DIVA" = x -a ! "x$MPI" = x ; then  if test ! "x$DIVA" = x -a ! "x$MPI" = x ; then
2599    if test ! "x$MPIINCLUDEDIR" = x ; then      if test ! "x$MPIINCLUDEDIR" = x ; then
     if test -d $MPIINCLUDEDIR ; then  
         echo "  Creating the pseudo-MPI include directory"  
         INCLUDES="-I./mpi_headers $INCLUDES"  
         rm -rf ./mpi_headers  
         mkdir -p ./mpi_headers  
2600          #  Do a local copy of MPI headers files (in local dir ./mpi_headers/) after          #  Do a local copy of MPI headers files (in local dir ./mpi_headers/) after
2601          #   checking for additional included headers (in case of chain of included          #   checking for additional included headers (in case of chain of included
2602          #   header); also set LOCAL_MPI_HEADERS (if not already set)          #   header); also set LOCAL_MPI_HEADERS (if not already set)
2603          mpi_headers_do_local_copy          mpi_headers_do_local_copy
     else  
         echo "WARNING: MPIINCLUDEDIR='$MPIINCLUDEDIR' is not a dir"  
         echo "WARNING: ==> cannot create pseudo-MPI include directory"  
 #       exit -1  
2604      fi      fi
   fi  
2605  fi  fi
2606    
2607  echo "  Determining the list of source and include files"  echo "  Determining the list of source and include files"
2608  rm -rf .links.tmp  rm -rf $TMP.links
2609  mkdir .links.tmp  mkdir $TMP.links
2610  touch .links.tmp/foo  touch $TMP.links/foo
2611  if test ! -r ".links.tmp/foo" ; then  if test ! -r "$TMP.links/foo" ; then
2612      echo      echo
2613      echo "ERROR : something is wrong with your directory permissions or"      echo "ERROR : something is wrong with your directory permissions or"
2614      echo "   your user file-creation mask (\"umask\") since creating a"      echo "   your user file-creation mask (\"umask\") since creating a"
# Line 2597  if test ! -r ".links.tmp/foo" ; then Line 2624  if test ! -r ".links.tmp/foo" ; then
2624      echo      echo
2625      exit 1      exit 1
2626  fi  fi
2627  rm -f .links.tmp/foo  rm -f $TMP.links/foo
2628    
2629  if test "x$OPENAD" != x ; then  if test "x$OPENAD" != x ; then
2630      OAD_DONT_COMPILE="/dev/null"      OAD_DONT_COMPILE="/dev/null"
# Line 2640  if test "x$OPENAD" != x ; then Line 2667  if test "x$OPENAD" != x ; then
2667      echo "   OpenAD exceptions:  "      echo "   OpenAD exceptions:  "
2668  fi  fi
2669    
2670  echo "# This section creates symbolic links" > srclinks.tmp  echo "# This section creates symbolic links" > $TMP.srclinks
2671  echo "" >> srclinks.tmp  echo "" >> $TMP.srclinks
2672  printf 'F77_SRC_FILES = ' > F77srclist.tmp  printf 'F77_SRC_FILES = ' > $TMP.F77srclist
2673  printf 'NON_AD_F77_SRC_FILES = ' > nonADF77srclist.tmp  printf 'NON_AD_F77_SRC_FILES = ' > $TMP.nonADF77srclist
2674  printf 'C_SRC_FILES = '   > csrclist.tmp  printf 'C_SRC_FILES = '   > $TMP.csrclist
2675  printf 'F90_SRC_FILES = ' > F90srclist.tmp  printf 'F90_SRC_FILES = ' > $TMP.F90srclist
2676  printf 'H_SRC_FILES = '   > hsrclist.tmp  printf 'H_SRC_FILES = '   > $TMP.hsrclist
2677  printf 'AD_FLOW_FILES = ' > ad_flow_files.tmp  printf 'AD_FLOW_FILES = ' > $TMP.ad_flow_files
2678  alldirs="$SOURCEDIRS $INCLUDEDIRS ."  alldirs="$SOURCEDIRS $INCLUDEDIRS ."
2679  for d in $alldirs ; do  for d in $alldirs ; do
2680      deplist=      deplist=
# Line 2657  for d in $alldirs ; do Line 2684  for d in $alldirs ; do
2684          sfiles=`( echo $sfiles | grep -v _cb2m\. )`          sfiles=`( echo $sfiles | grep -v _cb2m\. )`
2685      fi      fi
2686      for sf in $sfiles ; do      for sf in $sfiles ; do
2687          if test ! -r ".links.tmp/$sf" ; then          if test ! -r "$TMP.links/$sf" ; then
2688              if test -f "$d/$sf" ; then              if test -f "$d/$sf" ; then
2689                  ignore_f=f                  ignore_f=f
2690                  case $d/$sf in                  case $d/$sf in
# Line 2682  for d in $alldirs ; do Line 2709  for d in $alldirs ; do
2709                          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
2710                              ignore_f=t                              ignore_f=t
2711                          else                          else
2712                              touch .links.tmp/$sf                              touch $TMP.links/$sf
2713                              deplist="$deplist $sf"                              deplist="$deplist $sf"
2714                          fi                          fi
2715                          ;;                          ;;
# Line 2691  for d in $alldirs ; do Line 2718  for d in $alldirs ; do
2718                      extn=`echo $sf | $AWK -F. '{print $NF}'`                      extn=`echo $sf | $AWK -F. '{print $NF}'`
2719                      case $extn in                      case $extn in
2720                        F)                        F)
2721                          echo    " \\"  >> F77srclist.tmp                          echo    " \\"  >> $TMP.F77srclist
2722                          printf " $sf" >> F77srclist.tmp                          printf " $sf" >> $TMP.F77srclist
2723                          if test "x$OPENAD" != x ; then                          if test "x$OPENAD" = x ; then
2724                              basename=${sf%%.F}                              basename=${sf%%.F}
2725                              isAD=`egrep ^$basename.f'[  ]*' adSrcFiles.tmp`                              isAD=`egrep ^$basename.f'[  ]*' $TMP.adSrcFiles`
2726                                if test -z "$isAD" ; then
2727                                    echo    " \\"  >> $TMP.nonADF77srclist
2728                                    printf " $sf" >> $TMP.nonADF77srclist
2729                                fi
2730                            else #- OpenAD case:
2731                                basename=${sf%%.F}
2732                                isAD=`egrep ^$basename.f'[  ]*' $TMP.adSrcFiles`
2733                              if test -z "$isAD" ; then                              if test -z "$isAD" ; then
2734                                  toBeIgnored=`egrep ^$basename'[      ]*' ${OAD_DONT_COMPILE}`                                  toBeIgnored=`egrep ^$basename'[      ]*' ${OAD_DONT_COMPILE}`
2735                                  if test -z "$toBeIgnored" ; then                                  if test -z "$toBeIgnored" ; then
2736                                      echo    " \\"  >> nonADF77srclist.tmp                                      echo    " \\"  >> $TMP.nonADF77srclist
2737                                      printf " $sf" >> nonADF77srclist.tmp                                      printf " $sf" >> $TMP.nonADF77srclist
2738                                  else                                  else
2739                                      echo "    not to be compiled   :  $sf"                                      echo "    not to be compiled   :  $sf"
2740                                  fi                                  fi
# Line 2715  for d in $alldirs ; do Line 2749  for d in $alldirs ; do
2749                                      echo "    original to be kept  :  $sf"                                      echo "    original to be kept  :  $sf"
2750                                  fi                                  fi
2751                                  if test -n "$notToBeTransformed" -o -n "$untransformedVersionToBeKept" ; then                                  if test -n "$notToBeTransformed" -o -n "$untransformedVersionToBeKept" ; then
2752                                      echo    " \\"  >> nonADF77srclist.tmp                                      echo    " \\"  >> $TMP.nonADF77srclist
2753                                      printf " $sf" >> nonADF77srclist.tmp                                      printf " $sf" >> $TMP.nonADF77srclist
2754                                  fi                                  fi
2755                              fi                              fi
2756                          fi                          fi
2757                          ;;                          ;;
2758                      F90)                      F90)
2759                          echo    " \\"  >> F90srclist.tmp                          echo    " \\"  >> $TMP.F90srclist
2760                          printf " $sf" >> F90srclist.tmp                          printf " $sf" >> $TMP.F90srclist
2761                          ;;                          ;;
2762                      c)                      c)
2763                          echo    " \\"  >> csrclist.tmp                          echo    " \\"  >> $TMP.csrclist
2764                          printf " $sf" >> csrclist.tmp                          printf " $sf" >> $TMP.csrclist
2765                          ;;                          ;;
2766                      h)                      h)
2767                          echo    " \\"  >> hsrclist.tmp                          echo    " \\"  >> $TMP.hsrclist
2768                          printf " $sf" >> hsrclist.tmp                          printf " $sf" >> $TMP.hsrclist
2769                          ;;                          ;;
2770                      flow)                      flow)
2771                          echo    " \\"  >> ad_flow_files.tmp                          echo    " \\"  >> $TMP.ad_flow_files
2772                          printf " $sf" >> ad_flow_files.tmp                          printf " $sf" >> $TMP.ad_flow_files
2773                          ;;                          ;;
2774                     esac                     esac
2775                  fi                  fi
# Line 2744  for d in $alldirs ; do Line 2778  for d in $alldirs ; do
2778      done      done
2779      if test "x$deplist" != x ; then      if test "x$deplist" != x ; then
2780        if test "$d" != "." ; then        if test "$d" != "." ; then
2781          echo "" >> srclinks.tmp          echo "" >> $TMP.srclinks
2782          echo "#  These files are linked from $d" >> srclinks.tmp          echo "#  These files are linked from $d" >> $TMP.srclinks
2783          echo "$deplist :" >> srclinks.tmp          echo "$deplist :" >> $TMP.srclinks
2784  # We need to make sure that the link isn't already there.  # We need to make sure that the link isn't already there.
2785  # 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"
2786  # 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.
2787          printf "\tif [ ! -L \$@ ]; then \$(LN) %s/\$@ \$@; fi\n" $d >> srclinks.tmp          printf "\tif [ ! -L \$@ ]; then \$(LN) %s/\$@ \$@; fi\n" $d >> $TMP.srclinks
2788        fi        fi
2789      fi      fi
2790  done  done
2791  rm -rf .links.tmp  rm -rf $TMP.links
2792  echo "" >> F77srclist.tmp  echo "" >> $TMP.F77srclist
2793  echo "" >> nonADF77srclist.tmp  echo "" >> $TMP.nonADF77srclist
2794  echo "" >> csrclist.tmp  echo "" >> $TMP.csrclist
2795  echo "" >> F90srclist.tmp  echo "" >> $TMP.F90srclist
2796  echo "" >> hsrclist.tmp  echo "" >> $TMP.hsrclist
2797  echo "" >> ad_flow_files.tmp  echo "" >> $TMP.ad_flow_files
2798    
2799  CMDLINE=$0  CMDLINE=$0
2800  for xx in "$@" ; do nw=`echo $xx | wc -w`  for xx in "$@" ; do nw=`echo $xx | wc -w`
# Line 2882  MAKE = ${MAKE} Line 2916  MAKE = ${MAKE}
2916    
2917  EOF  EOF
2918    
2919  cat F77srclist.tmp      >> $MAKEFILE  cat $TMP.F77srclist      >> $MAKEFILE
2920  cat nonADF77srclist.tmp >> $MAKEFILE  cat $TMP.nonADF77srclist >> $MAKEFILE
2921  cat csrclist.tmp        >> $MAKEFILE  cat $TMP.csrclist        >> $MAKEFILE
2922  cat F90srclist.tmp      >> $MAKEFILE  cat $TMP.F90srclist      >> $MAKEFILE
2923  cat hsrclist.tmp        >> $MAKEFILE  cat $TMP.hsrclist        >> $MAKEFILE
2924  cat ad_flow_files.tmp   >> $MAKEFILE  cat $TMP.ad_flow_files   >> $MAKEFILE
2925    
2926  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
2927    
2928  echo >> $MAKEFILE  echo >> $MAKEFILE
2929    
# Line 2939  links: \$(F77_SRC_FILES) \$(C_SRC_FILES) Line 2973  links: \$(F77_SRC_FILES) \$(C_SRC_FILES)
2973    
2974  small_f: \$(F77_PP_SRC_FILES) \$(F90_PP_SRC_FILES)  small_f: \$(F77_PP_SRC_FILES) \$(F90_PP_SRC_FILES)
2975    
2976  output.txt: \$(EXECUTABLE)  # output.txt: \$(EXECUTABLE)
2977          @printf 'running ... '  #       @printf 'running ... '
2978          @\$(EXECUTABLE) > \$@  #       @\$(EXECUTABLE) > \$@
2979    
2980  # remove most of the files that "make" generates  # remove most of the files that "make" generates
2981  clean:  clean:
# Line 2971  CLEAN: Line 3005  CLEAN:
3005          -rm -f *.txt STDOUT.* STDERR.* *diagnostics.log *.[0-9][0-9][0-9][0-9].log          -rm -f *.txt STDOUT.* STDERR.* *diagnostics.log *.[0-9][0-9][0-9][0-9].log
3006          -rm -f datetime costfinal divided.ctrl snapshot* output_adm.txt.diva_*          -rm -f datetime costfinal divided.ctrl snapshot* output_adm.txt.diva_*
3007          -rm -f *_MIT_CE_000.opt0000 costfunction*0000          -rm -f *_MIT_CE_000.opt0000 costfunction*0000
3008          -rm -f oad_cp.000.[0-9][0-9][0-9][0-9][0-9]          -rm -f oad_cp.[0-9][0-9][0-9].?????
3009    
3010  makefile:  makefile:
3011          $THIS_SCRIPT $G2ARGS          $THIS_SCRIPT $G2ARGS
# Line 3086  done Line 3120  done
3120  echo "  Add the source list for AD code generation"  echo "  Add the source list for AD code generation"
3121  echo >> $MAKEFILE  echo >> $MAKEFILE
3122  printf "AD_FILES = " >> $MAKEFILE  printf "AD_FILES = " >> $MAKEFILE
3123  AD_FILES=`cat adSrcFiles.tmp`  AD_FILES=`cat $TMP.adSrcFiles`
3124  for i in $AD_FILES ; do  for i in $AD_FILES ; do
3125      echo    " \\" >> $MAKEFILE      echo    " \\" >> $MAKEFILE
3126      printf " $i" >> $MAKEFILE      printf " $i" >> $MAKEFILE
3127  done  done
3128  echo >> $MAKEFILE  echo >> $MAKEFILE
3129  rm -f adSrcFiles.tmp  rm -f $TMP.adSrcFiles
3130    
3131  cat >>$MAKEFILE <<EOF  cat >>$MAKEFILE <<EOF
3132    
# Line 3117  ad_input_code.$FS: \$(AD_FILES) \$(AD_FL Line 3151  ad_input_code.$FS: \$(AD_FILES) \$(AD_FL
3151          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
3152    
3153  ad_taf_output.$FS: ad_input_code.$FS  ad_taf_output.$FS: ad_input_code.$FS
3154            @-rm -f ad_input_code_ad.$FS ; echo ''
3155          \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS          \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS
3156          ls -l ad_input_code_ad.$FS          ls -l ad_input_code_ad.$FS
3157          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
# Line 3126  adtafonly: Line 3161  adtafonly:
3161          ls -l ad_input_code_ad.$FS          ls -l ad_input_code_ad.$FS
3162          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
3163    
3164  \$(EXE_AD): \$(SPECIAL_FILES) \$(F77_SRC_FILES) \$(C_SRC_FILES) \$(H_SRC_FILES) \$(F90_SRC_FILES) ad_taf_output.o \$(OBJFILES) \$(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)
3165          \$(LINK) -o \${EXE_AD} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ad_taf_output.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)
3166    
3167  ad_tamc_output.$FS: ad_input_code.$FS  ad_tamc_output.$FS: ad_input_code.$FS
3168          \$(TAMC) \$(AD_TAMC_FLAGS) \$(TAMC_EXTRA) ad_input_code.$FS          \$(TAMC) \$(AD_TAMC_FLAGS) \$(TAMC_EXTRA) ad_input_code.$FS
# Line 3142  adonlyfwd: Line 3177  adonlyfwd:
3177  adtrick:  adtrick:
3178          patch < \$(TOOLSDIR)/ad_taf_output.f.adtrick.diff          patch < \$(TOOLSDIR)/ad_taf_output.f.adtrick.diff
3179    
3180  adobj: ad_taf_output.o \$(OBJFILES)  adobj: ad_taf_output.o \$(NON_AD_F77_SRC_FILES:.F=.o) \$(F90_SRC_FILES:.F90=.o) \$(C_SRC_FILES:.c=.o)
3181    
3182  # ... FTL ...  # ... FTL ...
3183  ftlall: ftl_exe_target  ftlall: ftl_exe_target
# Line 3165  ftl_input_code.$FS: \$(AD_FILES) Line 3200  ftl_input_code.$FS: \$(AD_FILES)
3200          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
3201    
3202  ftl_taf_output.$FS: ftl_input_code.$FS  ftl_taf_output.$FS: ftl_input_code.$FS
3203            @-rm -f ftl_input_code_tl.$FS ; echo ''
3204          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS
3205          ls -l ftl_input_code_ftl.$FS          ls -l ftl_input_code_tl.$FS
3206          cat ftl_input_code_ftl.$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
3207    
3208  ftltafonly:  ftltafonly:
3209          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS
3210          ls -l ftl_input_code_ftl.$FS          ls -l ftl_input_code_tl.$FS
3211          cat ftl_input_code_ftl.$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
3212    
3213  \$(EXE_FTL): \$(SPECIAL_FILES) \$(F77_SRC_FILES) \$(C_SRC_FILES) \$(H_SRC_FILES) \$(F90_SRC_FILES) ftl_taf_output.o \$(OBJFILES) \$(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)
3214          \$(LINK) -o \${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_taf_output.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)
3215    
3216  ftl_tamc_output.$FS: ftl_input_code.$FS  ftl_tamc_output.$FS: ftl_input_code.$FS
3217          \$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.$FS          \$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.$FS
# Line 3219  if test "x$OPENAD" != x ; then Line 3255  if test "x$OPENAD" != x ; then
3255  # ============ begin OpenAD specific section ==============  # ============ begin OpenAD specific section ==============
3256    
3257  cat >>$MAKEFILE <<EOF  cat >>$MAKEFILE <<EOF
3258    # ... OpenAD ...
3259    
3260  # all the source files linked from the various locations:  # all the source files linked from the various locations:
3261  ALL_LINKED_FILES= \  ALL_LINKED_FILES= \
# Line 3258  for i in `cat ${OAD_CB2M_FILES}` ; do Line 3295  for i in `cat ${OAD_CB2M_FILES}` ; do
3295    echo    " \\" >> $MAKEFILE    echo    " \\" >> $MAKEFILE
3296    printf " ${i}_mod.f$FS90" >> $MAKEFILE    printf " ${i}_mod.f$FS90" >> $MAKEFILE
3297  done  done
3298  AD_FILES=`cat adSrcFiles.tmp`  AD_FILES=`cat $TMP.adSrcFiles`
3299  for i in $AD_FILES ; do  for i in $AD_FILES ; do
3300    basename=${i%%.f}    basename=${i%%.f}
3301    toBeIgnored=`egrep ^$basename'[      ]*' ${OAD_DONT_COMPILE} ${OAD_DONT_TRANSFORM}`    toBeIgnored=`egrep ^$basename'[      ]*' ${OAD_DONT_COMPILE} ${OAD_DONT_TRANSFORM}`
# Line 3268  for i in $AD_FILES ; do Line 3305  for i in $AD_FILES ; do
3305    fi    fi
3306  done  done
3307  echo >> $MAKEFILE  echo >> $MAKEFILE
3308  rm -f adSrcFiles.tmp  rm -f $TMP.adSrcFiles
3309    
3310  cat >>$MAKEFILE <<EOF  cat >>$MAKEFILE <<EOF
3311    
3312  adAll: \$(EXE_AD)  adAll: ad_exe_target
3313  .PHONY: adAll  .PHONY: adAll
3314    
3315    ad_exe_target:
3316            @echo Update AD_CONFIG.h and make \$(EXE_AD)
3317            @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Adjoint version" -bAD_CONFIG_H -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN > ad_config.template
3318            @cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h
3319            @-rm -f ad_config.template
3320            \$(MAKE) -f \$(MAKEFILE) \$(EXE_AD)
3321    
3322  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))
3323    
3324  .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)
# Line 3332  AD_OBJ_FILES_S2=\$(AD_OBJ_FILES_S1) \$(N Line 3376  AD_OBJ_FILES_S2=\$(AD_OBJ_FILES_S1) \$(N
3376  small_f: \$(CB2M_F90_PP_SRC_FILES)  small_f: \$(CB2M_F90_PP_SRC_FILES)
3377  .PHONY: small_f  .PHONY: small_f
3378    
3379  ad_output.txt: \$(EXE_AD)  # ad_output.txt: \$(EXE_AD)
3380          @printf 'linking data files ... '  #       @printf 'linking data files ... '
3381          \$(LN) -f ../input_ad/data* ../input_ad/eedata .  #       \$(LN) -f ../input_ad/data* ../input_ad/eedata .
3382          \$(LN) -f ../../global_ocean.90x40x15/input/*.bin .  #       \$(LN) -f ../../global_ocean.90x40x15/input/*.bin .
3383          @printf 'running ... '  #       @printf 'running ... '
3384          @./\$(EXE_AD) > \$@  #       @./\$(EXE_AD) > \$@
3385    
3386  ad_input_code.f$FS90:  \$(CB2M_AD_FILES)  ad_input_code.f$FS90:  \$(CB2M_AD_FILES)
3387          cat \$^ > \$@          cat \$^ > \$@
# Line 3374  ad_input_code_sf.pre.s2p.xb.x2w.w2f.f$FS Line 3418  ad_input_code_sf.pre.s2p.xb.x2w.w2f.f$FS
3418  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
3419          \${OADTOOLS}/insertTemplateDir.bash \$< \$@          \${OADTOOLS}/insertTemplateDir.bash \$< \$@
3420    
3421  PPEXTRAS=\$(wildcard \${OADTOOLS}/ad_template.*.F) \${OADTOOLS}/ad_inline.F  PPEXTRAS=\$(notdir \$(wildcard \${OADTOOLS}/ad_template.*.F)) ad_inline.F
3422  # postprocess F'  # postprocess F'
3423  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
3424          \${OPENADFORTTK_BASE}/tools/SourceProcessing/postProcess.py --progress --timing --infoUnitFile w2f__types.f90 --outputFormat=fixed --separateOutput --pathSuffix "" --filenameSuffix "_oad" -m r -i \${OADTOOLS}/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 \$<
3425          # the target is a placeholder to trigger a single execution of the rule          # the target is a placeholder to trigger a single execution of the rule
3426          touch \$@          touch \$@
3427  # put this so make knows about the postprocessing output  # put this so make knows about the postprocessing output
# Line 3388  OAD_intrinsics_oad.f \$(CB2M_AD_FILES:.f Line 3432  OAD_intrinsics_oad.f \$(CB2M_AD_FILES:.f
3432          \$(LN) \${XAIFSCHEMAROOT}/schema/\$@ .          \$(LN) \${XAIFSCHEMAROOT}/schema/\$@ .
3433    
3434  # link the support files:  # link the support files:
3435  \$(OPENAD_SUPPORT_F90_SRC_FILES) \$(OPENAD_SUPPORT_C_SRC_FILES):  \$(OPENAD_SUPPORT_F90_SRC_FILES) \$(OPENAD_SUPPORT_C_SRC_FILES) \$(PPEXTRAS):
3436          \$(LN) \${OADTOOLS}/\$@ .          \$(LN) \${OADTOOLS}/\$@ .
3437    
3438  AD_CLEAN += *_mod.h *_mod.F90 *.FF90 *.mod-whirl temp.sed oad_cp.* postProcess.tag \$(PPEXTRAS:.F=.f)  AD_CLEAN += *_mod.h *_mod.F90 *.FF90 *.mod-whirl temp.sed oad_cp.* postProcess.tag
3439    
3440  # ============ end OpenAD specific section ==============  # ============ end OpenAD specific section ==============
3441    
# Line 3427  for i in $NOOPTFILES ; do Line 3471  for i in $NOOPTFILES ; do
3471  done  done
3472    
3473  echo "  Add rules for links"  echo "  Add rules for links"
3474  cat srclinks.tmp >> $MAKEFILE  cat $TMP.srclinks >> $MAKEFILE
3475  rm -f srclinks.tmp  rm -f $TMP.srclinks
3476    
3477  echo "  Adding makedepend marker"  echo "  Adding makedepend marker"
3478  printf "\n\n# DO NOT DELETE\n" >> $MAKEFILE  printf "\n\n# DO NOT DELETE\n" >> $MAKEFILE

Legend:
Removed from v.1.252  
changed lines
  Added in v.1.265

  ViewVC Help
Powered by ViewVC 1.1.22