1 |
#! /bin/tcsh |
2 |
# |
3 |
# ccf-setup.csh |
4 |
# |
5 |
# Setup to build CCF from user's home |
6 |
# |
7 |
# $Id: ccf-setup.csh,v 1.8 2014/12/12 14:08:16 ccflib Exp $ |
8 |
|
9 |
|
10 |
set host=`hostname | cut -d. -f1` |
11 |
|
12 |
# 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 |
case sun4u: |
28 |
set kernelbits=32 |
29 |
set refhost="xvsoc01" |
30 |
breaksw |
31 |
endsw |
32 |
|
33 |
# Define CCFLIB_HOME |
34 |
|
35 |
switch ($host) |
36 |
case sasbld01: |
37 |
setenv CCFLIB_HOME "/home/ccflib" |
38 |
breaksw |
39 |
case xvsoc01: |
40 |
setenv CCFLIB_HOME "/data/xmm/ccflib" |
41 |
breaksw |
42 |
default : |
43 |
setenv CCFLIB_HOME "/ccfbuild" |
44 |
breaksw |
45 |
endsw |
46 |
|
47 |
# Define where is the CCF development software |
48 |
|
49 |
setenv CCFDEV ${CCFLIB_HOME}/ccfdev |
50 |
|
51 |
if ( ! -d $CCFDEV ) then |
52 |
echo "ccf-setup.csh: $CCFDEV not found! - Abort" |
53 |
return |
54 |
endif |
55 |
|
56 |
|
57 |
# Set the CVS access to CCF package repository |
58 |
|
59 |
setenv CVSROOT ${CCFLIB_HOME}/ccfcvs |
60 |
|
61 |
# Heasoft |
62 |
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 |
|
76 |
# SAS |
77 |
|
78 |
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 |
|
92 |
setenv SAS_MEMORY_MODEL Low |
93 |
|
94 |
# Add some useful perl modules |
95 |
|
96 |
if ( $?PERL5LIB ) then |
97 |
setenv PERL5LIB ${CCFLIB_HOME}/perl\:$PERL5LIB |
98 |
else |
99 |
setenv PERL5LIB ${CCFLIB_HOME}/perl |
100 |
endif |
101 |
|
102 |
# From CCFDEV/setup.csh |
103 |
|
104 |
setenv PERL5LIB ${CCFDEV}/lib/perl5:${PERL5LIB} |
105 |
|
106 |
# Add the scripts in $CCFLIB_HOME/bin to PATH |
107 |
|
108 |
setenv PATH ${CCFLIB_HOME}/bin\:$PATH |
109 |
|
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 |