File: setupcomm

package info (click to toggle)
klic 3.003-1.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,068 kB
  • ctags: 6,333
  • sloc: ansic: 101,584; makefile: 3,395; sh: 1,321; perl: 312; exp: 131; tcl: 111; asm: 102; lisp: 4; sed: 1
file content (87 lines) | stat: -rwxr-xr-x 1,703 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh
# ---------------------------------------------------------- 
#   (C)1995 Institute for New Generation Computer Technology 
#       (Read COPYRIGHT for detailed information.) 
#-----------------------------------------------------------
if [ -z "$LN" ]; then
  if [ -f ../config.sh ]
   then . ../config.sh
   elif [ "$1" = none ]; then DEF_LN=ln
   else
    echo ''
    echo Please run Configure first !!
    echo ''
    exit 1
   fi
  LN=$DEF_LN
  if [ -z "$LN" ]; then
    echo ''
    echo Please run Configure first !!
    echo ''
    exit 1
  fi
fi
if [ "$1" = "-install" ]
then shift; install=true
else install=false
fi

cd ../runtime
remove=false
arch=$1
if [ "$arch" = "" ]; then arch=pvm
elif [ "$arch" = none ]; then
    arch=pvm
    remove=true
fi
if [ ! -d config/$arch ]; then
  echo Architecture "'$arch'" not found;
  cd config;
  echo ''
  echo Existing architectures are:
  for i in *
  do
    [ -d $i ] && echo "	$i"
  done
  exit 1
elif $remove; then echo un-install parallel code.
elif $install; then true
else echo setting-up for "'$arch'".
fi  

h=`(cd config/$arch; echo *.h)`
c=`(cd config/$arch; echo *.c)`
s=`(cd config/$arch; echo *.s)`
if [ "$h" != "*.h" ]
then (cd ../include/klic; rm -f $h)
else h=''
fi
if [ "$c" != "*.c" ]
then rm -f $c
else c=''
fi
if [ "$s" != "*.s" ]
then rm -f $s
else s=''
fi

if $remove; then exit; fi
if $install; then
  for file in $c
  do
    $LN config/$arch/$file .
  done

  for file in $h
  do
    $LN ../../runtime/config/$arch/$file ../include/klic/
  done
  for file in $s
  do
    $LN config/$arch/$file .
  done
  echo parallel arch "'$arch'" installed.
else
  (cd config/$arch; make setup)
  make distributed-system-clean
fi