File: install

package info (click to toggle)
saclib 2.2.8-6.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,872 kB
  • sloc: ansic: 40,932; csh: 1,190; asm: 541; awk: 320; sh: 246; perl: 116; makefile: 98; sed: 48
file content (78 lines) | stat: -rw-r--r-- 1,771 bytes parent folder | download | duplicates (3)
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
#!/bin/csh

# USAGE
#   install <path to sac root directory>
#
# FUNCTION
#   Copies all system dependent files to the directories where they belong,
#   compiles the library and creates the documentation files.

set system=ultrix

# Check

if ($#argv != 1) then
  echo "USAGE:"
  echo "  install <path to sac root directory>"
  exit
endif
if (! -e $1/sysdep/$system/install) then
  echo "'$1/sysdep/$system/install' does not exist."
  echo "I assume you gave me an invalid path to the saclib root directory."
  echo "USAGE:"
  echo "  install <path to saclib root directory>"
  exit
endif

if ($?saclib) then
  if ($saclib != $1) then
    echo Warning: '$saclib' exists "($saclib)" and is different from $1.
    echo "         Make sure" '$saclib' is either set to $1
    echo "         or not set at all (check also '.cshrc')."
    exit
  endif
endif

# Set environment

setenv saclib $1
set path=($saclib/bin $path)

# Copy files

echo "Copying files from '$saclib/sysdep/$system' ..."
foreach i ($saclib/sysdep/$system/*)
  if (-d $i) cp $i/* $saclib/$i:t
end
rehash

# Compile

echo 'Creating $saclib/include/sacproto.h ...'
mkproto
echo "Creating makefiles ..."
mkmake
echo "Compiling optimized SACLIB library ..."
mklib opt
ln -s $saclib/lib/saclibo.a $saclib/lib/saclib.a

# Make docs

echo "Creating '$saclib/doc/desc.doc' ..."
pushd >/dev/null $saclib/src
mkdesc >$saclib/doc/desc.doc 8 79 *.c

# echo "Creating '$saclib/doc/kwic.doc' ..."
# mkkwic >$saclib/doc/kwic.doc

# echo "Creating '$saclib/doc/spec.doc' ..."
# mkspec >$saclib/doc/spec.doc *.c
popd >/dev/null

# Finished

echo "The install script is done."
echo "Now add"
echo "  setenv saclib $1"
echo "  set" 'path=($path $saclib/bin)'
echo "to your '.login' file to make the installation complete."