/[MITgcm]/MITgcm/tools/genmake
ViewVC logotype

Diff of /MITgcm/tools/genmake

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

revision 1.25 by cnh, Tue Feb 6 04:22:36 2001 UTC revision 1.26 by adcroft, Wed Feb 7 03:37:46 2001 UTC
# Line 118  echo Operating system: $mach Line 118  echo Operating system: $mach
118  # If -rootdir wasn't specified then assume script is being run from bin  # If -rootdir wasn't specified then assume script is being run from bin
119  # but if it was supplied then we should place the executable in the build dir  # but if it was supplied then we should place the executable in the build dir
120  if (! $?ROOTDIR) then  if (! $?ROOTDIR) then
121    set ROOTDIR = ( .. )    set pwd=`pwd`
122  else    if ($pwd:t == bin) then
123    if (! $?EXEDIR) set EXEDIR = ( . )      if (-d ../exe & -d ../model & -d ../eesupp & -d ../pkg) then
124          set ROOTDIR = ( .. )
125          if (! $?EXEDIR) set EXEDIR = ( ../exe )
126        else if (-d ../model & -d ../eesupp & -d ../pkg) then
127          echo In bin with no exe
128          if (! $?EXEDIR) set EXEDIR = ( . )
129        endif
130      endif
131    endif
132    # Scan for logical ROOTDIR
133    if (! $?ROOTDIR) then
134      foreach dr (. .. ../.. ../../.. ../../../.. ../../../../..)
135        if (-d $dr/model & -d $dr/eesupp & -d $dr/pkg) then
136          set ROOTDIR = $dr
137          if (! $?EXEDIR) set EXEDIR = ( . )
138          echo ROOTDIR was not specified. Setting ROOTDIR = \"$ROOTDIR\"
139          break
140        endif
141      end
142    endif
143    if (! $?ROOTDIR) then
144      echo Root directory was not specified and could not be determined.
145      echo Specify the root location of the model source with -rootdir=dir
146      exit 1
147  endif  endif
148  if (! -d $ROOTDIR) then  if (! -d $ROOTDIR) then
149    echo Root directory $ROOTDIR not found.;exit 1    echo Root directory $ROOTDIR not found.;exit 1
# Line 138  if (! $?BUILDDIR) set BUILDDIR = ( . ) Line 161  if (! $?BUILDDIR) set BUILDDIR = ( . )
161  if (! -d $BUILDDIR) then  if (! -d $BUILDDIR) then
162    echo Build directory $BUILDDIR not found.;exit 1    echo Build directory $BUILDDIR not found.;exit 1
163  endif  endif
 if (! $?EXEDIR) set EXEDIR = ( $ROOTDIR/exe )  
164  if (! -d $EXEDIR) then  if (! -d $EXEDIR) then
165    echo Executable directory $EXEDIR not found.;exit 1    echo Executable directory $EXEDIR not found.;exit 1
166  endif  endif

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.22