/[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.9 by adcroft, Fri Sep 26 18:16:38 2003 UTC revision 1.11.2.3 by edhill, Wed Oct 1 20:47:26 2003 UTC
# Line 8  Line 8 
8  #   modified by aja 01/00  #   modified by aja 01/00
9  #   rewritten in bash by eh3 08/03  #   rewritten in bash by eh3 08/03
10    
11    # Search for particular CPP #cmds associated with packages
12    # usage: test_for_package_in_cpp_options CPP_file package_name
13    test_for_package_in_cpp_options() {
14        cpp_options=$1
15        pkg=$2
16        grep -i "#define.*ALLOW_$pkg" $cpp_options > /dev/null 2>&1
17        RETVAL=$?
18        if test "x${RETVAL}" = x0 ; then
19            echo "Error: In $cpp_options there is an illegal line: #define ALLOW_$pkg"
20            exit 99
21        fi
22        grep -i "#undef.*ALLOW_$pkg" $cpp_options > /dev/null 2>&1
23        RETVAL=$?
24        if test "x${RETVAL}" = x0 ; then
25            echo "Error: In $cpp_options there is an illegal line: #undef ALLOW_$pkg"
26            exit 99
27        fi
28        grep -i "#define.*DISABLE_$pkg" $cpp_options > /dev/null 2>&1
29        RETVAL=$?
30        if test "x${RETVAL}" = x0 ; then
31            echo "Error: In $cpp_options there is an illegal line: #define DISABLE_$pkg"
32            exit 99
33        fi
34        grep -i "#undef.*DISABLE_$pkg" $cpp_options > /dev/null 2>&1
35        RETVAL=$?
36        if test "x${RETVAL}" = x0 ; then
37            echo "Error: In $cpp_options there is an illegal line: #undef DISABLE_$pkg"
38            exit 99
39       fi
40    }
41    
42    
43  # Guess possible config options for this host  # Guess possible config options for this host
44  find_possible_configs()  {  find_possible_configs()  {
45    
46      p_PLATFORM=`uname`"-"`uname -m`      tmp1=`uname`"_"`uname -m`
47      echo "The platform appears to be:"      tmp2=`echo $tmp1 | sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
48      echo "  "$p_PLATFORM      PLATFORM=`echo $tmp2 | sed -e 's/i[3-6]86/ia32/'`
49        OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")`
50      p_LN=      echo "  The platform appears to be:  $PLATFORM"
51    #     if test "x$OFLIST" = x ; then
52    #       echo "  No pre-defined options files were found matching this platform"
53    #       echo "  but examples for other platforms can be found in:"
54    #       echo "    $ROOTDIR/tools/build_options"
55    #     else
56    #       echo "  Options files (located in $ROOTDIR/tools/build_options) that"
57    #       echo "  may work with this machine are:"
58    #       for i in $OFLIST ; do
59    #           echo "    $i"
60    #       done
61    #     fi
62        
63      echo "test" > test      echo "test" > test
64      ln -s ./test link      ln -s ./test link
65      RETVAL=$?      RETVAL=$?
66      if test "x${RETVAL}" = x0 ; then      if test "x${RETVAL}" = x0 ; then
67          p_LN="ln -s"          LN="ln -s"
68        else
69            echo "Error: \"ln -s\" does not appear to work on this system!"
70            echo "  For help, please contact <MITgcm-support@mitgcm.org>."
71            exit 1
72      fi      fi
73      rm -f test link      rm -f test link
74    
75      p_CPP=`which cpp`      if test "x$CPP" = x ; then
76                CPP="cpp -traditional -P"
     RETVAL=$?  
     if test "x${RETVAL}" = x0 ; then  
         p_LN="ln -s"  
77      fi      fi
     rm -f test link  
78    
79      # look for possible fortran compilers      # look for possible fortran compilers
80        tmp="$MITGCM_FC $FC g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95"
81      p_FC=      p_FC=
82      for c in f77 g77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95 ; do      for c in $tmp ; do
83          which $c > /dev/null 2>&1          rm -f ./hello.f ./hello
84            cat >> hello.f <<EOF
85          program hello
86          do i=1,3
87            print *, 'hello world : ', i
88          enddo
89          end
90    EOF
91            $c -o hello hello.f > /dev/null 2>&1
92          RETVAL=$?          RETVAL=$?
93          if test "x${RETVAL}" = x0 ; then          if test "x${RETVAL}" = x0 ; then
94              p_FC="$p_FC $c"              p_FC="$p_FC $c"
95          fi          fi
96      done      done
     echo "Possible FORTRAN compilers appear to be:  "  
97      if test "x${p_FC}" = x ; then      if test "x${p_FC}" = x ; then
98          echo "  None found!!!"          cat 1>&2 <<EOF
99    
100    Error: No Fortran compilers were found in your path.  Please specify one using:
101    
102        1) an "optfile" on (eg. "-optfile=path/to/OPTFILE"),
103        2) a command-line option (eg. "-fc NAME"), or
104        3) the MITGCM_FC environment variable.
105    
106    EOF
107            exit 1
108      else      else
109          echo "  "$p_FC          echo "  The possible FORTRAN compilers found in your path are:"
110            echo "   "$p_FC
111            if test "x$FC" = x ; then
112                FC=`echo $p_FC | awk '{print $1}'`
113            fi
114      fi      fi
115    
116      # look for possible MPI libraries      for i in $p_FC ; do
117      mpi_libs=          p_OF=$ROOTDIR"/tools/build_options/"$PLATFORM"_"$i
118      mpi_fort=`which mpif77 2>/dev/null`          if test -r $p_OF ; then
119      RETVAL=$?              OPTFILE=$p_OF
120      if test "x${RETVAL}" = x0 ; then              echo "  The options file:  $p_OF"
121          cat >>test.f <<EOF              echo "    appears to match so we'll use it."
122        PROGRAM HELLO              break
       DO 10, I=1,10  
       PRINT *,'Hello World'  
    10 CONTINUE  
       STOP  
       END  
 EOF  
         eval "$mpi_fort -showme test.f > out"  
         RETVAL=$?  
         if test "x${RETVAL}" = x0 ; then  
             a=`cat out`  
             for i in $a ; do  
                 case $i in  
                     -*)  
                         mpi_libs="$mpi_libs $i" ;;  
                 esac  
             done  
             echo "The MPI libs appear to be:"  
             echo "  "$mpi_libs  
123          fi          fi
124          rm -f test.f out      done
125        if test "x$OPTFILE" = x ; then
126            cat 1>&2 <<EOF
127    
128    Error: No options file was found in:  $ROOTDIR/tools/build_options/
129      that matches this platform ("$PLATFORM") and the compilers found in
130      your path.  Please specify an "optfile" using:
131    
132        1) the command line (eg. "-optfile=path/to/OPTFILE"), or
133        2) the MITGCM_OF environment variable.
134    
135      If you need help, please contact the developers at <MITgcm-support@mitgcm.org>.
136    
137    EOF
138            exit 1
139      fi      fi
140        
141    #     # look for possible MPI libraries
142    #     mpi_libs=
143    #     mpi_fort=`which mpif77 2>/dev/null`
144    #     RETVAL=$?
145    #     if test "x${RETVAL}" = x0 ; then
146    #       cat >>test.f <<EOF
147    #       PROGRAM HELLO
148    #       DO 10, I=1,10
149    #       PRINT *,'Hello World'
150    #    10 CONTINUE
151    #       STOP
152    #       END
153    # EOF
154    #       eval "$mpi_fort -showme test.f > out"
155    #       RETVAL=$?
156    #       if test "x${RETVAL}" = x0 ; then
157    #           a=`cat out`
158    #           for i in $a ; do
159    #               case $i in
160    #                   -*)
161    #                       mpi_libs="$mpi_libs $i" ;;
162    #               esac
163    #           done
164    #           echo "The MPI libs appear to be:"
165    #           echo "  "$mpi_libs
166    #       fi
167    #       rm -f test.f out
168    #     fi
169    
170  }  }
171    
# Line 172  S64= Line 261  S64=
261  KPP=  KPP=
262  FC=  FC=
263  LINK=  LINK=
264    DEFINES="-DWORDLENGTH=4"
265  PACKAGES=  PACKAGES=
266  ENABLE=  ENABLE=
267  DISABLE=  DISABLE=
268  MAKEFILE=  MAKEFILE=
269  MAKEDEPEND=  MAKEDEPEND=
270  PDEPEND=  PDEPEND=
271  DUMPSTATE=f  DUMPSTATE=t
272  PDEFAULT=  PDEFAULT=
273  OPTFILE=  OPTFILE=
274  INCLUDES="-I."  INCLUDES="-I."
# Line 361  for ac_option ; do Line 451  for ac_option ; do
451            
452  done  done
453    
454    if test "x${ROOTDIR}" = x ; then
455        if test "${PWD##/*/}" = "bin" -a -d ../model -a -d ../eesup -a -d ../pkg ; then
456            ROOTDIR=".."
457        else
458            for d in . .. ../.. ../../.. ../../../.. ../../../../.. ; do
459                if [ -d "$d/model" -a -d "$d/eesupp" -a -d "$d/pkg" ]; then
460                    ROOTDIR=$d
461                    echo -n "Warning:  ROOTDIR was not specified but there appears to be"
462                    echo " a copy of MITgcm at \"$ROOTDIR\" so we'll try it."
463                    break
464                fi
465            done
466        fi
467    fi
468    if test "x${ROOTDIR}" = x ; then
469        echo "Error: Cannot determine ROOTDIR for MITgcm code."
470        echo "  Please specify a ROOTDIR using either an options "
471        echo "  file or a command-line option."
472        exit 1
473    fi
474    if test ! -d ${ROOTDIR} ; then
475        echo "Error: the specified ROOTDIR (\"$ROOTDIR\") does not exist!"
476        exit 1
477    fi
478    
479  echo "  getting OPTFILE information:  "  echo "  getting OPTFILE information:  "
480  if test "x${OPTFILE}" = x ; then  if test "x${OPTFILE}" = x ; then
481      echo "Warning: no OPTFILE specified so we'll look for possible settings"      if test "x$MITGCM_OF" = x ; then
482      printf "\n===  Searching for possible settings for OPTFILE  ===\n"          echo "Warning: no OPTFILE specified so we'll look for possible settings"
483      find_possible_configs          printf "\n===  Searching for possible settings for OPTFILE  ===\n"
484  else          find_possible_configs
     if test "x$OPTFILE" = xNONE ; then  
         echo "    OPTFILE=NONE so we'll try to use default settings"  
485      else      else
486          if test -f "$OPTFILE" -a -r "$OPTFILE" ; then          OPTFILE=$MITGCM_OF
487              echo "    using OPTFILE=\"$OPTFILE\""      fi
488              source "$OPTFILE"  fi
489              RETVAL=$?  if test "x$OPTFILE" != xNONE ; then
490              if test "x$RETVAL" != x0 ; then      if test -f "$OPTFILE" -a -r "$OPTFILE" ; then
491                  echo -n "Error: failed to source OPTFILE \"$OPTFILE\""          echo "    using OPTFILE=\"$OPTFILE\""
492                  echo "--please check that variable syntax is bash-compatible"          source "$OPTFILE"
493                  exit 1          RETVAL=$?
494              fi          if test "x$RETVAL" != x0 ; then
495              if test "x$DUMPSTATE" != xf ; then              echo -n "Error: failed to source OPTFILE \"$OPTFILE\""
496                  cp -f $OPTFILE "gm_optfile"              echo "--please check that variable syntax is bash-compatible"
             fi  
         else  
             echo "Error: can't read OPTFILE=\"$OPTFILE\""  
497              exit 1              exit 1
498          fi          fi
499            if test "x$DUMPSTATE" != xf ; then
500                cp -f $OPTFILE "gm_optfile"
501            fi
502        else
503            echo "Error: can't read OPTFILE=\"$OPTFILE\""
504            exit 1
505      fi      fi
506  fi  fi
507    
# Line 405  if test "x$LINK" = x ; then Line 521  if test "x$LINK" = x ; then
521      LINK=$FC      LINK=$FC
522  fi  fi
523  if test "x$CPP" = x ; then  if test "x$CPP" = x ; then
524        CPP="cpp"
525    fi
526    echo "#define A a" | cpp > test_cpp 2>&1
527    RETVAL=$?
528    if test "x$RETVAL" != x0 ; then
529      cat <<EOF 1>&2      cat <<EOF 1>&2
530    
531  Error: no C pre-processor: please specify using one of the following:  Error: C pre-processor "$CPP" failed the test case: please specify using:
532    
533    1) within the options file ("CPP=...") as specified by "-of=OPTFILE"    1) within the options file ("CPP=...") as specified by "-of=OPTFILE"
534    2) the "./gm_local" file    2) the "./gm_local" file
 EOF  
     exit 1  
 fi  
 if test "x$S64" = x ; then  
     cat <<EOF 1>&2  
535    
 Error: no C pre-processor: please specify using one of the following:  
   1) within the options file ("S64=...") as specified by "-of=OPTFILE"  
   2) the "./gm_local" file  
536  EOF  EOF
537      exit 1      exit 1
538    else
539        rm -f test_cpp
540    fi
541    if test "x$MAKEDEPEND" = x ; then
542        MAKEDEPEND=makedepend
543  fi  fi
   
544    
545  printf "\n===  Setting defaults  ===\n"  printf "\n===  Setting defaults  ===\n"
546  echo -n "  Adding MODS directories:  "  echo -n "  Adding MODS directories:  "
# Line 446  if test "x${PLATFORM}" = x ; then Line 564  if test "x${PLATFORM}" = x ; then
564      PLATFORM=$p_PLATFORM      PLATFORM=$p_PLATFORM
565  fi  fi
566    
 if test "x${ROOTDIR}" = x ; then  
     if test "${PWD##/*/}" = "bin" -a -d ../model -a -d ../eesup -a -d ../pkg ; then  
         ROOTDIR=".."  
     else  
         for d in . .. ../.. ../../.. ../../../.. ../../../../.. ; do  
             if [ -d "$d/model" -a -d "$d/eesupp" -a -d "$d/pkg" ]; then  
                 ROOTDIR=$d  
                 echo -n "Warning:  ROOTDIR was not specified but there appears to be"  
                 echo " a copy of MITgcm at \"$ROOTDIR\" so we'll try it."  
                 break  
             fi  
         done  
     fi  
 fi  
 if test "x${ROOTDIR}" = x ; then  
     echo "Error: Cannot determine ROOTDIR for MITgcm code."  
     echo "  Please specify a ROOTDIR using either an options "  
     echo "  file or a command-line option."  
     exit 1  
 fi  
 if test ! -d ${ROOTDIR} ; then  
     echo "Error: the specified ROOTDIR (\"$ROOTDIR\") does not exist!"  
     exit 1  
 fi  
   
567  if test "x${EXEDIR}" = x ; then  if test "x${EXEDIR}" = x ; then
568      if test "${PWD##/*/}" = "bin" -a -d ../exe -a $ROOTDIR = .. ; then      if test "${PWD##/*/}" = "bin" -a -d ../exe -a $ROOTDIR = .. ; then
569          EXEDIR=../exe          EXEDIR=../exe
# Line 490  if test ! -d ${TOOLSDIR} ; then Line 583  if test ! -d ${TOOLSDIR} ; then
583      echo "Error: the specified $TOOLSDIR (\"$TOOLSDIR\") does not exist!"      echo "Error: the specified $TOOLSDIR (\"$TOOLSDIR\") does not exist!"
584      exit 1      exit 1
585  fi  fi
586    if test "x$S64" = x ; then
587        S64='$(TOOLSDIR)/set64bitConst.sh'
588    fi
589    
590  EXECUTABLE=${EXECUTABLE:-mitgcmuv}  EXECUTABLE=${EXECUTABLE:-mitgcmuv}
591    
# Line 538  fi Line 634  fi
634  source ./.pd_tmp  source ./.pd_tmp
635  rm -f ./.pd_tmp  rm -f ./.pd_tmp
636    
637    #  Search for default packages.  Note that a "$ROOTDIR/pkg/pkg_groups"
638    #  file should eventually be added so that, for convenience, one can
639    #  specify groups of packages using names like "ocean" and "atmosphere".
640  echo  -n "  checking default package list:  "  echo  -n "  checking default package list:  "
641  if test "x${PDEFAULT}" = x ; then  if test "x${PDEFAULT}" = x ; then
642        for i in "." $MODS ; do
643            if test -r $i"/packages.conf" ; then
644                    PDEFAULT=$i"/packages.conf"
645                    break
646            fi
647        done
648    fi
649    if test "x${PDEFAULT}" = x ; then
650      PDEFAULT="$ROOTDIR/pkg/pkg_default"      PDEFAULT="$ROOTDIR/pkg/pkg_default"
651  fi  fi
652  if test "x${PDEFAULT}" = xNONE ; then  if test "x${PDEFAULT}" = xNONE ; then
# Line 580  for p in $PACKAGES ; do Line 687  for p in $PACKAGES ; do
687  done  done
688  PACKAGES="$pack"  PACKAGES="$pack"
689  echo "  applying ENABLE settings"  echo "  applying ENABLE settings"
690  rm -f ./.tmp_pack  echo "" > ./.tmp_pack
691  PACKAGES="$PACKAGES $ENABLE"  PACKAGES="$PACKAGES $ENABLE"
692  for i in $PACKAGES ; do  for i in $PACKAGES ; do
693      if test ! -d "$ROOTDIR/pkg/$i" ; then      if test ! -d "$ROOTDIR/pkg/$i" ; then
# Line 696  done Line 803  done
803  # done  # done
804  # echo  # echo
805    
806  echo "  Setting package-specific CPP flags in CPP_OPTIONS.h:"  # Create a list of #define and #undef to enable/disable packages
807  CPP_OPTIONS=  PACKAGES_DOT_H=PACKAGES.h
808  spaths="$SOURCEDIRS"  if test -e $PACKAGES_DOT_H ; then
809  for i in $spaths ; do      cat $PACKAGES_DOT_H \
     try="$i/CPP_OPTIONS.h"  
     #  echo -n "    trying $try : "  
     if test -f $try -a -r $try ; then  
         echo "    found CPP_OPTIONS=\"$try\""  
         CPP_OPTIONS="$try"  
         if test "x$i" != "x." ; then  
             cp -f $CPP_OPTIONS .  
         fi  
         break  
     fi  
 done  
 if test "x$CPP_OPTIONS" = x ; then  
     echo "Error: can't find \"CPP_OPTIONS.h\" in the path list: $spaths"  
     exit 1  
 fi  
 if test -e CPP_OPTIONS.h ; then  
     if test ! -e CPP_OPTIONS.h.bak ; then  
         cp -f CPP_OPTIONS.h CPP_OPTIONS.h.bak  
     fi  
     cat CPP_OPTIONS.h \  
810          | awk 'BEGIN{p=1;} ($1=="C===" && $2=="GENMAKE"){p=0;} {if (p==1) print $0}' \          | awk 'BEGIN{p=1;} ($1=="C===" && $2=="GENMAKE"){p=0;} {if (p==1) print $0}' \
811          > CPP_OPTIONS.h.tmp          > $PACKAGES_DOT_H".tmp"
812  fi  fi
813  cat <<EOF >>CPP_OPTIONS.h.tmp  cat <<EOF >>$PACKAGES_DOT_H".tmp"
814  C=== GENMAKE v2 ===  C=== GENMAKE v2 ===
815  C  The following defines have been set by GENMAKE, so please edit  C  The following defines have been set by GENMAKE, so please do not
816  C  them only if you know what you're doing.  In general, you should  C  edit anything below these comments.  In general, you should
817  C  add or remove packages by re-running genmake with different  C  add or remove packages by re-running genmake with different
818  C  "-enable" and/or "-disable" options.  C  "-enable" and/or "-disable" options.
819    
# Line 749  for n in $names ; do Line 836  for n in $names ; do
836          done          done
837          if test "x$has_pack" = xf ; then          if test "x$has_pack" = xf ; then
838              undef=`echo "ALLOW_$n" | awk '{print toupper($0)}'`              undef=`echo "ALLOW_$n" | awk '{print toupper($0)}'`
839              echo "#undef $undef" >> CPP_OPTIONS.h.tmp              echo "#undef $undef" >> $PACKAGES_DOT_H".tmp"
840    #           DEFINES="$DEFINES -U$undef"
841    
842  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!
843              case $n in              case $n in
# Line 759  for n in $names ; do Line 847  for n in $names ; do
847                  mom_vecinv)                  mom_vecinv)
848                      DEFINES="$DEFINES -DDISABLE_MOM_VECINV"                      DEFINES="$DEFINES -DDISABLE_MOM_VECINV"
849                      ;;                      ;;
                 generic_advdiff)  
                     DEFINES="$DEFINES -DDISABLE_GENERIC_ADVDIFF"  
                     ;;  
850                  debug)                  debug)
851                      DEFINES="$DEFINES -DDISABLE_DEBUGMODE"                      DEFINES="$DEFINES -DDISABLE_DEBUGMODE"
852                      ;;                      ;;
# Line 771  for n in $names ; do Line 856  for n in $names ; do
856          fi          fi
857      fi      fi
858  done  done
859  cat <<EOF >>CPP_OPTIONS.h.tmp  cat <<EOF >>$PACKAGES_DOT_H".tmp"
860    
861  C  Packages enabled by genmake:  C  Packages enabled by genmake:
862  EOF  EOF
863  for i in $PACKAGES ; do  for i in $PACKAGES ; do
864      def=`echo "ALLOW_$i" | awk '{print toupper($0)}'`      def=`echo "ALLOW_$i" | awk '{print toupper($0)}'`
865      echo "#define $def" >> CPP_OPTIONS.h.tmp      echo "#define $def" >> $PACKAGES_DOT_H".tmp"
866    #eh3 DEFINES="$DEFINES -D$def"
867    
868  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!
869      case $i in      case $i in
870          aim_v23)          aim_v23)
871              echo "#define   ALLOW_AIM" >> CPP_OPTIONS.h.tmp              echo "#define   ALLOW_AIM" >> $PACKAGES_DOT_H".tmp"
872                DEFINES="$DEFINES -DALLOW_AIM"
873                echo "Warning: ALLOW_AIM is set to enable aim_v23. This is REALLY ugly Jean-Michel :-)"
874              ;;              ;;
875      esac      esac
876  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!  #EH3  WARNING :  This is an UGLY HACK that needs to be removed!!!
877    
878  done  done
879  mv -f CPP_OPTIONS.h.tmp CPP_OPTIONS.h  cmp $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H
880    RETVAL=$?
881    if test "x$RETVAL" = x0 ; then
882        mv -f $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H".bak"
883        mv -f $PACKAGES_DOT_H".tmp" $PACKAGES_DOT_H
884    fi
885    
886  echo "  Adding STANDARDDIRS"  echo "  Adding STANDARDDIRS"
887  BUILDDIR=${BUILDDIR:-.}  BUILDDIR=${BUILDDIR:-.}
# Line 812  for d in $STANDARDDIRS ; do Line 905  for d in $STANDARDDIRS ; do
905      fi      fi
906  done  done
907    
908    echo " Searching for CPP_OPTIONS.h in order to warn about the presence"
909    echo " of \"#define ALLOW_PKGNAME\"-type statements:"
910    CPP_OPTIONS=
911    spaths=". $INCLUDEDIRS"
912    for i in $spaths ; do
913        try="$i/CPP_OPTIONS.h"
914        #  echo -n "    trying $try : "
915        if test -f $try -a -r $try ; then
916            echo "    found CPP_OPTIONS=\"$try\""
917            CPP_OPTIONS="$try"
918            break
919        fi
920    done
921    if test "x$CPP_OPTIONS" = x ; then
922        echo "Error: can't find \"CPP_OPTIONS.h\" in the path list: $spaths"
923        exit 1
924    fi
925    # New safety test: make sure packages are not mentioned in CPP_OPTIONS.h
926    names=`ls -1 "$ROOTDIR/pkg"`
927    for n in $names ; do
928        test_for_package_in_cpp_options $CPP_OPTIONS $n
929    done
930    
931    
932  echo  echo
933  echo "===  Creating the Makefile  ==="  echo "===  Creating the Makefile  ==="
934  echo "  setting INCLUDES"  echo "  setting INCLUDES"
935  for i in $INCLUDEDIRS ; do  for i in $INCLUDEDIRS ; do
936      if test -d $i ; then      if ! test -d $i ; then
937          INCLUDES="$INCLUDES -I$i"  #       INCLUDES="$INCLUDES -I$i"
938      else  #   else
939          echo "Warning: can't find INCLUDEDIRS=\"$i\""          echo "Warning: can't find INCLUDEDIRS=\"$i\""
940      fi      fi
941  done  done
# Line 999  clean: Line 1115  clean:
1115  Clean:  Clean:
1116          @make clean          @make clean
1117          @make cleanlinks          @make cleanlinks
1118          -rm -f Makefile.bak          -rm -f Makefile.bak gm_state gm_optfile make.log PACKAGES.h*
1119  CLEAN:  CLEAN:
1120          @make Clean          @make Clean
1121          -find \$(EXEDIR) -name "*.meta" -exec rm {} \;          -find \$(EXEDIR) -name "*.meta" -exec rm {} \;
1122          -find \$(EXEDIR) -name "*.data" -exec rm {} \;          -find \$(EXEDIR) -name "*.data" -exec rm {} \;
1123          -find \$(EXEDIR) -name "fort.*" -exec rm {} \;          -find \$(EXEDIR) -name "fort.*" -exec rm {} \;
1124          -rm -f \$(EXECUTABLE)          -rm -f \$(EXECUTABLE) output.txt
1125    
1126  makefile:  makefile:
1127          ${0} $@          ${0} $@

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.11.2.3

  ViewVC Help
Powered by ViewVC 1.1.22