/[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.141 by edhill, Wed Jan 11 06:02:31 2006 UTC revision 1.146 by edhill, Fri Apr 7 02:53:55 2006 UTC
# Line 13  Line 13 
13  test_for_package_in_cpp_options() {  test_for_package_in_cpp_options() {
14      cpp_options=$1      cpp_options=$1
15      pkg=$2      pkg=$2
16      test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_$pkg" || exit 99      test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_$pkg[ ]"
17      test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_$pkg" || exit 99      test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_$pkg[ ]"
18      test_for_string_in_file $cpp_options "^[ ]*#define.*DISABLE_$pkg" || exit 99      test_for_string_in_file $cpp_options "^[ ]*#define.*DISABLE_$pkg[ ]"
19      test_for_string_in_file $cpp_options "^[ ]*#undef.*DISABLE_$pkg" || exit 99      test_for_string_in_file $cpp_options "^[ ]*#undef.*DISABLE_$pkg[ ]"
20        test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_$pkg$"
21        test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_$pkg$"
22        test_for_string_in_file $cpp_options "^[ ]*#define.*DISABLE_$pkg$"
23        test_for_string_in_file $cpp_options "^[ ]*#undef.*DISABLE_$pkg$"
24  }  }
25    
26  # Search for particular CPP #cmds associated with MPI  # Search for particular CPP #cmds associated with MPI
27  # usage: test_for_mpi_in_cpp_eeoptions CPP_file  # usage: test_for_mpi_in_cpp_eeoptions CPP_file
28  test_for_mpi_in_cpp_eeoptions() {  test_for_mpi_in_cpp_eeoptions() {
29      cpp_options=$1      cpp_options=$1
30      test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_USE_MPI" || exit 99      test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_USE_MPI[ ]"
31      test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_USE_MPI" || exit 99      test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_USE_MPI[ ]"
32      test_for_string_in_file $cpp_options "^[ ]*#define.*ALWAYS_USE_MPI" || exit 99      test_for_string_in_file $cpp_options "^[ ]*#define.*ALWAYS_USE_MPI[ ]"
33      test_for_string_in_file $cpp_options "^[ ]*#undef.*ALWAYS_USE_MPI" || exit 99      test_for_string_in_file $cpp_options "^[ ]*#undef.*ALWAYS_USE_MPI[ ]"
34        test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_USE_MPI$"
35        test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_USE_MPI$"
36        test_for_string_in_file $cpp_options "^[ ]*#define.*ALWAYS_USE_MPI$"
37        test_for_string_in_file $cpp_options "^[ ]*#undef.*ALWAYS_USE_MPI$"
38  }  }
39    
40  # Search for particular string in a file. Return 1 if detected, 0 if not  # Search for particular string in a file. Return 1 if detected, 0 if not
# Line 39  test_for_string_in_file() { Line 47  test_for_string_in_file() {
47      if test "x${RETVAL}" = x0 ; then      if test "x${RETVAL}" = x0 ; then
48          printf "Error: In $file there is an illegal line: "          printf "Error: In $file there is an illegal line: "
49          grep -i "$strng" $file          grep -i "$strng" $file
50          return 1          exit 99
51      fi      fi
52      return 0      return 0
53  }  }
# Line 570  Usage: "$0" [OPTIONS] Line 578  Usage: "$0" [OPTIONS]
578            *only* works if it is supported by the OPTFILE that            *only* works if it is supported by the OPTFILE that
579            is being used.            is being used.
580    
581        -ignoretime | -ignore_time | --ignoretime | --ignore_time
582              Ignore all the "wall clock" routines entirely.  This will
583              not in any way hurt the model results -- it simply means
584              that the code that checks how long the model spends in
585              various routines will give junk values.
586    
587      -ts | --ts      -ts | --ts
588            Produce timing information per timestep            Produce timing information per timestep
589      -papis | --papis      -papis | --papis
# Line 2151  fi Line 2165  fi
2165  echo "  Determining the list of source and include files"  echo "  Determining the list of source and include files"
2166  rm -rf .links.tmp  rm -rf .links.tmp
2167  mkdir .links.tmp  mkdir .links.tmp
2168    touch .links.tmp/foo
2169    if test ! -r ".links.tmp/foo" ; then
2170        echo
2171        echo "ERROR : something is wrong with your directory permissions or"
2172        echo "   your user file-creation mask (\"umask\") since creating a"
2173        echo "   sub-dir, touch-ing a file within it, and then reading it is"
2174        echo "   not working.  Please try setting your umask to something"
2175        echo "   sane such as:"
2176        echo
2177        echo "      umask 0002"
2178        echo
2179        echo "   and please verify that you have the proper permissions for"
2180        echo "   creating sub-directories and then reading files created"
2181        echo "   within them."
2182        echo
2183        exit 1
2184    fi
2185    rm -f .links.tmp/foo
2186  echo "# This section creates symbolic links" > srclinks.tmp  echo "# This section creates symbolic links" > srclinks.tmp
2187  echo "" >> srclinks.tmp  echo "" >> srclinks.tmp
2188  printf 'SRCFILES = '    > srclist.inc  printf 'SRCFILES = '    > srclist.inc
# Line 2398  CLEAN: Line 2430  CLEAN:
2430          -find \$(EXEDIR) -name "*.meta" -exec rm {} \;          -find \$(EXEDIR) -name "*.meta" -exec rm {} \;
2431          -find \$(EXEDIR) -name "*.data" -exec rm {} \;          -find \$(EXEDIR) -name "*.data" -exec rm {} \;
2432          -find \$(EXEDIR) -name "fort.*" -exec rm {} \;          -find \$(EXEDIR) -name "fort.*" -exec rm {} \;
2433          -rm -f \$(EXECUTABLE) output.txt STD*          -rm -f \$(EXECUTABLE) *.txt STD* *diagnostics.log datetime
2434            -rm -rf mnc_test_*
2435    
2436  #eh3 Makefile: makefile  #eh3 Makefile: makefile
2437  makefile:  makefile:

Legend:
Removed from v.1.141  
changed lines
  Added in v.1.146

  ViewVC Help
Powered by ViewVC 1.1.22