-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_kdata
executable file
·89 lines (75 loc) · 2.03 KB
/
install_kdata
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
88
89
#!/bin/csh
#
# File: install_kdata
#
# Description: Installation script to install kw C++ analysis code package
# (temporary version for test edw release)
#
# Author: Adam Cox
#
# Syntax: install_kdata [libs] [default]
#
# libs - installs kdata libraries only
# default - doesn't prompt for variables if a default exists
#
#
# build libraries only if "libs" is the first argument
if ($1 == "libs") then
set make_opt = $1
echo "Building kdata libraries"
else
set make_opt = ""
echo "Full kdata installation"
endif
# first, source setup_kdata.csh if it exists
if (-e config/setup_kdata.csh) then
source config/setup_kdata.csh
endif
# then run our configure script
eval config/configure $1 $2
# get the result from our configure script
set result = "$status"
echo "Configure done."
# exit on any error
switch ("$result")
case 0:
breaksw
case 1:
echo "Sourcing config/setup_kdata.csh..."
source config/setup_kdata.csh
breaksw
default:
echo "Abort with code $result"
exit
breaksw
endsw
set pwd = `pwd`
# make edw
echo "Building kdata..."
eval "$MAKE $make_opt"
if ("$status" != 0) then
echo ""
echo "There were errors building kdata."
echo "Be sure you have correctly defined all of the required variables".
echo ""
echo "Notes:"
echo "1) You can type 'make showbuild' to show the build parameters."
echo "2) If you need to add libraries or options to the build, create"
echo " a file called MyConfig.mk in this directory with the necessary"
echo " changes. This file is included by the main Makefile."
echo ""
echo "Please contact one of the following with details about the problems:"
echo ""
echo " Adam Cox ([email protected])"
echo ""
exit
endif
echo ""
echo "Success!"
if ($result == 1) then
echo ""
echo "Now set your environment variables using one of the following:"
echo " csh family: 'source $pwd/config/setup_kdata.csh'"
echo " sh family: 'source $pwd/config/setup_kdata.sh'"
echo "And add this command to your login script (.cshrc)"
endif