home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / plbin.zip / pl / SETUP < prev    next >
Text File  |  1993-02-18  |  1KB  |  50 lines

  1. #!/bin/csh -f
  2. # Set up SWI-Prolog for a specific machine/operating system
  3.  
  4. if ( $#argv != 1 ) then
  5.     echo "Usage: SETUP architecture"
  6.     echo ""
  7.     echo "Where architecture is one of:"
  8.     ls src/md-*.h | sed -e '/src\/md-gener.h/d' \
  9.                         -e 's/src\/md-\(.*\)\.h/    \1/'
  10.     exit 1
  11. endif
  12.  
  13. set arch=$1
  14.  
  15. if ( -e $arch ) then
  16.     echo "Directory $arch already exists; setup aborted"
  17.     exit 1
  18. endif
  19.  
  20. if ( ! -e src/md-$arch.h ) then
  21.     echo "Machine description file md-$arch.h does not exists."
  22.     echo "I will copy the generic md file into md-$arch.h"
  23.     (cd src; cp md-gener.h md-$arch.h)
  24. endif
  25.  
  26. mkdir $arch
  27. cd $arch
  28. ln -s ../src/pl-*.[ch] .
  29. ln -s ../src/pl-*.i[ch] .
  30. ln -s ../src/pl-export .
  31. ln -s ../src/{ATOMS,defatom.awk,gnu,dump} .
  32. ln -s ../src/{extract,make,simpl,strip}.sed .
  33.  
  34. switch ( $arch )
  35.     case atari:
  36.         ln -s ../src/pl.prj .
  37.     ln -s ../src/tc.cfg .
  38.     breaksw
  39. endsw
  40.  
  41. if ( -e ../src/Makefile.$arch ) then
  42.     ln -s ../src/Makefile.$arch Makefile
  43. else
  44.     ln -s ../src/Makefile Makefile
  45. endif
  46.  
  47. ln -s ../src/md-$arch.h md.h
  48.  
  49. echo "Setup for $arch completed in directory $arch"
  50.