mkmkfiles.imake: line 51: syntax error: unexpected end of file

Hi,

i am installing glut-3.5 using that ./mkmkfiles.imake

its showing an error msg as

root@lxdevenv:~/Desktop/openGL/glut-3.5# ./mkmkfiles.imake
./mkmkfiles.imake: line 51: syntax error: unexpected end of file
root@lxdevenv:~/Desktop/openGL/glut-3.5# 

actually there are 49 lines in my code but it showing error in 51th line.
this is my code in mkmkfiles.imake file

#!/bin/csh -f
#
# Let user know what's going on...
#
set verbose
#
mv -f Makefile Makefile.bak >& /dev/null
#
# Unfortunately, some systems vary where they find imake, imake's config
# files, and/or xmkmf.  You may need to be clever to get Makefiles
# generated if your system is non-standard.  The following tries its best
# to generate the Makefiles for you...
#
if ( -d /usr/lib/X11/config) then
  if ( -x /usr/bin/X11/imake ) then
    # Things are in standard places
    /usr/bin/X11/imake -DUseInstalled -I/usr/lib/X11/config -DTOPDIR=.
  else
    # Hope imake is on your path!
    imake -DUseInstalled -I/usr/lib/X11/config -DTOPDIR=.
  endif
'else'
  # Try non-standard places vendor locations
  # Look for IBM's non-standard placement of imake
  if ( -d /usr/lpp/X11/Xamples/config) then
    if ( -x /usr/lpp/X11/Xamples/config/imake ) then
      # Things are in non-standard IBM AIX places
      /usr/lpp/X11/Xamples/config/imake -DUseInstalled -I/usr/lpp/X11/Xamples/config -DTOPDIR=.
    else
      # Hope imake is on your path!
      imake -DUseInstalled -I/usr/lpp/X11/Xamples/config -DTOPDIR=.
    endif
 'else'
    # Look for Sun's non-standard placement of imake and xmkmf
    if ( -x /usr/openwin/bin/xmkmf ) then
      /usr/openwin/bin/xmkmf
    else
      # Hope xmkmf is on your path!
      xmkmf     
    endif
  endif
endif
make Makefiles

## man subdirectory is not built by default
## uncomment line below to build its Makefiles
#make SUBDIRS=man Makefiles

make depend

pls help me out from this problem ...it will appriceated....

Do not use csh for scripting.

Top Ten Reasons not to use the C shell
Csh problems
Csh Programming Considered Harmful

HI Sir,

I am getting the same error even after i deleting the csh from that lines

i am not getting what to do ,,,

You need to rewrite the script using Bourne shell syntax.