4 |
# |
# |
5 |
# Setup to build CCF from user's home |
# 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 $ |
# $Id: ccf-setup.csh,v 1.9 2016/03/18 15:59:21 ccflib Exp $ |
8 |
|
|
9 |
|
|
10 |
set host=`hostname | cut -d. -f1` |
set host=`hostname | cut -d. -f1` |
15 |
|
|
16 |
set cputype=`uname -m` |
set cputype=`uname -m` |
17 |
|
|
18 |
switch ($cputype) |
# Select where to work and define CCFLIB_HOME accordingly |
|
case i[3,4,5,6]86: |
|
|
set kernelbits=32 |
|
|
set refhost="sasbld01" |
|
|
breaksw |
|
|
case x86_64: |
|
|
set kernelbits=64 |
|
|
set refhost="sasbld02" |
|
|
breaksw |
|
|
case sun4u: |
|
|
set kernelbits=32 |
|
|
set refhost="xvsoc01" |
|
|
breaksw |
|
|
endsw |
|
|
|
|
|
# Define CCFLIB_HOME |
|
19 |
|
|
20 |
switch ($host) |
switch ($host) |
21 |
case sasbld01: |
case sas[bld,dmz]0[1,2]: |
22 |
setenv CCFLIB_HOME "/home/ccflib" |
echo "${host} can not be used to build CCFs" |
23 |
breaksw |
echo "Please login instead either on sasbld01n/sasbld02n or use your own Linux WS" |
24 |
|
case sasbld0[1,2]n: |
25 |
|
set kernelbits="64" |
26 |
|
set refhost=${host} |
27 |
|
set GNUVER="6.2" |
28 |
|
setenv CCFLIB_HOME "/home/ccflib" |
29 |
|
breaksw |
30 |
|
case sasbld12: |
31 |
|
set kernelbits="64" |
32 |
|
set refhost=${host} |
33 |
|
set GNUVER="6.2" |
34 |
|
setenv CCFLIB_HOME "/home/ccflib" |
35 |
|
breaksw |
36 |
case xvsoc01: |
case xvsoc01: |
37 |
|
set kernelbits="32" |
38 |
|
set refhost="xvsoc01" |
39 |
setenv CCFLIB_HOME "/data/xmm/ccflib" |
setenv CCFLIB_HOME "/data/xmm/ccflib" |
40 |
breaksw |
breaksw |
41 |
default : |
default : |
42 |
setenv CCFLIB_HOME "/ccfbuild" |
set kernelbits="64" |
43 |
breaksw |
set refhost="sasbld01n" |
44 |
|
set GNUVER="6.2" |
45 |
|
cd /ccfbuild >& /dev/null |
46 |
|
if ( $status != 0 ) then |
47 |
|
setenv CCFLIB_HOME "/xdata/ccflib" |
48 |
|
else |
49 |
|
setenv CCFLIB_HOME "/ccfbuild" |
50 |
|
endif |
51 |
|
breaksw |
52 |
endsw |
endsw |
53 |
|
|
54 |
# Define where is the CCF development software |
# Define where is the CCF development software |
71 |
setenv LHEASOFT=1 |
setenv LHEASOFT=1 |
72 |
breaksw |
breaksw |
73 |
default: |
default: |
74 |
setenv HEADAS "/sasbuild/local/${refhost}/headas/architecture" |
#setenv HEADAS "/sasbuild/local/${refhost}/GNU_CC_CXX_${GNUVER}/headas/architecture" |
75 |
|
setenv PATH ${CCFLIB_HOME}/perl5/perlbrew/perls/perl-5.18.4/bin:${PATH} |
76 |
|
unsetenv PERL5LIB |
77 |
|
setenv HEADAS "/sasbuild/local/sasbld11/headas/architecture" |
78 |
if ( ! -d $HEADAS ) then |
if ( ! -d $HEADAS ) then |
79 |
echo "ccf-setup.csh: $HEADAS does not exist! - Abort" |
echo "ccf-setup.csh: $HEADAS does not exist! - Abort" |
80 |
return |
return |
92 |
source $SAS_DIR/sas-setup.csh |
source $SAS_DIR/sas-setup.csh |
93 |
breaksw |
breaksw |
94 |
default: |
default: |
95 |
if ( ! -f "$HOME/setsas.csh" ) then |
#/sas/bin/confsas |
96 |
/sas/bin/confsas |
#source $HOME/setsas.csh > /dev/null |
97 |
endif |
source ${CCFLIB_HOME}/local/SAS/xmmsas_20160201_1833/setsas.csh > /dev/null |
|
source $HOME/setsas.csh > /dev/null |
|
98 |
breaksw |
breaksw |
99 |
endsw |
endsw |
100 |
|
|
103 |
# Add some useful perl modules |
# Add some useful perl modules |
104 |
|
|
105 |
if ( $?PERL5LIB ) then |
if ( $?PERL5LIB ) then |
106 |
setenv PERL5LIB ${CCFLIB_HOME}/perl\:$PERL5LIB |
setenv PERL5LIB ${CCFLIB_HOME}/perl:${PERL5LIB} |
107 |
else |
else |
108 |
setenv PERL5LIB ${CCFLIB_HOME}/perl |
setenv PERL5LIB ${CCFLIB_HOME}/perl |
109 |
endif |
endif |
114 |
|
|
115 |
# Add the scripts in $CCFLIB_HOME/bin to PATH |
# Add the scripts in $CCFLIB_HOME/bin to PATH |
116 |
|
|
117 |
setenv PATH ${CCFLIB_HOME}/bin\:$PATH |
setenv PATH ${CCFLIB_HOME}/bin:${PATH} |
118 |
|
|
119 |
# Unsets MAKE if set |
# Unsets MAKE if set |
120 |
|
|
126 |
# Show it |
# Show it |
127 |
|
|
128 |
echo |
echo |
129 |
echo "SAS build reference information" |
echo "Heasoft & SAS reference information" |
130 |
echo "===============================" |
echo "===================================" |
131 |
|
echo |
132 |
|
echo "HEADAS = $HEADAS" |
133 |
|
echo "Heasoft version = "`fversion` |
134 |
|
echo |
135 |
echo |
echo |
136 |
sasversion -V 2 |
sasversion -V 2 |
137 |
|
|