1 |
ccflib |
1.8 |
#! /bin/tcsh |
2 |
ccflib |
1.1 |
# |
3 |
|
|
# ccf-setup.csh |
4 |
|
|
# |
5 |
|
|
# Setup to build CCF from user's home |
6 |
|
|
# |
7 |
ccflib |
1.9 |
# $Id: ccf-setup.csh,v 1.8 2014/12/12 14:08:16 ccflib Exp $ |
8 |
ccflib |
1.1 |
|
9 |
|
|
|
10 |
ccflib |
1.6 |
set host=`hostname | cut -d. -f1` |
11 |
ccflib |
1.5 |
|
12 |
ccflib |
1.7 |
# Identify machine OS name and kernel type |
13 |
|
|
|
14 |
|
|
set osname=`uname -s` |
15 |
|
|
|
16 |
|
|
set cputype=`uname -m` |
17 |
|
|
|
18 |
|
|
switch ($cputype) |
19 |
|
|
case i[3,4,5,6]86: |
20 |
|
|
set kernelbits=32 |
21 |
|
|
set refhost="sasbld01" |
22 |
|
|
breaksw |
23 |
|
|
case x86_64: |
24 |
|
|
set kernelbits=64 |
25 |
|
|
set refhost="sasbld02" |
26 |
|
|
breaksw |
27 |
ccflib |
1.9 |
case sun4u: |
28 |
|
|
set kernelbits=32 |
29 |
|
|
set refhost="xvsoc01" |
30 |
|
|
breaksw |
31 |
ccflib |
1.7 |
endsw |
32 |
|
|
|
33 |
|
|
# Define CCFLIB_HOME |
34 |
|
|
|
35 |
ccflib |
1.5 |
switch ($host) |
36 |
ccflib |
1.6 |
case sasbld01: |
37 |
ccflib |
1.1 |
setenv CCFLIB_HOME "/home/ccflib" |
38 |
|
|
breaksw |
39 |
ccflib |
1.9 |
case xvsoc01: |
40 |
|
|
setenv CCFLIB_HOME "/data/xmm/ccflib" |
41 |
|
|
breaksw |
42 |
ccflib |
1.1 |
default : |
43 |
|
|
setenv CCFLIB_HOME "/ccfbuild" |
44 |
|
|
breaksw |
45 |
|
|
endsw |
46 |
|
|
|
47 |
ccflib |
1.7 |
# Define where is the CCF development software |
48 |
|
|
|
49 |
|
|
setenv CCFDEV ${CCFLIB_HOME}/ccfdev |
50 |
|
|
|
51 |
ccflib |
1.8 |
if ( ! -d $CCFDEV ) then |
52 |
|
|
echo "ccf-setup.csh: $CCFDEV not found! - Abort" |
53 |
|
|
return |
54 |
ccflib |
1.7 |
endif |
55 |
|
|
|
56 |
|
|
|
57 |
|
|
# Set the CVS access to CCF package repository |
58 |
|
|
|
59 |
ccflib |
1.8 |
setenv CVSROOT ${CCFLIB_HOME}/ccfcvs |
60 |
ccflib |
1.7 |
|
61 |
|
|
# Heasoft |
62 |
ccflib |
1.9 |
switch ($host) |
63 |
|
|
case xvsoc01: |
64 |
|
|
setenv LHEASOFT=1 |
65 |
|
|
breaksw |
66 |
|
|
default: |
67 |
|
|
setenv HEADAS "/sasbuild/local/${refhost}/headas/architecture" |
68 |
|
|
if ( ! -d $HEADAS ) then |
69 |
|
|
echo "ccf-setup.csh: $HEADAS does not exist! - Abort" |
70 |
|
|
return |
71 |
|
|
endif |
72 |
|
|
source ${HEADAS}/headas-init.csh |
73 |
|
|
breaksw |
74 |
|
|
endsw |
75 |
ccflib |
1.1 |
|
76 |
ccflib |
1.7 |
# SAS |
77 |
ccflib |
1.1 |
|
78 |
ccflib |
1.9 |
switch ($host) |
79 |
|
|
case xvsoc01: |
80 |
|
|
setenv SAS_DIR ${CCFLIB_HOME}/xmmsas_20020413_2031 |
81 |
|
|
setenv SAS_PATH ${SAS_DIR} |
82 |
|
|
source $SAS_DIR/sas-setup.csh |
83 |
|
|
breaksw |
84 |
|
|
default: |
85 |
|
|
if ( ! -f "$HOME/setsas.csh" ) then |
86 |
|
|
/sas/bin/confsas |
87 |
|
|
endif |
88 |
|
|
source $HOME/setsas.csh > /dev/null |
89 |
|
|
breaksw |
90 |
|
|
endsw |
91 |
ccflib |
1.1 |
|
92 |
|
|
setenv SAS_MEMORY_MODEL Low |
93 |
|
|
|
94 |
ccflib |
1.7 |
# Add some useful perl modules |
95 |
ccflib |
1.1 |
|
96 |
ccflib |
1.7 |
if ( $?PERL5LIB ) then |
97 |
|
|
setenv PERL5LIB ${CCFLIB_HOME}/perl\:$PERL5LIB |
98 |
|
|
else |
99 |
|
|
setenv PERL5LIB ${CCFLIB_HOME}/perl |
100 |
|
|
endif |
101 |
ccflib |
1.1 |
|
102 |
ccflib |
1.7 |
# From CCFDEV/setup.csh |
103 |
ccflib |
1.1 |
|
104 |
ccflib |
1.7 |
setenv PERL5LIB ${CCFDEV}/lib/perl5:${PERL5LIB} |
105 |
ccflib |
1.1 |
|
106 |
|
|
# Add the scripts in $CCFLIB_HOME/bin to PATH |
107 |
|
|
|
108 |
ccflib |
1.2 |
setenv PATH ${CCFLIB_HOME}/bin\:$PATH |
109 |
ccflib |
1.7 |
|
110 |
|
|
# Unsets MAKE if set |
111 |
|
|
|
112 |
|
|
if ( $?MAKE ) then |
113 |
|
|
echo "ccf-setup.csh, WARNING: Your environment sets MAKE=$MAKE. It will be unset" |
114 |
|
|
unsetenv MAKE |
115 |
|
|
endif |
116 |
|
|
|
117 |
|
|
# Show it |
118 |
|
|
|
119 |
|
|
echo |
120 |
|
|
echo "SAS build reference information" |
121 |
|
|
echo "===============================" |
122 |
|
|
echo |
123 |
|
|
sasversion -V 2 |
124 |
|
|
|
125 |
|
|
echo |
126 |
|
|
echo "CCF building tools" |
127 |
|
|
echo "==================" |
128 |
|
|
echo |
129 |
|
|
deceit -v |
130 |
|
|
ccfextseq -v |
131 |
|
|
echo |
132 |
|
|
echo "CCF development environment" |
133 |
|
|
echo "===========================" |
134 |
|
|
echo |
135 |
|
|
echo "CCFLIB_HOME = $CCFLIB_HOME" |
136 |
|
|
echo "CCFDEV = $CCFDEV" |
137 |
|
|
echo "CCF repository = $CVSROOT" |
138 |
|
|
echo |
139 |
|
|
echo "*** Ready !" |
140 |
|
|
echo |