CCL Home Page
Up Directory CCL mopac7.inst.jiro
#! /bin/csh -x
# @(#)mopac7.inst.jiro 00.00 94/06/01
# by Jiro Toyoda, Appl. Mol. Sci., IMS, ONRI.
#
#echo "**************************************************"
#echo "*****         Make script for mopac7         *****"
#echo "***** Jiro Toyoda  *****"
#echo "**************************************************"
#
# ***** set Work Station Name *****
#set ws = sun
#set ws = sgi
set ws = ibm
#
# ***** set esp *****
#set esp = y
set esp = n
#
# ***** set other variables *****
set fdir = `pwd`
#set fdir = ~ftp/pub/chem-all/qcpe/mopac7
set fname = mopac7.tar.Z
set dname = mopac7
set pname = mopac7.patch.unoff.gnu-make
set bindir = /usr/local/bin
#set bindir = ~/bin
set owner = root.bin
#set owner = ${user}
#
# ***** set alias name *****
alias cp /bin/cp
alias mv /bin/mv
alias rm /bin/rm
#alias zcat /usr/local/bin/zcat
alias make /usr/local/bin/make
#alias make /usr/local/gnu/bin/make
alias patch /usr/local/bin/patch
#
# ***** set MAXHEV and MAXLIT *****
set maxhevsml = 30
set maxlitsml = 30
set maxhevbig = 80
set maxlitbig = 80
#
#
if (${ws} == "sun") then
   set bsd = y
   set fflags = "-O -c -static"
   unset pnamebase
else if (${ws} == "sgi") then
   set bsd = n
   set fflags = "-O -c -static"
   set pnamebase = mopac7.patch.unoff.sgi
else if (${ws} == "ibm") then
   set bsd = n
   set fflags = "-O -c -static -qextname"
   set pnamebase = mopac7.patch.unoff.ibm
endif
#
if (! -f ${fdir}/${fname}) then
   set fdir = `pwd`
endif
#
rm -rf ${dname}
zcat ${fdir}/${fname} | tar -xvf -
patch -p < ${pname}
if ($?pnamebase > 0) then
   foreach pname0 (`ls ${pnamebase}??`)
      patch -p < ${pname0}
   end
endif
cd ${dname}
#
if (${esp} == y) then
   if (! -e esp.f ) then
      mv esp.rof esp.f
   endif
   if (! -e mopac.f.noesp) then
      mv mopac.f mopac.f.noesp
   endif
   sed 's/^C#        CALL ESP/         CALL ESP/' \
      mopac.f.noesp >! mopac.f
endif
#
if (! -e mopac.csh.org) then
   mv mopac.csh mopac.csh.org
endif
sed "s@set mopacdir = /usr/users/stewart/mopac6@set mopacdir = ${bindir}@"\
     mopac.csh.org >! mopac.csh
if (${bsd} != y) then
   mv mopac.csh mopac.csh.bsd
   sed 's/ps ax/ps -pdlf/' mopac.csh.bsd >! mopac.csh
endif
#
if (! -e SIZES.org) then
   cp -p SIZES SIZES.org
endif
if (! -e SIZES.sml) then
   sed "s/^      PARAMETER (MAXHEV=30, MAXLIT=30)/      PARAMETER (MAXHEV=${maxhevsml}, MAXLIT=${maxlitsml})/" \
   SIZES.org >! SIZES.sml
endif
if (! -e SIZES.big) then
   sed "s/^      PARAMETER (MAXHEV=30, MAXLIT=30)/      PARAMETER (MAXHEV=${maxhevbig}, MAXLIT=${maxlitbig})/" \
   SIZES.org >! SIZES.big
endif
#
cp -p SIZES.sml SIZES
touch SIZES
make FFLAGS="${fflags}"
make install OWNER=${owner} BINDIR=${bindir}
make cleandepend
#
cp -p SIZES.big SIZES
touch SIZES
make MOPAC=MOPACBIG FFLAGS="${fflags}"
make install MOPAC=MOPACBIG OWNER=${owner} BINDIR=${bindir}
#
make cleanall MOPAC="MOPAC MOPACBIG"
#
exit 0
Modified: Thu Aug 18 16:00:00 1994 GMT
Page accessed 8437 times since Sat Apr 17 21:34:48 1999 GMT