"Fossies" - the Fresh Open Source Software Archive

Member "install" (13 Aug 1995, 2081 Bytes) of package /linux/privat/old/laspack.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #! /bin/csh
    2 #
    3 # installation script for the LASPack library
    4 #
    5 # written by Tomas Skalicky, August 1995
    6 # with some changes by Eric van der Maarel
    7 #
    8 # This script builds and installs the libraries liblaspack.a and libxc.a
    9 # in the directory $HOME/lib$ARCH_EXT.
   10 # It also builds the test programs and installs them in the directory
   11 # $HOME/bin$ARCH_EXT.
   12 # 
   13 # The (enviroment) variable $ARCH_EXT can be used in order
   14 # to install libraries and programs in different directories
   15 # depending on computer the architecture,
   16 # it could be set e.g. to ARCH_EXT = '/sunos' for Sun workstations,
   17 # '/hp-ux' for HP workstations...
   18 #
   19 
   20 set dir = `pwd`
   21 set env_var = `env | grep ARCH_EXT`
   22 
   23 #
   24 # fitting of the makefiles
   25 #
   26 
   27 rm -f install.sed
   28 
   29 cat << EOT > install.sed
   30 /sources/ s/INCROOT/# INCROOT/
   31 /sources/ a\
   32 INCROOT     = $dir
   33 EOT
   34 
   35 if ( $env_var == "" ) echo '/\$ARCH_EXT/ s/\$ARCH_EXT//g' >> install.sed
   36 
   37 if ( ! -x /usr/bin/ranlib ) echo "/ranlib/ s/^#*/#/" >> install.sed
   38 
   39 foreach f ( */makefile */*/*/makefile )
   40     rm -f $f~
   41     sed -f install.sed $f > $f~
   42     cp $f~ $f
   43 end
   44 
   45 rm -f install.sed
   46 
   47 #
   48 # generation of binaries
   49 #
   50 
   51 if ( $1 == "local" ) then
   52     if ( ! -d /usr/local/lib ) mkdir /usr/local/lib
   53     if ( ! -d /usr/local/include ) mkdir /usr/local/include
   54     if ( ! -d /usr/local/bin ) mkdir /usr/local/bin
   55 else
   56     if ( ! -d $HOME/lib ) mkdir $HOME/lib
   57     if ( ! -d $HOME/include ) mkdir $HOME/include
   58     if ( ! -d $HOME/bin ) mkdir $HOME/bin
   59     if ( $env_var != "" ) then
   60         if ( ! -d $HOME/lib$ARCH_EXT ) mkdir $HOME/lib$ARCH_EXT
   61         if ( ! -d $HOME/bin$ARCH_EXT ) mkdir $HOME/bin$ARCH_EXT
   62     endif
   63 endif
   64 
   65 foreach d ( \
   66     xc \
   67     laspack \
   68     laspack/examples/mlstest \
   69     laspack/examples/lastest \
   70     laspack/examples/vectopt \
   71     laspack/examples/matropt \
   72 )
   73     echo ''
   74     echo "directory: $d"
   75     echo ''
   76         if ( $1 == "local" ) then
   77         csh -c "cd $d; make clean; make install-local"
   78         else
   79         csh -c "cd $d; make clean; make install"
   80     endif
   81 end
   82 
   83 rehash
   84 echo ""
   85 echo "LASPack installed."
   86 
   87 sleep 5
   88 
   89 #
   90 # check
   91 #
   92 
   93 echo ""
   94 cd laspack/check
   95 echo ""
   96 check
   97 echo ""
   98 cd ../..